linuxphoneapps.frama.io/checkers
Dark Dragon 12eac1d89a Fix filenames 2023-11-15 19:13:39 +00:00
..
README.md checkers/README.md: Line update 2023-10-22 13:06:39 +02:00
check_filename.py Add "new" mode to Appstream checker 2023-10-15 09:30:30 +00:00
check_links.py Allow running checkers on single file 2023-10-08 18:33:36 +02:00
check_via_appstream.py Fix filenames 2023-11-15 19:13:39 +00:00
check_via_flathub.py Fix filenames 2023-11-15 19:13:39 +00:00
check_via_git.py Allow running checkers on single file 2023-10-08 18:33:36 +02:00
check_via_heuristics.py Merge branch 'heuristic-app-id' into 'main' 2023-10-15 15:52:46 +00:00
check_via_repology.py Checkers: Update README.md and set executable bit for check_via_repology.py 2023-10-15 11:42:14 +02:00
check_via_schema.py Sanitize data 2023-10-21 17:46:08 +00:00
requirements.txt Add schema checker 2023-10-15 16:01:23 +00:00
utils.py Minor fixes 2023-10-21 17:46:37 +00:00

README.md

Checkers

This folder contains scripts that help with checking / fixing outdated content, broken links and more.

They can be triggered from https://framagit.org/linuxphoneapps/linuxphoneapps.frama.io/-/ci/editor?tab=1 or run locally on your machine.

Local install

To run them locally, first clone the repository and cd to this folder:

git clone --recurse-submodules https://github.com/linuxphoneapps/linuxphoneapps.org.git
cd linuxphoneapps.frama.io/checkers

Now, you should install the necessary dependencies

python3 -m pip install -r requirements.txt

You can now run the checkers on all files in a folder or on just one file (example with check_via_appstream.py, other checkers work the same way):

python3 check_via_appstream.py check $folder/($file.md)

if you just want to check a listing, or

python3 check_via_appstream.py fix $folder/($file.md)

if you want to attempt fixing outdated information automatically.

Additional Use Cases

Aside from checking existing listings, you can also use the checkers to save time when creating new listings - check_via_appstream.py and check_via_repology.py are especially helpful for this.

You also start generating a new listing via

python3 check_via_appstream.py new PATH APPSTREAM_XML_URL

with APPSTREAM_XML_URL being the raw variant of an AppStream XML metadata file, typically containing the word metainfo or appdata in its filename and being located in the root folder of a project or in its data subfolder.

The PATH is typically ../content/apps for a new app or ../content/games for a new game.

Note that the generated file will have an incorrect filename if autotools variables are used in the projects file for the app id () and it may not be complete - one good way to check this is (assuming you have cloned the linuxphoneapps.frama.io project to run the checkers) is to run zola serve to check that the site still builds with the new listing.

It is recommended to comment out lines 185 and 186 in https://framagit.org/linuxphoneapps/linuxphoneapps.frama.io/-/blob/main/checkers/check_via_appstream.py?ref_type=heads#L185-186 before running the checkers in fix mode on new listings.