Skip to content

Add script to update README with output from help commands #220

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

Merged
merged 11 commits into from
Apr 28, 2025

Conversation

will-v-pi
Copy link
Contributor

Add a script that updates these, and an action to check them, which will throw an error if they're not up to date and provide an artifact with the correct README.md. You can then download that artifact and copy it in to replace the README so the action will pass.

Also adds GENERATE_FIXED_DOCS_WIDTH CMake option to lock the terminal width to 140, which will generate docs to match the current widths in the README.

This should probably be merged after everything else for 2.1.2, to avoid conflicts in the README file

@will-v-pi will-v-pi added this to the 2.1.2 milestone Apr 1, 2025
@lurch
Copy link
Contributor

lurch commented Apr 2, 2025

I've not tested this yet, but it sounds like a fantastic idea 😍

REG_SEL.FIELD_NAME to select a field within a row by name.
REG_SEL.n-m to select a range of bits within a row.
REG_SEL.n to select a single bit within a row.
.FIELD_NAME to select any row's field by name.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean it'd print all rows that contain a matching FIELD_NAME ?

This will update all the `picotool help ...` sections in the README with the current output

Also, add -DGENERATE_FIXED_DOCS_WIDTH=1 compilation option to fix the terminal width to 140, which is the width used in the README
If commands are missing, then add their sections to the end of the file to copy/paste, but fail the job

Also add new sections for the commands that are missing them, so it passes
"allows you to verify the contents" -> "allows you to verify that the contents"
Fix device-selection contracting too much for save and verify
"RPI-RP2 drive" -> "USB drive" in -F help text
"24 bit values" -> "24-bit values"
"REG_SEL" -> "ROW_SEL"
"or can selected" -> "or can select"
Make otp set and get have similar help text - not identical, as set only want 1 row/field
Add note to otp load that raw MSB is ignored
Get -> Set in otp load
Note that raw is default for otp dump and load
Add link to universal examples in link description
@@ -211,7 +211,7 @@ TARGET SELECTION:
-F, --force-no-reboot
Force a device not in BOOTSEL mode but running compatible code to reset so the command can be executed. After executing the
command (unless the command itself is a 'reboot') the device will be left connected and accessible to picotool, but without the
RPI-RP2 drive mounted
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dunno if it's "technically correct" but in some other places I refer to this as the "BOOTSEL drive", which might be less ambiguous than "USB drive"? 🤷

Copy link
Contributor

@kilograham kilograham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note (mostly unrelated); i'm not sure if this is captured elsewhere, but in some cases I think the -t type is superfluous (there are some things which only have one type i think)

@will-v-pi
Copy link
Contributor Author

Note (mostly unrelated); i'm not sure if this is captured elsewhere, but in some cases I think the -t type is superfluous (there are some things which only have one type i think)

Yep, that's fixed in #207

@will-v-pi will-v-pi merged commit c56c005 into develop Apr 28, 2025
39 checks passed
@will-v-pi will-v-pi deleted the quick-docs branch April 28, 2025 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants