I had some time between the years and so I continued old work and built a small Flask app that reads JSONB from Postgres and renders websites with jinja2. Comments are currently implemented using embedded Discourse threads. Discourse is also used as main base for user accounts and authentication. Files can be hosted anywhere.
There should be a public PostgREST endpoint for querying the database in smart ways some day, I would like to use that to power the website too. Right now it’s simply psycopg2.
SHA256 hashes are used as identifiers for things so we won’t have issues with filename collisions anymore. Unfortunately SHA256 hashes are long and unwieldy so I think some truncation for less huge URLs would be nice. Not sure how much can be stripped away before collisions become a reasonable issue though. https://www.quaddicted.com/file/62681e968ffbbe705bbdaf7429a286725baf7123d18ed34aa38141de4cf4e8e5 is a bit crazy… I guess appending filenames or titles at the end would be nice too.
If you want to help, these topics would be awesome for someone to tackle: JSON Schema, some nice jinja2 templates for map things, mods, etc., a compatible re-implementation of the Quake Injector in PyQt, a reasonably way to have image uploads including metadata etc., a good classification system with tags (I am inspired by https://wiki.openstreetmap.org/wiki/Map_features on that front)
And I am not sure if using Discourse is really the best way forward. I like it as a user and admin but when embedding, the users can not add replies on the same page, they always have to click through to the actual full forum thread page. I could not find a better alternative though. If you know something, please shout. The issue it solves is user management, comment moderation and authentication.
And I am not sure if having a readable name for the group ([em]quoth[/em] here) is even a good idea or if it would lead to issues and fighting later. A UUID would be enough for making a nice frontend but it would be horrible for human editors of the data.
Oops, the diff above was missing “release_group=quoth” on all of them. I am not super happy with that structure, any thoughts?
Work this week included:
An automated process that updates the database if JSONs are edited on GitHub \o/
First test migration of the forum from the current one to Discourse which was mostly successful (some markup didn’t convert, e.g. inline images
And some minor stuff like fixing problems with user accounts, polishing the template of map pages, testing some Discourse plugin to rate topics (since release comments are basically just forum topics this might just be enough for us!)
TODOs include:
Converting the map comments to posts, including their ratings
Provide a sweet API against the DB (PostgREST is the plan) for tools and whatever people want to build
Figure out how we can easily get aggregate ratings from that Discourse plugin without writing a custom script
Decide how to handle release images/screenshots
Where you can help:
See the JSON stuff above and try to find problems with it
Building a nice looking Discourse theme (I’d prefer to go more brown again instead of this weird greenish tint, but anything Quakey is fine!)
Build a new Quake Injector (PyQt please!) D:
Any thoughts on images for releases? Currently we have 1 which is not enough for many things, e.g. map packs. There might be official images as well as “editor’s impressions” and even users’ images. How to handle this? Where to host which? Should official images get JSON descriptions as well? How to reference them? I’d prefer a clean distinction between official imagery and editor/user imagery. The latter could just be hosted by the forum because it allows file uploads.
If you’re a programmer and know a bit of Ruby, help with converting the comments to fit https://github.com/discourse/discourse/blob/main/script/import_scripts/json_generic.rb would be greatly appreciated. The first post would need to be created in a special way so that it is referenced correct when embedding. Just shoot me a mail if you wanna try to tackle this.