Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1068
The issue asks for documentation of the JSON configuration format: what the fields are and how to use them. Until now CONTRIBUTING.md only had a minimal example and the file locations.
This adds a Config File Format section to CONTRIBUTING.md (English, with a German translation in the German part):
config/configs,icon,categories,description), which are required, and the rules the repo's tests enforce:configandconfigsare mutually exclusive, categories are known keys without duplicates,description.enis a non-empty string,iconis an https URL ornullid,url,author,name,additionalSettings,overrideSource,preferredApkIndex,altLabel):id/url/author/namemust be non-empty strings,additionalSettingsis a JSON object encoded as a string, the website fills inappName/appAuthor/aboutwhen they are missing,name/authorare shown in Obtainium unlessappName/appAuthoroverride them,preferredApkIndexis an integer preference, andaltLabelis only shown on the website when an app has more than one variantadditionalSettingskeys (configure the app in Obtainium, export, and runscripts/generate_from_export.js), noting that the script skips IDs that already have a config file and writes"en": null, so a non-empty English description has to be added; the existing "Auto-generated entries" note is updated to match (generated entries use theothercategory and need an English description)app.mihon.json) and a complex example with two variantsThe rules described match what
tests/app-data.test.mjschecks, and both examples pass them.Approach
I put this in CONTRIBUTING.md next to "Where to Put Your Config" and "Minimal Example", because the README already sends contributors there. A separate file would split the contributor docs, and a JSON Schema would change tooling for a docs request. The individual
additionalSettingskeys aren't listed: they belong to Obtainium and depend on the source, so the section points to an Obtainium export instead of copying a list that would go stale.Follow-ups (not in this PR)
scripts/generate_from_export.jsandscripts/generate_from_url.pywritedescription: {"en": null}, whichtests/app-data.test.mjsrejects; the docs now say to fill it in, but the generators could write a placeholder prompt or warn.id,url,author, undname").npm run validate:checkcurrently reports dead icons in existing configs (e.g. HTTP 404 forcom.kodjodevf.mangayomi,paige.navic,com.opentasker.app); this PR doesn't touch any config.apkUrlsrow, while Obtainium's parser expects a name/URL pair.