From ad3bcf773300631eee4a5b9c8b181bb02fe0ba22 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Sat, 23 Nov 2024 00:18:45 +0000 Subject: [PATCH] Update cheatsheets --- tldr/argos-translate | 37 +++++++++++++++++++++++++++++++++++++ tldr/linux/let | 26 ++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 tldr/argos-translate create mode 100644 tldr/linux/let diff --git a/tldr/argos-translate b/tldr/argos-translate new file mode 100644 index 00000000..4f0ea22c --- /dev/null +++ b/tldr/argos-translate @@ -0,0 +1,37 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# argos-translate + +> An open-source offline translation library and CLI tool written in Python. +> More information: . + +- Install translation pairs for Spanish to English translation: + +`argospm install translate-es_en` + +- Translate some text from Spanish (`es`) to English (`en`) (Note: only two letter language codes are supported): + +`argos-translate --from-lang es --to-lang en {{un texto corto}}` + +- Translate a text file from English to Hindi: + +`cat {{path/to/file.txt}} | argos-translate --from-lang en --to-lang hi` + +- List all installed translation pairs: + +`argospm list` + +- Show translation pairs from English that are available to be installed: + +`argospm search --from-lang en` + +- Update installed language package pairs: + +`argospm update` + +- Translate from `ar` to `ru` (Note: this requires the translation pairs `translate-ar_en` and `translate-en_ru` to be installed): + +`argos-translate --from-lang ar --to-lang ru {{صورة تساوي أكثر من ألف كلمة}}` diff --git a/tldr/linux/let b/tldr/linux/let new file mode 100644 index 00000000..b1bf0a7d --- /dev/null +++ b/tldr/linux/let @@ -0,0 +1,26 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# let + +> Evaluate arithmetic expressions in shell. +> Supports variables, operators, and conditional expressions. +> More information: . + +- Evaluate a simple arithmetic expression: + +`let "{{result = a + b}}"` + +- Use post-increment and assignment in an expression: + +`let "{{x++}}"` + +- Use conditional operator in an expression: + +`let "{{result = (x > 10) ? x : 0}}"` + +- Display help: + +`let --help`