-
-
Notifications
You must be signed in to change notification settings - Fork 49
Match JSON and modules in order to read data stored in modules #584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…stored in modules
|
Caution Review failedThe pull request is closed. ## Walkthrough
A new function, `extract_module_options_from_sh_files(directory)`, was introduced in `tools/config-markdown.py` to parse `.sh` files within a specified directory, extracting key-value pairs that match the pattern `["module,key"]="value"`. This function builds a nested dictionary mapping module names to their respective options and loads these options at runtime from the `lib/armbian-config` directory, storing them in a global `module_options` dictionary. In the `create_markdown_user` function, the handling of sub-item metadata was revised: the previously included author metadata line is now commented out, and if a sub-item has a `module` attribute, the script appends maintainer, status, architecture, and documentation link information to the markdown output using a new formatting style with double underscores and markdown line breaks. Additionally, the JSON configuration for software installation menu entries was updated to include a `"module"` key for multiple software items, associating each entry with its corresponding module.
## Possibly related PRs
- armbian/configng#584: Adds the same `extract_module_options_from_sh_files(directory)` function and modifies `create_markdown_user` to incorporate module metadata from `.sh` files based on a new `"module"` key in JSON entries, making it directly related.
## Suggested labels
`ready to merge`📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Description
We need to show command / module architecture and perhaps other data, which is only stored in module. It will add more information:
Implementation Details
Add new field to JSON structure which serves to match those two - for the purpose of making proper documentation.
Testing Procedure
Checklist