Create XML for the freie-radios app. Actual data fetching and massaging is highly specific. Currently implementations exist for using the Drupal-based websites of Radio Dreyckland (rdl.de) and Radio FreeFM (freefm.de).
composer install
./frn-app-xml.php generate:rdl
Options:
--id=ID Only include these IDs
--save-path=SAVE-PATH Path to save the XML to
-r, --drupal-root Path to Drupal root
-l, --drupal-url Drupal base URL
You can also set these options in .env
RDL_DRUPAL_ROOT=/var/www
RDL_DRUPAL_URL=rdl.de
SAVE_PATH=/var/www/rdl-frn.xml
See src/Rdl and src/FreeFm for two implementations. Both are Drupal-based. For other PHP based CMS the implementation could look similar (see DrupalAdapterBase.php).
The implementation of each backend is three-fold:
-
Command: Symfony console command. ExtendGenreateCommandBase.phpand just callcreateXml, passing anXmlCreator. -
XmlCreator: A class implementingXmlCreatorInterface. ExtendXmlCreatorBaseand implement the stub methods, returning a\DOMElementfor the different sections of the XML.getBroadcastis called for each broadcast returned from theAdapterand should return a\DOMElementfor each. -
Adapter: Return a list of broadcasts (shows) to be included in the XML. All logic and communication towards a specific backend should happen here.
Copying the existing implementations and changing things where required should be the easiest.
Note that commands are not auto-discovered, but have to be registered with the application in frn-app-xml.php.