||1 year ago|
|dist||2 years ago|
|docs||2 years ago|
|lib||1 year ago|
|locale||2 years ago|
|manpages||2 years ago|
|release||2 years ago|
|sql||2 years ago|
|tests||1 year ago|
|vendor-bin||1 year ago|
|www/tt-rss/images||4 years ago|
|.gitattributes||5 years ago|
|.gitignore||2 years ago|
|.php_cs.dist||3 years ago|
|AUTHORS||5 years ago|
|CHANGELOG||1 year ago|
|CONTRIBUTING.md||5 years ago|
|LICENSE||6 years ago|
|README.md||2 years ago|
|RoboFile.php||1 year ago|
|UPGRADING||2 years ago|
|arsse.php||1 year ago|
|composer.json||1 year ago|
|composer.lock||1 year ago|
|package.json||2 years ago|
|phpdoc.dist.xml||6 years ago|
|postcss.config.js||2 years ago|
|robo||4 years ago|
|robo.bat||5 years ago|
The Advanced RSS Environment
The Arsse is a news aggregator server, written in PHP, which implements multiple synchronization protocols. Unlike most other aggregator servers, The Arsse does not include a Web front-end (though one is planned as a separate project), and it relies on existing protocols to maximize compatibility with existing clients.
Information on how to install and use the software can be found in the manual, which is available online as well as with every copy of the software. This readme file instead focuses on how to set up a programming environment to modify the source code.
Installing from source
The main repository for The Arsse can be found at code.mensbeam.com, with a mirror also available at GitHub. The GitHub mirror does not accept bug reports, but the two should otherwise be equivalent.
Composer is required to manage PHP dependencies. After cloning the repository or downloading a source code tarball, running
composer install will download all the required dependencies, and will advise if any PHP extensions need to be installed. If not installing as a programming environment, running
composer install -o --no-dev --no-scripts is recommended.
The code which runs The Arsse, contained in
/arsse.php, is only a short stub: the application itself is composed of the classes found under
/lib/, with the main ones being:
||The command-line interface, including its documentation|
||High-level database interface|
||Low-level database abstraction layer|
||General protocol handler for CORS, HTTP auth, etc.|
||Singleton glueing the parts together|
/lib/Database.php file is the heart of the application, performing queries on behalf of protocol implementations or the command-line interface.
Also necessary to the functioning of the application is the
/vendor/ directory, which contains PHP libraries which The Arsse depends upon. These are managed by Composer.
Supporting data files
/sql/ directories contain human-language files and database schemata, both of which are occasionally used by the application in the course of execution. The
/www/ directory serves as a document root for a few static files to be made available to users by a Web server.
/dist/ directory, on the other hand, contains general and system-specific build files, and samples of configuration for Web servers and other system integration. These are not used by The Arsse itself, but are used during the process of preparing new releases for supported operating systems.
The source text for The Arsse's manual can be found in
/docs/, with pages written in Markdown and converted to HTML with Daux. If a static manual is generated its files will appear under
The Arsse also has a UNIX manual page, also written in Markdown, which can be found under
/manpages/. Pandoc is needed to convert it to the appropriate format, with the results stored under
In addition to the manuals the files
/README.md (this file),
/AUTHORS also document various things about the software, rather than the software itself.
/tests/ directory contains everything related to automated testing. It is itself organized as follows:
||The test cases themselves, organized in roughly the same structure as the code|
||(optional) Generated code coverage reports|
||Sample documents used in some tests, to be returned by PHP's basic HTTP server|
||Supporting classes which do not contain test cases|
||Bootstrap script, equivalent to
||PHPUnit configuration file|
||Simple driver for the PHP HTTP server used during testing|
PHPUnit's configuration can be customized by copying its configuration file to
/tests/phpunit.xml and modifying the copy accordingly.
/vendor-bin/ directory houses the files needed for the tools used in The Arsse's programming environment. These are managed by the Composer "bin" plugin and are not used by The Arsse itself. The following files are also related to various programming tools:
||Git settings for handling files|
||Git file exclusion patterns|
||Configuration for php-cs-fixer|
||Cache for php-cs-fixer|
||Configuration for Composer|
||Version synchronization data for Composer|
||Task definitions for Robo|
||Simple wrapper for executing Robo on POSIX systems|
||Simple wrapper for executing Robo on Windows|
In addition the files
/postcss.config.js as well as the
/node_modules/ directory are used by Yarn and PostCSS when modifying the stylesheet for The Arsse's manual.
We use a tool called Robo to simplify the execution of common tasks. It is installed with The Arsse's other dependencies, and its configured tasks can be listed by executing
./robo without arguments.
The Arsse has an extensive PHPUnit test suite; tests can be run by executing
./robo test, which can be supplemented with any arguments understoof by PHPUnit. For example, to test only the Tiny Tiny RSS protocol, one could run
./robo test --testsuite TTRSS.
There is also a
test:quick Robo task which excludes slower tests, and a
test:full task which includes redundant tests in addition to the standard test suite
Computing the coverage of tests can be done by running
./robo coverage, after which an HTML-format coverage report will be written to
/tests/coverage/. Either PCOV, Xdebug, or phpdbg is required for this. PCOV is generally recommended as it is faster than Xdebug; phpdbg is faster still, but less accurate. If using either PCOV or Xdebug, the extension need not be enabled globally; PHPUnit will enable it when needed.
Enforcing coding style
The php-cs-fixer tool, executed via
./robo clean, can be used to rewrite code to adhere to The Arsse's coding style. The style largely follows PSR-2 with some exceptions:
- Classes, methods, and functions should have their opening brace on the same line as the signature
- Anonymous functions should have no space before the parameter list
Building the manual
The Arsse's user manual, made using Daux, can be compiled by running
./robo manual, which will output files to
/manual/. It is also possible to serve the manual from a test HTTP server on port 8085 by running
Rebuilding the manual theme
The manual employs a custom theme derived from the standard Daux theme. If the standard Daux theme receives improvements, the custom theme can be rebuilt by running
Building the man page
The Arsse's UNIX manual page is authored in Markdown, and must be converted to the native roff format using Pandoc. This can be done by running
./robo manpage, which will output appropriate files to
/dist/man/. The conversion should not be done manually as there is post-processing required for optimal output.
Packaging a release
Producing release packages is done by running
./robo package. This performs the following operations:
- Duplicates a Git working tree with the commit (usually a release tag) to package
- Generates UNIX manual pages with Pandoc
- Generates the HTML manual
- Installs runtime Composer dependencies with an optimized autoloader
- Deletes numerous unneeded files
- Exports the default configuration of The Arsse to a file
- Compresses the remaining files into a tarball
- Produces a binary package for Arch Linux, if possible
- Produces source and binary packages for Debian using pbuilder, if possible