Commit Graph

174 Commits (2aebc51eb0f9e83f9c7865e5cb8f3e6cf982920d)

Author SHA1 Message Date
K.B.Dharun Krishna 5c26174aa9
pages/*: update links and more info link script (#11390)
* pages/*: update links and more info link script

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* cleanup: reformat code

* ax-webapp: fix link

* curl: fix false positive

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>

---------

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
2023-11-06 23:14:12 +05:30
Sebastiaan Speck c059eb1c19
scripts: fix typo (#11396) 2023-11-06 13:31:28 +01:00
K.B.Dharun Krishna f1aa0a8fe5
Revert "pages/*: add standard translation and links (#11331)" (#11374)
This reverts commit 39642c3fed80aaed7212bca6b7cc4c345ed229ee.
2023-11-06 14:02:32 +05:30
K.B.Dharun Krishna 8538a31451
pages/*: add standard translation and links (#11331)
* pages/*: add standard translation and links

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* fix1: false positives; standardize Bengali, Hindi, Nepali periods

* fix: periods in recently added Bengali pages

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* fix: false positives in modified files

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* cleanup: update to native period in Bengali l10n

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

---------

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-11-06 14:02:31 +05:30
Lena 250b9d7c21
scripts: use `[[` instead of `[`, fix literal shell globs (#11290)
* build.sh: move `*` outside quotes (it doesn't get expanded)

* scripts: use `[[` instead of `[` in if statements
2023-10-26 22:11:24 +05:30
Lena 5e1ae7dbbe
fix/scripts: remove unnecessary `-r` from `cp` (#11210) 2023-10-24 16:44:27 +05:30
K.B.Dharun Krishna a8d6441ad1
fix/scripts: replace build assets symlink with copy (#11205) 2023-10-24 11:17:53 +02:00
K.B.Dharun Krishna 4e53530691
feat/scripts: support generating PDFs for platforms (#11195)
* feat/scripts: support generating PDFs for platform

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* render.py: reformat code for black

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* PDF/README: update command

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* render.py: update code

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* render.py: drop platform none parameter from main

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

---------

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-10-24 00:59:43 +05:30
K.B.Dharun Krishna e35b482300
scripts: build and deploy PDF pages for translations (#10969)
* scripts: build and deploy PDF pages for translations

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* render.py: fix typo in filename description

---------

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-10-22 02:34:22 +05:30
Lena af2f6d9d3e
Symlink `pages.en` to `pages` (#11139)
* Symlink `pages.en` to `pages`

* Update `build.sh` to symlink `pages.en` to `pages`
2023-10-21 22:02:19 +02:00
K.B.Dharun Krishna fd24c5b49a
scripts/set-more-info-link.py: add Czech translation (#10894) 2023-10-15 22:17:23 +02:00
K.B.Dharun Krishna b333d3d3a5
Revert "scripts: build and deploy PDF pages for translations (#10846)" (#10965)
This reverts commit a2ab577848.
2023-10-13 11:00:58 +05:30
K.B.Dharun Krishna a2ab577848
scripts: build and deploy PDF pages for translations (#10846)
* scrips: build and deploy PDF pages for all languages

* cleanup/render.py: reformat code

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* Apply suggestions from code review

Co-authored-by: Matthew Peveler <matt.peveler@gmail.com>

* scrpts/pdf: update README, refactor code

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* test/ci: building PDF was wildcard

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* test/ci: building translations as wildcard 2

* test/ci: fix flag in PDF building

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* test/ci: update build pdf action

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* test/ci: extend PDF exclusion list

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* cleanup/ci: update PDF translation build

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* scripts/pdf: add website and repo link

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* test/ci: move PDF build to seperate script file

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* test/ci: minor fixes to build pdf script

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* cleanup/ci: update build PDF

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* scripts: update font family, minor fix

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

* fix/deploy: sha256sum command

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>

---------

Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
Co-authored-by: Matthew Peveler <matt.peveler@gmail.com>
2023-10-13 09:58:02 +05:30
Tristan Jahnke e747bd8132
scripts/*.py: update coding style (#10761)
* convert to f string

* use a next function instead of a for-loop

* remove uneeded else statement

* use in operator instead of multi comparison

* conver to f string

* adds extra line between function defs

* revert/change to PR comment around looping

* remove uneeded loops

* revert to keep old style choice
2023-10-04 14:02:15 +05:30
Adam Henley 8aacd0800b
feature support: provide translation archives (#10555)
* Feature Support Download Of Individual Languages By Clients

Signed-off-by: Adam Henley <adamazing@gmail.com>

* Rename language archival step function

Co-authored-by: Jack Lin <blueskyson1401@gmail.com>

---------

Signed-off-by: Adam Henley <adamazing@gmail.com>
Co-authored-by: Jack Lin <blueskyson1401@gmail.com>
2023-08-16 10:39:53 +05:30
K.B.Dharun Krishna b84d4ad3af
pages.th/*: remove period (#10449) 2023-07-14 09:50:02 +05:30
dependabot[bot] 6260eba27c
build(deps): bump glob from 7.2.0 to 10.2.7 (#10377)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthew Peveler <matt.peveler@gmail.com>
2023-07-06 08:47:20 -07:00
dependabot[bot] d06d41d23a
build(deps): bump black from 22.3.0 to 23.3.0, reformat render.py for latest black version (#10284)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-06-13 15:18:54 +02:00
Seth Falco 50145c29ac
chore: check black version before running (#10063) 2023-04-13 22:58:23 +01:00
Axel Navarro f299711968
scripts/deploy.sh: fix script syntax (#9674) 2022-12-26 18:44:41 +05:30
Matthew Peveler 312ecf8226
scripts/deploy.sh: generate sha256sum of artifacts (#9669) 2022-12-26 08:14:49 -03:00
Krzysztof Bociurko a55e9f412d
scripts/test.sh: add batching to markdownlint (#9469) 2022-11-24 11:16:42 -03:00
Tan Siret A afac125d3c
*: update link label in Turkish translation (#9453) 2022-10-31 06:52:35 -03:00
phatsss c2d7b27c80
*: add Lao translation (#8893) 2022-10-24 09:15:57 -03:00
Matthew Peveler ffcd73854c
scripts: improve generated PDF bookmark layout (#8809) 2022-10-07 20:10:44 -03:00
K.B.Dharun Krishna f9e89c9007
pages.th/*: fix more information label (#8585) 2022-10-02 11:34:41 -03:00
lincc adf4448df8
set-more-info-link.py: add Catalan translation (#7797) 2022-02-18 21:55:31 -03:00
lincc 27cbb29209
set-more-info-link.py, translation-templates/*: add Uzbek language (#7536) 2021-12-26 12:57:58 -03:00
Sailesh Shrestha ce9834c29b
set-more-info-link.py, translation-templates/*: add Nepali translation (#7228) 2021-11-06 17:41:18 -03:00
Axel Navarro 782e90e596
set-more-info-link: fix Turkish translation (#7227) 2021-11-01 22:31:50 +00:00
Arun Isaac c087c6e253
set-more-info-link.py: improve Tamil translation (#7366) 2021-11-01 16:29:28 -03:00
lincc 0920259600
set-more-info-link.py, translation-templates/*: add bn, sr, uk translation tags (#7101) 2021-10-20 14:25:03 -03:00
lincc 9912d26258
scripts/set-alias-page.py: add (#6845)
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
Co-authored-by: Matthew Peveler <matt.peveler@gmail.com>
2021-10-11 10:40:03 -10:00
marchersimon d63065b882
Replace non-breaking space with regular space in French pages (#6842) 2021-10-07 09:37:39 +02:00
marchersimon 088f340e55
set-more-info-link.py: add Arabic translation (#6813) 2021-10-05 18:03:46 -03:00
marchersimon 1a98d09a48
*: fix period in Japanese translation (#6812) 2021-10-05 21:10:14 +01:00
marchersimon cc25275e96
set-more-info-link.py, pages.hi/*: fix punctuation in Hindi translation (#6570) 2021-10-03 15:22:06 -03:00
a1346054 5c62e303b5
*: shellcheck and fix typos (#6526)
* test.sh: quote a variable

* contributing-guides/*: fix typos

* pages/*: fix typos

* scripts/*: fix typos

* MAINTAINERS.md: trim trailing whitespace

Co-authored-by: a1346054 <36859588+a1346054@users.noreply.github.com>
2021-09-16 00:32:13 -03:00
lincc 9c6d2865dc
set-more-information.py: add sync option (#6405) 2021-09-15 13:14:00 -10:00
Axel Navarro 6d318892f8
script/test: ignore python checks if not available (#6530) 2021-09-15 13:10:16 -10:00
Matthew Peveler 3fa29ea1c2
tooling: add black and flake8 for python formatting/linting (#6454) 2021-09-03 12:17:51 -03:00
Stig124 f4390b1637
send-to-bot.py: use requests instead of urllib (#6184) 2021-09-03 09:10:24 -03:00
marchersimon c70c0c2688
Chinese pages: remove space in More info link (#6305) 2021-08-31 15:13:49 +08:00
lincc b0cb85ae98
render.py: fix PDF kerning rendering bug (#6366) 2021-08-26 05:17:50 +00:00
CleanMachine1 6637acf662
scripts: add SPDX-License-Identifier in files (#6215) 2021-07-16 14:15:31 +01:00
Stig124 0bf9645dd5
set-more-info-link.py: add shebang (#6077) 2021-05-30 17:16:53 -03:00
Owen Voke 7d1e2e24ef tools: update script references to 'main' branch 2021-05-01 20:10:05 +01:00
marchersimon 0a15df6ce3
German pages: replace `Mehr Informationen` with `Weitere Informationen` (#5814) 2021-04-24 07:09:56 -04:00
Matthew Peveler 560740f0c2
chore(deps): update tldr-lint to 0.0.11 (#5754)
* chore(deps): update tldr-lint to 0.0.11

Signed-off-by: Matthew Peveler <matt.peveler@gmail.com>

* add more ignore codes

* Update test.sh
2021-04-18 16:19:18 +02:00
bl-ue cebded9a37 set-more-info-link.py: remove leading space in Persian label 2021-04-04 00:44:50 +01:00
bl-ue 1665bf4027
set-more-info-link.py: hbs -> sh (#5671)
For #5664
2021-04-03 02:03:50 +03:00
bl-ue 4706f21e46
scripts: add set-more-info-link.py (#5654)
* scripts: add set-more-info-link.py

* scripts/set-more-info-link.py: use current tldr repo if the script is being run from scripts/

* scripts/set-more-info-link.py: allow passing .md extension

* scripts/set-more-info-link.py: differentiate between links added and updated

* set-more-info-link.py: make omitting .md optional, rather than adding it optional

* set-more-info-link.py: make IGNORE_FILES a tuple rather than a str
2021-04-01 18:54:56 +03:00
bl-ue d607f853be
scripts/*.sh: set executable permission (#5461)
In most repos, executable shell scripts have the executable bit set.
2021-03-31 00:32:17 +01:00
Owen Voke d1affd5b36
ci: update to use @tldr-bot for deploy (#5288) 2021-02-22 12:45:12 +00:00
bl-ue dc690e38eb
render.py: fix typo (#5206) 2021-01-31 16:27:36 +00:00
Matthew Peveler 44472fb217
ci: add tldr-pages/tldr before commit hash for auto gh linking (#5072)
Signed-off-by: Matthew Peveler <matt.peveler@gmail.com>
2021-01-03 21:48:47 +00:00
Matthew Peveler 549e69573b
remove duplicate pages/index.json file (#5063) 2021-01-02 09:53:39 -05:00
Kyle Anthony Williams f320863c9d Repaired indentation error. 2020-12-19 14:58:03 -05:00
Kyle Anthony Williams 6251e4eb3b Finished resolving of commits. 2020-12-18 22:52:07 -05:00
Kyle Anthony Williams f225e1a30a Merge remote-tracking branch 'upstream/master' 2020-12-18 22:38:17 -05:00
Starbeamrainbowlabs 5b5b590ee2
pdf script: format & add datetime (#4993) 2020-12-11 20:25:11 +00:00
Owen Voke 252271c35a ci: add PDF upload to deploy script 2020-12-04 18:48:24 +00:00
Kyle Anthony Williams 896555f79e Updated the render.py README.
* Updated command line usage to:
  * Reflect changes made to the CLI.
  * Demonstrate recommended use of pip.
* Made some grammar changes.
* Added more useful alt text to the images.
2020-12-04 12:09:48 -05:00
Kyle Anthony Williams 954ceb7b98 Made render.py more Pythonic.
* Converted the top comment to a multi-line string.
* Replaced `i` with `enumerate`.
* Gave the `ArgumentParser` a name and description.
* Added `basic` as a color choice and made it the default.
* Added `color` as a long flag.
* Removed no longer used variables and `if` statement.
2020-12-04 11:58:27 -05:00
Jamie Magee 34f8c610df
Checkout all branches in GitHub Actions (#4437)
By default actions/checkout@v2 only checks out the latest commit of the current branch. Unfortunately, this causes the `git diff` check in `check-pr.sh` to fail, as `master` branch isn't available`.

This change checks out all commits of all branches, which allows `git diff` to work correctly.

Ideally, I'd like to use the `ref` setting of actions/checkout@v2, but that only supports a single ref so it's not possible to checkout the PR branch _and_ `master` branch at the same time.
2020-10-05 16:23:08 +01:00
Owen Voke 68f8e470d1 Fix PULL_REQUEST_ID reference when not set 2020-06-26 18:55:59 +02:00
Owen Voke 7e3ca9c540 Resolve deploy key from secrets 2020-06-26 18:55:59 +02:00
Owen Voke 5e958f6074 Update scripts to use PULL_REQUEST_ID 2020-06-26 18:55:59 +02:00
Owen Voke 81d346f006 Replace 'TRAVIS_COMMIT_RANGE' usage 2020-06-26 18:55:59 +02:00
Owen Voke 7472600aa1 Update Travis references in scripts 2020-06-26 18:55:59 +02:00
Waldir Pimenta 37634b36f7 Harmonize project name (lowercase tldr, no semicolon, hyphen-separated) 2020-05-27 22:22:32 +02:00
Marco Bonelli c8291fdcfa Remove unnecessary newlines in send-to-bot messages. (#3754)
GitHub wraps text in comments even when a single newline is
encountered. This made comments by @tldr-bot look awkward.
2020-01-13 20:45:31 +01:00
Zlatan Vasović e2ae506613
Rework PDF script (#3654) 2019-12-17 21:25:52 +01:00
Marco Bonelli 359ada47c7 Scripts: use POSIX subcommand invocation 2019-11-29 16:01:25 +00:00
Marco Bonelli 4d153b7d8e test.sh: rename functions 2019-11-29 16:01:25 +00:00
Marco Bonelli 11ad7b5203 Check PR: optimize script 2019-11-29 16:01:25 +00:00
Marco Bonelli 2ae688016a Send to bot: rename script 2019-11-29 16:01:25 +00:00
Marco Bonelli 134e63f318 Send to bot: better action names, simplify endpoint 2019-11-29 16:01:25 +00:00
Marco Bonelli 581821448e Add check-pr script
This script will be run by Travis-CI (on PR builds only) to run some useful
checks. Refer to the comment at the top of the script for more information.
2019-11-29 16:01:25 +00:00
Marco Bonelli df8cae8c6f Update and refactor send_to_bot script
Refactor the script from top to bottom:

 1. Switch to Python 3.
 2. Add functionality for commenting only once (used for commenting messages
    generated by the check-pr script).
 3. Split the functionality clearly into two different actions: one for
    pr-check information, and one for build errors.
 4. Add additional env vars checks and error checks.
2019-11-29 16:01:25 +00:00
Marco Bonelli 7a28aef527 Copy index.json in build script, not npm script
Move the duplication of the index.json file in the build.sh script instead of
the npm build-index script. This makes things cleaner.
2019-11-29 16:01:25 +00:00
Marco Bonelli c2051a0674 Replace npm test with a proper bash script
The npm test script was dirty and had the unneeded side effect of generating an
output file. This change moves the test to a real bash script that runs the
appropriate tests and also additional checks when ran from Travis CI during a PR
build.
2019-11-29 16:01:25 +00:00
Agniva De Sarker 62731a8b64 Correctly store language and platform mappings together (#3588)
Previously they were stored separately in their own arrays.
This made them disconnected, and impossible to know if a page
belonged to which platform and language combination.

This PR adds an array of objects called `targets` which contains
platform/language pairs.
2019-11-19 18:58:23 +01:00
Marco Bonelli a188a3a8ca Travis: separate building from deployment.
- Added `-q` to the zip command to create the archive since Travis
  was having trouble handling its very long output (thus making
  the build fail).
- Moved the actual building of the index and the archive from
  deploy.sh to a new build.sh script.
- Added a `script` step in .travis.yml to run build.sh after npm
  test.
- Specified a clone depth of 1 in .travis.yml to make things faster
  since we don't need to do any git operation during the build.
2019-07-11 17:01:05 +05:30
Max Strübing 11289f8a9b [chore] fix use of doublequotes and $(...) notation in deploy script (#3048) 2019-05-23 14:27:29 +01:00
Marco Bonelli 697d8b3b78 deploy: use top-level index.json 2019-04-03 17:21:57 +05:30
Marco Bonelli 2fedf6ce96 build-index: add error check, fix regexp typo 2019-04-03 17:21:57 +05:30
Marco Bonelli e5d84c429b build-index: clean syntax 2019-04-03 17:21:57 +05:30
Marco Bonelli c3772f2345 Deploy: run all commands separately to avoid unnoticed errors. 2019-02-07 18:47:32 +01:00
Marco Bonelli d83f446a8c Cleaner deployment process (fixes #2749) (#2750)
* TravisCI: cleaner deployment process.

* TravisCI: rename deployment script.
2019-02-04 19:29:17 +05:30
Agniva De Sarker 1e28a0cbc0 [Security]: Moving to a secure way of uploading assets (#2747)
* [Security] Moving to a secure way of uploading assets
2019-02-03 14:57:35 +01:00
Agniva De Sarker d7f6df4ed7
Include languages in index file (#2696) 2019-01-10 13:52:44 +05:30
Agniva De Sarker 747ae04995 README: bring back old markdown syntax 2018-11-14 22:20:44 +00:00
Petrus Kiendys f8020369c3 Update readme
- notation fix, 'hyphen' --> 'colon'
- markdown fix, use double asterisk for "strong emphasis" instead of headers
2018-11-14 22:20:44 +00:00
Arun Isaac 6bfdbef312 TravisCI: include pages of all languages in archive (PR #2567) 2018-11-09 09:57:04 +00:00
Felix Yan d82202088f scripts: fix a typo (#2404) 2018-10-07 17:17:30 +05:30
pxgamer ce97ed1f7c scripts: fix import for urllib2 in python3 2018-08-26 21:16:50 +01:00
pxgamer fae6737841 scripts: add python3 compatibility for the bot 2018-08-26 21:16:50 +01:00
Agniva De Sarker b0906952ef tooling: remove old scripts to generate pdf
Now that a new tool has been checked in, therefore removing old one.
2018-03-12 19:08:33 +05:30
Ayush Dwivedi 490da5763d Render PDF copies of tldr pages (#1964) 2018-03-12 00:23:48 +05:30