fgmeta/catalog
James Turner b86121be85 Add catalog update script
Ensure this doesn't get lost, it's nothing magic but helps
to document+capture what the server is doing, in case
someone needs to replicate it.
2020-09-21 10:16:09 +00:00
..
fgaddon-catalog Catalogs: Expansion of the zip archive exclusion file. 2019-11-13 22:18:43 +01:00
fgaddon-catalog-ukmirror Update trunk FGaddon catalog metadata 2020-06-16 12:54:11 +01:00
legacy-catalog Catalog configs from UKmirror 2018-10-23 12:01:58 +00:00
single-craft-catalog-test Catalogs: Addition of example configuration files for testing a single craft. 2019-11-14 12:00:02 +01:00
stable-2018-catalog Add Mespieler aircraft mirror 2020-03-21 18:41:45 +00:00
stable-2020-catalog Fix output path for 2020 stable catalog 2020-09-21 08:33:55 +00:00
check_aircraft.py Reorganize catalog modules 2020-06-19 18:15:25 +02:00
README.md Update catalog/README.md (and fix a typo) 2020-06-22 00:41:05 +02:00
update_catalogs.sh Add catalog update script 2020-09-21 10:16:09 +00:00
update-catalog.py Reorganize catalog modules 2020-06-19 18:15:25 +02:00

Introduction

This is the directory containing the script for updating aircraft, or other craft, catalogs. It will create the catalog.xml file used to add a hangar to FlightGear, as well as the zip archives of each craft in the hangar and the md5sums, thumbnails, and previews of these. It consists of the script:

  • update-catalog.py

It uses Python modules located under python3-flightgear/flightgear/meta/:

  • aircraft_catalogs/catalog.py
  • aircraft_catalogs/catalogTags.py
  • sgprops.py

Usage

The script can be run directly from this directory, or the script and its modules can be copied together and run from any location. The steps to use these are:

  • Have something like export PYTHONPATH="/path/to/fgmeta/python3-flightgear" in your shell setup or use a .pth file (see python3-flightgear/README.md for more details).
  • Create an output directory where the catalog and zip files will be located.
  • Copy the configuration files catalog.config.xml, template.xml, and zip-excludes.lst from one of the *catalog* example directories into the output directory.
  • Modify these files as required.

Then run the script with:

$ $FGMETA/catalog/update-catalog.py dir

where dir is the output directory. The script will create the following files:

  • md5sum.xml: A file containing checksums of all craft zip archives in the base output directory.
  • ftp/catalog.xml: The XML catalog to upload to a server and advertise to FlightGear users.
  • ftp/*.zip: The zip archives of each craft in the hangar.
  • ftp/previews/*_Splashs/: A directory per craft containing the splash screen graphics.
  • ftp/thumbnails/: The collection of thumbnail graphics for the hangar.

The ftp directory is to be uploaded to a server which can be configured via the catalog.config.xml file.

Examples

A number of example configuration files are located in this directory. These include:

  • fgaddon-catalog/: The configuration files used for the official FGAddon hangar.
  • `stable-2018-catalog/': The configuration files used for the 2018 long term stability release.
  • single-craft-catalog-test/: Configuration files used for testing the catalog and zip archive creation for a single craft. These are for content developers to test their craft.