2023-12-21 14:17:18 +00:00
# Scripts
The current directory contains useful scripts used/to use with `tldr` pages.
2024-05-18 01:33:40 +01:00
> [!NOTE]
> [Git](https://git-scm.com/) and [Python](https://www.python.org/) must be installed in your system to run/test the scripts locally.
2023-12-21 14:17:18 +00:00
## Summary
2023-12-21 15:20:42 +00:00
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.
2023-12-21 14:17:18 +00:00
- [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.
2023-12-21 14:21:05 +00:00
- [build-index.sh ](build-index.sh ) script builds the index of available pages.
2024-05-18 01:33:40 +01:00
- [check-pr.sh ](check-pr.sh ) script checks the page's syntax and performs various checks on the PR.
2023-12-21 14:21:05 +00:00
- [deploy.sh ](deploy.sh ) script deploys the ZIP and PDF archives to the static website repository.
2024-05-18 01:33:40 +01:00
- [send-to-bot.py ](send-to-bot.py ) is a Python script that sends the build or test output to tldr-bot.
2023-12-21 14:21:05 +00:00
- [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.
2024-05-09 12:24:53 +01:00
- [set-page-title.py ](set-page-title.py ) is a Python script to update the title across pages.
2024-05-18 01:33:40 +01:00
- [test.sh ](test.sh ) script runs some basic tests on every PR/commit to ensure the pages are valid and the code is formatted correctly.
2023-12-21 14:21:05 +00:00
- [wrong-filename.sh ](wrong-filename.sh ) script checks the consistency between the filenames and the page title.
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.
2023-12-21 14:17:18 +00:00
## Compatibility
2024-05-18 01:33:40 +01:00
The table below shows the compatibility of user-executable scripts with different platforms:
2023-12-21 14:17:18 +00:00
| Script | Linux | macOS (`osx`) | Windows |
| ------ | ----- | ----- | ------- |
| [render.py ](pdf/render.py ) | ✅ | ✅ | ✅ |
2024-05-18 01:33:40 +01:00
| [build-pdf.sh ](pdf/build-pdf.sh ) | ✅ | ✅ | ❌ (WSL ✅)|
| [build.sh ](build.sh ) | ✅ | ✅ | ❌ (WSL ✅)|
2023-12-21 14:17:18 +00:00
| [set-alias-pages.py ](set-alias-pages.py ) | ✅ | ✅ | ✅ |
| [set-more-info-link.py ](set-more-info-link.py ) | ✅ | ✅ | ✅ |
2024-05-09 12:24:53 +01:00
| [set-page-title.py ](set-page-title.py ) | ✅ | ✅ | ✅ |
2024-05-18 01:33:40 +01:00
| [wrong-filename.sh ](wrong-filename.sh ) | ✅ | ❌ | ❌ (WSL ✅)|
2024-01-27 15:10:42 +00:00
| [update-command.py ](update-command.py ) | ✅ | ✅ | ✅ |