A weekend of Quaddicted future?

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.

https://github.com/SpiritQuaddicted/QuaddictedPlayground/tree/master/json/by-sha256 got updated too. Those JSONs are created from the current database plus some extra data on tag classifications. I am not 100% sure how editing will look like, it will probably just be something like https://jsoneditoronline.org/ or https://www.jeremydorn.com/json-editor to create or edit the JSON data and then actually just a little Git repository for a start because that gives us easy ways for automated checks and community moderation in https://github.com/SpiritQuaddicted/QuaddictedPlayground/pull/1.

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.

Great news that this work is moving forward!

I did some work backend- and frontend-wise for grouping packages/releases together. It is hard to find tags that nicely model this though, any thoughts on this? https://github.com/SpiritQuaddicted/QuaddictedPlayground/commit/ac4481d42aed23bdd07696a54fa12bdac185f371

It’s kind of a messy mixture of https://wiki.archlinux.org/title/PKGBUILD#Dependencies and https://packaging.python.org/en/latest/tutorials/packaging-projects/#configuring-metadata with a manually set [em]main_group_package=yes[/em] which we would need to keep updated for the group. All heavily inspired by the great free tagging system of OSM: https://wiki.openstreetmap.org/wiki/Map_features

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.

https://www.quaddicted.com/files/misc/20230501%20main%20package%20and%20collapse.mp4 shows what this enables.

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 :frowning:
  • 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.

Migrating the comments to Discourse is harder than expected because back then I wrote the commenting system I thought it would be soo cooool to have few limits on characters in usernames. Something that led to usernames like the awesome “Ðê§§ï©å‡êÐ ©ø®þ§ê”. Discourse has reasonable rules about usernames and now I have to check and write some mappings manually. Not hard but not fun so that takes a while…