tldr/scripts/README.md

34 lines
2.1 KiB
Markdown
Raw Normal View History

# Scripts
The current directory contains useful scripts used/to use with `tldr` pages.
## Summary
This section contains a summary of the scripts available in this directory. For more information about each script, please refer to the header of each script.
- [pdf](pdf/README.md) directory contains the `render.py` and `build-pdf.sh` script and related resources to generate a PDF document of tldr-pages for a specific language or platform (or both).
- [build.sh](build.sh) script builds the ZIP archives of the `pages` directory.
- [build-index.sh](build-index.sh) script builds the index of available pages.
- [check-pr.sh](check-pr.sh) script checks the pages syntax and performs various checks on the PR.
- [deploy.sh](deploy.sh) script deploys the ZIP and PDF archives to the static website repository.
- [send-to-bot.py](send-to-bot.py) is a Python script that send the build or tests output to tldr-bot.
- [set-alias-page.py](set-alias-page.py) is a Python script to generate or update alias pages.
- [set-more-info-link.py](set-more-info-link.py) is a Python script to generate or update more information links across pages.
- [test.sh](test.sh) script runs some basic tests on every PR/commit to make sure that the pages are valid and that the code is formatted correctly.
- [wrong-filename.sh](wrong-filename.sh) script checks the consistency between the filenames and the page title.
tooling: add update-command script (#11974) * tooling: add update-command script * update-command: add os import Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> * update-command: remove sync argument and small refactor * update-command: add shebang and license * update-command: remove unused function * update-command: add dry-run option * update-command: add docs in header * update-command: fix old_common_part var name * update-command: require command without .md * update-command: fix command name in description Co-authored-by: Juri Dispan <juri.dispan@posteo.net> * update-command: remove ".md" suffix in description * update-command: enclosing positional parameters with angle brackets Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> * update-command: enclose paremeters with double angle brackets Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> * update-command: refine wording Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> * update-command: remove unused functions * update-command: detect tldr root from any subdir * update-command: call place_placeholders directly * update-command: add summary and compatibility to scripts/README.md * scripts/update-command.py: remove unused method * scripts/update-command.py: use logger.info instead of print * scripts/update-command.py: rename command to cmd_example * scripts/README.md: use command example instead of command * scripts/update-command.py: remove nonexistent optional argument * scripts/update-command.py: improve interactive example * scripts/update-command.py: run black --------- Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> Co-authored-by: Juri Dispan <juri.dispan@posteo.net> Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
2024-01-27 15:10:42 +00:00
- [update-command.py](update-command.py) is a Python script to update the common contents of a command example across all languages.
## Compatibility
The below table shows the compatibility of user-executable scripts with different platforms.
| Script | Linux | macOS (`osx`) | Windows |
| ------ | ----- | ----- | ------- |
| [render.py](pdf/render.py) | ✅ | ✅ | ✅ |
| [build-pdf.sh](pdf/build-pdf.sh) | ✅ | ✅ | ❌ |
| [build.sh](build.sh) | ✅ | ✅ | ❌ |
| [set-alias-pages.py](set-alias-pages.py) | ✅ | ✅ | ✅ |
| [set-more-info-link.py](set-more-info-link.py) | ✅ | ✅ | ✅ |
| [wrong-filename.sh](wrong-filename.sh) | ✅ | ❌ | ❌ |
tooling: add update-command script (#11974) * tooling: add update-command script * update-command: add os import Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> * update-command: remove sync argument and small refactor * update-command: add shebang and license * update-command: remove unused function * update-command: add dry-run option * update-command: add docs in header * update-command: fix old_common_part var name * update-command: require command without .md * update-command: fix command name in description Co-authored-by: Juri Dispan <juri.dispan@posteo.net> * update-command: remove ".md" suffix in description * update-command: enclosing positional parameters with angle brackets Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> * update-command: enclose paremeters with double angle brackets Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> * update-command: refine wording Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> * update-command: remove unused functions * update-command: detect tldr root from any subdir * update-command: call place_placeholders directly * update-command: add summary and compatibility to scripts/README.md * scripts/update-command.py: remove unused method * scripts/update-command.py: use logger.info instead of print * scripts/update-command.py: rename command to cmd_example * scripts/README.md: use command example instead of command * scripts/update-command.py: remove nonexistent optional argument * scripts/update-command.py: improve interactive example * scripts/update-command.py: run black --------- Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> Co-authored-by: Juri Dispan <juri.dispan@posteo.net> Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
2024-01-27 15:10:42 +00:00
| [update-command.py](update-command.py) | ✅ | ✅ | ✅ |