Grognak/Grognaks-Mod-Manager — pull request #22 by Vhati (2013-03-08 22:45:29+00:00)
Title: Periodic Catalog Updating

- Incremented Version to ??? ( see: readme_changelog.txt and lib/global_config.py )
- Split changelog and modder notes into separate readmes.
- Split the scraper mini-app into moddb_updater.py and added commandline args to it.

Added mod catalog fetching:
- Clients will download the latest catalog from the repo's "/backup/current_catalog.json" to their own "GMM/backup/" and poll the server whever their copy is over a week old or absent.
- If nothing's changed on the server, their copy's datestamp will be set to the current date, as if they *had* downloaded it.
- The json file contains a dict of versioned catalog styles for legacy support and differentiating what released clients expect from what dev-snapshots may expect. When the class structure changes, a client may load json_obj["catalog_versions"]["2"], for example.

Catalog Maintenance:
- cd .../GMM/
- python -m lib.moddb_updater --scrape
- After a while, a text file will appear in that folder.
- Compare it with GMM/lib/default_moddb.py to edit in new info.
- To collect hashes, download new *.ftl files and either "md5sum -b example.ftl" or select them in GMM, and copy what the GUI reports.
- python -m lib.moddb_updater --dump-json
- A json file will appear in that folder.
- Copy it to your local repository's /backup/
- Commit "backup/current_catalog.json" and "lib/default_moddb.py" to the repository.

I'm using a couple bat files to run the scrape and dump commands.