Sfoglia il codice sorgente

Merge remote-tracking branch 'upstream/master'

Kyle Anthony Williams 4 anni fa
parent
commit
f225e1a30a
68 ha cambiato i file con 579 aggiunte e 137 eliminazioni
  1. 13 0
      .github/workflows/ci.yml
  2. 6 0
      MAINTAINERS.md
  3. 1 0
      README.md
  4. 41 0
      pages.it/common/nmap.md
  5. 1 1
      pages.ko/common/bg.md
  6. 1 1
      pages.zh/common/bg.md
  7. 28 0
      pages/common/2to3.md
  8. 1 1
      pages/common/bg.md
  9. 24 0
      pages/common/brotli.md
  10. 28 0
      pages/common/conan.md
  11. 1 1
      pages/common/emulator.md
  12. 20 0
      pages/common/etcd.md
  13. 37 0
      pages/common/etcdctl.md
  14. 4 0
      pages/common/fd.md
  15. 1 1
      pages/common/fg.md
  16. 1 1
      pages/common/fgrep.md
  17. 2 6
      pages/common/fisher.md
  18. 20 0
      pages/common/flow.md
  19. 1 1
      pages/common/flutter.md
  20. 20 0
      pages/common/from.md
  21. 1 1
      pages/common/git-lfs.md
  22. 1 1
      pages/common/git-prune.md
  23. 1 1
      pages/common/git-shortlog.md
  24. 0 0
      pages/common/htop.md
  25. 1 1
      pages/common/iverilog.md
  26. 1 1
      pages/common/jhipster.md
  27. 1 1
      pages/common/jobs.md
  28. 1 1
      pages/common/kops.md
  29. 18 5
      pages/common/lynx.md
  30. 1 1
      pages/common/lzop.md
  31. 1 1
      pages/common/mr.md
  32. 1 1
      pages/common/nmap.md
  33. 1 1
      pages/common/openssl-genrsa.md
  34. 12 0
      pages/common/openssl-prime.md
  35. 1 1
      pages/common/pipx.md
  36. 4 0
      pages/common/redis-cli.md
  37. 1 1
      pages/common/reflac.md
  38. 1 1
      pages/common/scheme.md
  39. 5 0
      pages/common/scp.md
  40. 1 1
      pages/common/thunderbird.md
  41. 28 0
      pages/common/tmpmail.md
  42. 1 1
      pages/common/twm.md
  43. 28 7
      pages/common/vimdiff.md
  44. 1 1
      pages/linux/cewl.md
  45. 1 1
      pages/linux/e2image.md
  46. 1 1
      pages/linux/guake.md
  47. 2 2
      pages/linux/htpdate.md
  48. 1 1
      pages/linux/i3.md
  49. 1 1
      pages/linux/isosize.md
  50. 1 1
      pages/linux/lastcomm.md
  51. 1 1
      pages/linux/lvextend.md
  52. 1 1
      pages/linux/lvresize.md
  53. 1 1
      pages/linux/medusa.md
  54. 1 1
      pages/linux/openfortivpn.md
  55. 1 1
      pages/linux/opkg.md
  56. 36 0
      pages/linux/parted.md
  57. 16 0
      pages/linux/resolveip.md
  58. 1 1
      pages/linux/rtcwake.md
  59. 1 1
      pages/linux/slapt-get.md
  60. 25 0
      pages/linux/slapt-src.md
  61. 28 0
      pages/linux/spi.md
  62. 1 1
      pages/linux/vipw.md
  63. 1 1
      pages/linux/x11vnc.md
  64. 1 1
      pages/osx/GetFileInfo.md
  65. 1 1
      pages/osx/whatis.md
  66. 5 0
      scripts/deploy.sh
  67. 14 14
      scripts/pdf/basic.css
  68. 74 63
      scripts/pdf/render.py

+ 13 - 0
.github/workflows/ci.yml

@@ -28,6 +28,19 @@ jobs:
     - name: Build
       run: bash scripts/build.sh
 
+    - name: Setup Python for PDF generation
+      if: github.repository == 'tldr-pages/tldr' && github.ref == 'refs/heads/master'
+      uses: actions/setup-python@v2
+      with:
+        python-version: '3.x'
+
+    - name: Build PDF
+      if: github.repository == 'tldr-pages/tldr' && github.ref == 'refs/heads/master'
+      run: |
+        cd scripts/pdf/
+        pip3 install -r requirements.txt
+        python3 render.py ../../pages -c solarized-light
+
     - name: Deploy
       if: github.repository == 'tldr-pages/tldr' && github.ref == 'refs/heads/master'
       run: bash scripts/deploy.sh

+ 6 - 0
MAINTAINERS.md

@@ -35,6 +35,8 @@ If you are an owner of the organization, you should be able to see an automated
   [19 November 2019](https://github.com/tldr-pages/tldr/issues/3580) — present
 - **Proscream ([@Proscream](https://github.com/Proscream))**:
   [22 November 2019](https://github.com/tldr-pages/tldr/issues/3592) — present
+- **Sahil Dhiman ([@sahilister](https://github.com/sahilister))**:
+  [05 December 2020](https://github.com/tldr-pages/tldr/issues/4994) — present
 - Lucas Schneider ([@schneiderl](https://github.com/schneiderl)):
   [11 April 2019](https://github.com/tldr-pages/tldr/issues/2898) — [17 January 2019](https://github.com/tldr-pages/tldr/issues/3764)
 - Ein Verne ([@einverne](https://github.com/einverne)):
@@ -43,6 +45,8 @@ If you are an owner of the organization, you should be able to see an automated
   [30 November 2019](https://github.com/tldr-pages/tldr/issues/3636) — [17 December 2019](https://github.com/tldr-pages/tldr/issues/3663)
 - Iván Hernández Cazorla ([@ivanhercaz](https://github.com/ivanhercaz)):
   [24 December 2019](https://github.com/tldr-pages/tldr/issues/3690) — [5 January 2020](https://github.com/tldr-pages/tldr/issues/3736)
+- Axel Navarro ([@navarroaxel](https://github.com/navarroaxel)):
+  [24 August 2020](https://github.com/tldr-pages/tldr/issues/4291) — [05 October 2020](https://github.com/tldr-pages/tldr/issues/4504)
 
 ## Organization members
 
@@ -56,6 +60,8 @@ An automated list can be found [here](https://github.com/orgs/tldr-pages/people)
   [12 January 2020](https://github.com/tldr-pages/tldr/issues/3738) — present
 - **Lucas Schneider ([@schneiderl](https://github.com/schneiderl))**:
   [17 January 2019](https://github.com/tldr-pages/tldr/issues/3764) — present
+- **Axel Navarro ([@navarroaxel](https://github.com/navarroaxel))**:
+  [05 October 2020](https://github.com/tldr-pages/tldr/issues/4504) — present
 - Owen Voke ([@owenvoke](https://github.com/owenvoke))
   [26 August 2018](https://github.com/tldr-pages/tldr/issues/2258) — [8 May 2019](https://github.com/tldr-pages/tldr/issues/2989)
 - Marco Bonelli ([@mebeim](https://github.com/mebeim)):

+ 1 - 0
README.md

@@ -115,6 +115,7 @@ both for the command line and for other platforms:
   or `apt-get install tldr` on Debian-based distributions
   - [fast-tldr](https://github.com/gutjuri/fast-tldr)
 - [Java client](https://github.com/seenukarthi/tldr-java-client)
+- [Keypirinha Plugin](https://github.com/ronan696/keypirinha-tldr)
 - [Node.js client](https://github.com/tldr-pages/tldr-node-client):
   `npm install -g tldr`
 - [OCaml client](https://github.com/RosalesJ/tldr-ocaml): `opam install tldr`

+ 41 - 0
pages.it/common/nmap.md

@@ -0,0 +1,41 @@
+# nmap
+
+> Nmap è un tool per port scanning ed esplorazione di rete.
+> Alcune funzionalità diventano attive solamente con privilegi d'amministratore.
+> Ulteriori informazioni: <https://nmap.org>.
+
+- Controlla se un indirizzo IP è attivo, e indovina il suo sistema operativo:
+
+`nmap -O {{ip_o_nome_host}}`
+
+- Cerca di determinare se gli host specificati sono attivi e quali sono i loro nomi:
+
+`nmap -sn {{ip_o_nome_host}} {{opzionale_altro_indirizzo}}`
+
+- Come sopra, ma esegui una scansione della porta TCP predefinita 1000 se l'host sembra attivo:
+
+`nmap {{ip_o_nome_host}} {{opzionale_altro_indirizzo}}`
+
+- Attiva scripts, segnalazione di servizi, OS fingerprinting e traceroute:
+
+`nmap -A {{indirizzo_o_indirizzi}}`
+
+- Velocizza esecuzione dando per scontato una buona connessione di rete:
+
+`nmap -T4 {{indirizzo_o_indirizzi}}`
+
+- Scansiona una specifica lista di porte (usa -p- per tutte le porte 1-65535):
+
+`nmap -p {{porta1,porta2,…,portaN}} {{indirizzo_o_indirizzi}}`
+
+- Esegui scansione TCP e UDP (usa -sU per usare solo UDP, -sZ per SCTP, -sO per IP):
+
+`nmap -sSU {{indirizzo_o_indirizzi}}`
+
+- Esegui una scansione di cifratori TLS verso un host per individuarne i cifratori supportati e i protocolli SSL/TLS:
+
+`nmap --script ssl-enum-ciphers {{indirizzo_o_indirizzi}} -p 443`
+
+- Determina vulnerabilità e informazioni di un host eseguendo una scansione di tutte le porte, servizi e versioni con tutti gli script di default NSE attivi:
+
+`nmap -sC -sV {{indirizzo_o_indirizzi}}`

+ 1 - 1
pages.ko/common/bg.md

@@ -8,4 +8,4 @@
 
 - 특정 작업을 재개하고(`jobs -l` 를 사용하여 ID 가져오기) background에서 실행:
 
-`bg {{job_id}}`
+`bg %{{job_id}}`

+ 1 - 1
pages.zh/common/bg.md

@@ -8,4 +8,4 @@
 
 - 恢复特定的任务 (使用 `jobs -l` 可以获取任务ID) 并在后台运行:
 
-`bg {{job_id}}`
+`bg %{{job_id}}`

+ 28 - 0
pages/common/2to3.md

@@ -0,0 +1,28 @@
+# 2to3
+
+> Automated Python 2 to 3 code translation.
+> More information: <https://docs.python.org/3/library/2to3.html>.
+
+- Display changes that would be performed:
+
+`2to3 {{path/to/file.py}}`
+
+- Convert a Python 2 file to Python 3:
+
+`2to3 --write {{path/to/file.py}}`
+
+- Convert a specified Python 2 feature to Python 3:
+
+`2to3 --write {{file.py}} --fix={{raw_input}} --fix={{print}}`
+
+- Convert all features except *raw_input* the specified ones to Python 3:
+
+`2to3 --nofix={{raw_input}} --fix={{print}} example.py`
+
+- Display the list of available transformation features:
+
+`2to3 --list-fixes`
+
+- Convert an entire directory:
+
+`2to3 --output-dir={{path/to/code_python3_version}} --write-unchanged-files --nobackups {{path/to/code_python2_version}}`

+ 1 - 1
pages/common/bg.md

@@ -8,4 +8,4 @@
 
 - Resume a specific job (use `jobs -l` to get its ID) and run it in the background:
 
-`bg {{job_id}}`
+`bg %{{job_id}}`

+ 24 - 0
pages/common/brotli.md

@@ -0,0 +1,24 @@
+# Brotli
+
+> Compress/uncompress files with brotli compression.
+> More information: <https://github.com/google/brotli>.
+
+- Compress a file, creating a compressed version next to the file:
+
+`brotli {{file.ext}}`
+
+- Decompress a file, creating an uncompressed version next to the file:
+
+`brotli -d {{file.ext}}.br`
+
+- Compress a file specifying the output filename:
+
+`brotli {{file.ext}} -o {{compressed_file.ext.br}}`
+
+- Decompress a brotli file specifying the output filename:
+
+`brotli -d {{compressed_file.ext.br}} -o {{file.ext}}`
+
+- Specify the compression level. 1=Fastest (Worst), 11=Slowest (Best):
+
+`brotli -q {{11}} {{file.ext}} -o {{compressed_file.ext.br}}`

+ 28 - 0
pages/common/conan.md

@@ -0,0 +1,28 @@
+# conan
+
+> The open source, decentralized and multi-platform package manager to create and share all your native binaries.
+> More information: <https://conan.io/>.
+
+- Install packages based on conanfile.txt:
+
+`conan install {{.}}`
+
+- Install packages and create configuation files for a specific generator:
+
+`conan install -g {{generator}}`
+
+- Install packages, building from source:
+
+`conan install {{.}} --build`
+
+- Search for locally installed packages:
+
+`conan search {{package}}`
+
+- Search for remote packages:
+
+`conan search {{package}} -r {{remote}}`
+
+- List remotes:
+
+`conan remote --list`

+ 1 - 1
pages/common/emulator.md

@@ -19,7 +19,7 @@
 
 `emulator -avd {{name}} -camera-back {{none|emulated|webcamN}}`
 
-- Start an emulator, with a maximun network speed:
+- Start an emulator, with a maximum network speed:
 
 `emulator -avd {{name}} -netspeed {{gsm|hscsd|gprs|edge|hsdpa|lte|evdo|full}}`
 

+ 20 - 0
pages/common/etcd.md

@@ -0,0 +1,20 @@
+# etcd
+
+> A distributed, reliable key-value store for the most critical data of a distributed system.
+> More information: <https://etcd.io>.
+
+- Start a single-node etcd cluster:
+
+`etcd`
+
+- Start a single-node etcd cluster, listening for client requests on a custom url:
+
+`etcd --advertise-client-urls {{http://127.0.0.1:1234}} --listen-client-urls {{http://127.0.0.1:1234}}`
+
+- Start a single-node etcd cluster with a custom name:
+
+`etcd --name {{my_etcd_cluster}}`
+
+- Start a single-node etcd cluster with extensive metrics available at http://localhost:2379/debug/pprof/:
+
+`etcd --enable-pprof --metrics extensive`

+ 37 - 0
pages/common/etcdctl.md

@@ -0,0 +1,37 @@
+# etcdctl
+
+> CLI interface for interacting with `etcd`, a highly-available key-value pair store.
+> Etcd stores data in hierarchically organized directories, as in a standard filesystem.
+> More information: <https://etcd.io/docs/latest/dev-guide/interacting_v3/>.
+
+- Display the value associated with a specified key:
+
+`etcdctl get {{my/key}}`
+
+- Store a key-value pair:
+
+`etcdctl put {{my/key}} {{my_value}}`
+
+- Delete a key-value pair:
+
+`etcdctl del {{my/key}}`
+
+- Store a key-value pair, reading the value from a file:
+
+`etcdctl put {{my/file}} < {{path/to/file.txt}}`
+
+- Save a snapshot of the etcd keystore:
+
+`etcdctl snapshot save {{path/to/snapshot.db}}`
+
+- Restore a snapshot of an etcd keystore (restart the etcd server afterwards):
+
+`etcdctl snapshot restore {{path/to/snapshot.db}}`
+
+- Add a user:
+
+`etcdctl user add {{my_user}}`
+
+- Watch a key for changes:
+
+`etcdctl watch {{my/key}}`

+ 4 - 0
pages/common/fd.md

@@ -23,3 +23,7 @@
 - Include ignored and hidden files in the search:
 
 `fd --hidden --no-ignore {{pattern}}`
+
+- Execute a command on each search result returned:
+
+`fd {{pattern}} --exec {{command}}`

+ 1 - 1
pages/common/fg.md

@@ -8,4 +8,4 @@
 
 - Bring a specific job to foreground:
 
-`fg {{job_id}}`
+`fg %{{job_id}}`

+ 1 - 1
pages/common/fgrep.md

@@ -23,6 +23,6 @@
 
 `fgrep -v {{^regex$}} {{path/to/file}}`
 
-- Display filenames whose content matchs the regular expression at least once:
+- Display filenames whose content matches the regular expression at least once:
 
 `fgrep -l {{^regex$}} {{path/to/file1}} {{path/to/file2}}`

+ 2 - 6
pages/common/fisher.md

@@ -20,14 +20,10 @@
 
 `fisher ls`
 
-- Show available plugins:
-
-`fisher ls-remote`
-
 - Update plugins:
 
-`fisher up`
+`fisher update`
 
 - Remove one or more plugins:
 
-`fisher rm {{plugin1}} {{plugin2}}`
+`fisher remove {{plugin1}} {{plugin2}}`

+ 20 - 0
pages/common/flow.md

@@ -0,0 +1,20 @@
+# flow
+
+> A static type checker for JavaScript.
+> More information: <https://flow.org>.
+
+- Run a flow check:
+
+`flow`
+
+- Check which files are being checked by flow:
+
+`flow ls`
+
+- Run a type coverage check on all files in a directory:
+
+`flow batch-coverage --show-all --strip-root {{path/to/directory}}`
+
+- Display line-by-line type coverage stats:
+
+`flow coverage --color {{path/to/file.jsx}}`

+ 1 - 1
pages/common/flutter.md

@@ -29,4 +29,4 @@
 
 - Build a release APK targeting most modern smartphones:
 
-`flutter build apk --target-platform {{android-arm}} {{android-arm64}}`
+`flutter build apk --target-platform {{android-arm}},{{android-arm64}}`

+ 20 - 0
pages/common/from.md

@@ -0,0 +1,20 @@
+# from
+
+> Prints mail header lines from the current user's mailbox.
+> More information: <https://mailutils.org/manual/html_chapter/Programs.html#frm-and-from>.
+
+- List mail:
+
+`from`
+
+- Display the number of messages stored:
+
+`from --count`
+
+- List mail in the specified mailbox directory:
+
+`MAIL={{path/to/mailbox}} from`
+
+- Print the mail from the specified address:
+
+`from --sender={{me@example.com}}`

+ 1 - 1
pages/common/git-lfs.md

@@ -19,7 +19,7 @@
 
 `git lfs track`
 
-- List tracked files that have been commited:
+- List tracked files that have been committed:
 
 `git lfs ls-files`
 

+ 1 - 1
pages/common/git-prune.md

@@ -1,7 +1,7 @@
 # git prune
 
 > Git command for pruning all unreachable objects from the object database.
-> This command is often not used directely but as an internal command that is used by git gc.
+> This command is often not used directly but as an internal command that is used by git gc.
 > More information: <https://git-scm.com/docs/git-prune>.
 
 - Report what would be removed by git prune without removing it:

+ 1 - 1
pages/common/git-shortlog.md

@@ -11,7 +11,7 @@
 
 `git shortlog -n`
 
-- View a summary of all the commits made, grouped by the commiter identities (name and email):
+- View a summary of all the commits made, grouped by the committer identities (name and email):
 
 `git shortlog -c`
 

+ 0 - 0
pages/linux/htop.md → pages/common/htop.md


+ 1 - 1
pages/common/iverilog.md

@@ -13,7 +13,7 @@
 
 - Compile and run explicitly using the VVP runtime:
 
-`iverilog -o {{execuable}} -tvvp {{source.v}}`
+`iverilog -o {{executable}} -tvvp {{source.v}}`
 
 - Compile using Verilog library files from a different path:
 

+ 1 - 1
pages/common/jhipster.md

@@ -15,7 +15,7 @@
 
 `jhipster --skip-client`
 
-- Apply lastest JHipster updates to the project:
+- Apply latest JHipster updates to the project:
 
 `jhipster upgrade`
 

+ 1 - 1
pages/common/jobs.md

@@ -8,7 +8,7 @@
 
 - Show status of a particular job:
 
-`jobs {{job_id}}`
+`jobs %{{job_id}}`
 
 - Show status and process IDs of all jobs:
 

+ 1 - 1
pages/common/kops.md

@@ -1,7 +1,7 @@
 # kops
 
 > Create, destroy, upgrade and maintain Kubernetes clusters from the command line.
-> More informations: <https://github.com/kubernetes/kops/>.
+> More information: <https://github.com/kubernetes/kops/>.
 
 - Create a cluster from the configuration specification:
 

+ 18 - 5
pages/common/lynx.md

@@ -1,18 +1,31 @@
 # lynx
 
 > Command-line web browser.
+> More information: <https://lynx.browser.org>.
 
 - Visit a website:
 
-`lynx {{https://duckduckgo.com}}`
+`lynx {{example.com}}`
 
-- Navigate forwards and backwards through the links on a page:
+- Apply restrictions for anonymous account:
 
-`Up arrow key, Down arrow key`
+`lynx -anonymous {{example.com}}`
+
+- Turn on mouse support, if available:
+
+`lynx -use_mouse {{example.com}}`
+
+- Force color mode on, if available:
 
-- Follow the currently selected link:
+`lynx -color {{example.com}}`
 
-`Enter or the right arrow key`
+- Open a link, using a specific file to read and write cookies:
+
+`lynx -cookie_file={{path/to/file}} {{example.com}}`
+
+- Navigate forwards and backwards through the links on a page:
+
+`Up arrow key, Down arrow key`
 
 - Go back to the previously displayed page:
 

+ 1 - 1
pages/common/lzop.md

@@ -11,6 +11,6 @@
 
 `lzop -d {{file}}.lzo`
 
-- Compress a file, while specifing the compression level. 0 = Worst, 9 = Best (Default level is 3):
+- Compress a file, while specifying the compression level. 0 = Worst, 9 = Best (Default level is 3):
 
 `lzop -{{level}} {{file}}`

+ 1 - 1
pages/common/mr.md

@@ -7,7 +7,7 @@
 
 `mr register`
 
-- Update repositories in 5 concurent jobs:
+- Update repositories in 5 concurrent jobs:
 
 `mr -j{{5}} update`
 

+ 1 - 1
pages/common/nmap.md

@@ -36,6 +36,6 @@
 
 `nmap --script ssl-enum-ciphers {{address_or_addresses}} -p 443`
 
-- Perform full port, service, version detection scan with all default NSE scripts active against a host to determin weaknesses and info:
+- Perform full port, service, version detection scan with all default NSE scripts active against a host to determine weaknesses and info:
 
 `nmap -sC -sV {{address_or_addresses}}`

+ 1 - 1
pages/common/openssl-genrsa.md

@@ -1,7 +1,7 @@
 # openssl genrsa
 
 > OpenSSL command to generate RSA private keys.
-> More information: <https://www.openssl.org/docs/man1.0.2/man1/genrsa.html>.
+> More information: <https://www.openssl.org/docs/manmaster/man1/openssl-genrsa.html>.
 
 - Generate an RSA private key of 2048 bits to stdout:
 

+ 12 - 0
pages/common/openssl-prime.md

@@ -0,0 +1,12 @@
+# openssl prime
+
+> OpenSSL command to compute prime numbers.
+> More information: <https://www.openssl.org/docs/manmaster/man1/openssl-prime.html>.
+
+- Generate a 2048bit prime number and display it in hexadecimal:
+
+`openssl prime -generate -bits 2048 -hex`
+
+- Check if a given number is prime:
+
+`openssl prime {{number}}`

+ 1 - 1
pages/common/pipx.md

@@ -15,6 +15,6 @@
 
 `pipx list`
 
-- Run an app in a temporary virtual environment with a pakage name different from the executable:
+- Run an app in a temporary virtual environment with a package name different from the executable:
 
 `pipx run --spec {{httpx-cli}} {{httpx}} {{http://www.github.com}}`

+ 4 - 0
pages/common/redis-cli.md

@@ -26,3 +26,7 @@
 - Execute Redis command:
 
 `redis-cli {{redis_command}}`
+
+- Connect to the local cluster:
+
+`redis-cli -c`

+ 1 - 1
pages/common/reflac.md

@@ -19,6 +19,6 @@
 
 `reflac --recursive {{path/to/directory}}`
 
-- Perserve file modification times:
+- Preserve file modification times:
 
 `reflac --preserve {{path/to/directory}}`

+ 1 - 1
pages/common/scheme.md

@@ -1,6 +1,6 @@
 # scheme
 
-> MIT Scheme language interperter and REPL (interactive shell).
+> MIT Scheme language interpreter and REPL (interactive shell).
 > More information: <https://www.gnu.org/software/mit-scheme>.
 
 - Open an interactive shell (REPL):

+ 5 - 0
pages/common/scp.md

@@ -2,11 +2,16 @@
 
 > Secure copy.
 > Copy files between hosts using Secure Copy Protocol over SSH.
+> More information: <https://man.openbsd.org/scp>.
 
 - Copy a local file to a remote host:
 
 `scp {{path/to/local_file}} {{remote_host}}:{{path/to/remote_file}}`
 
+- Use a specific port when connecting to the remote host:
+
+`scp {{path/to/local_file}} -P {{port}} {{remote_host}}:{{path/to/remote_file}}`
+
 - Copy a file from a remote host to a local directory:
 
 `scp {{remote_host}}:{{path/to/remote_file}} {{path/to/local_directory}}`

+ 1 - 1
pages/common/thunderbird.md

@@ -1,4 +1,4 @@
-# thundebird
+# thunderbird
 
 > Email client and RSS reader.
 

+ 28 - 0
pages/common/tmpmail.md

@@ -0,0 +1,28 @@
+# tmpmail
+
+> A temporary email right from your terminal written in POSIX sh.
+> More information: <https://github.com/sdushantha/tmpmail>.
+
+- Create a temporary inbox:
+
+`tmpmail --generate`
+
+- List messages and their numeric ID:
+
+`tmpmail`
+
+- Display the most recent received email:
+
+`tmpmail --recent`
+
+- Open a specific message:
+
+`tmpmail {{email_id}}`
+
+- View email as raw text without HTML tags:
+
+`tmpmail --text`
+
+- Open email with a specific browser (default is w3m):
+
+`tmpmail --browser {{browser}}`

+ 1 - 1
pages/common/twm.md

@@ -1,6 +1,6 @@
 # twm
 
-> A window manager for the X Window sytem.
+> A window manager for the X Window system.
 > More information: <https://gitlab.freedesktop.org/xorg/app/twm>.
 
 - Connect to the default X server:

+ 28 - 7
pages/common/vimdiff.md

@@ -1,16 +1,37 @@
 # vimdiff
 
-> Open up to four files in vim and show the differences between them.
-> See `vim` documentation for working with files and navigating within a window.
+> Open up two or more files in vim and show the differences between them.
+> See also `vim`.
+> More information: <https://www.vim.org>.
 
-- Open two files and show the differences (up to four files can be compared):
+- Open two files and show the differences:
 
 `vimdiff {{file1}} {{file2}}`
 
-- Open two files using a horizontal window split instead of the default vertical split:
+- Move the cursor to the window on the left|right:
 
-`vimdiff -o {{file1}} {{file2}}`
+`Ctrl + w {{h|l}}`
 
-- Move the cursor to the window on the left|right|up|down:
+- Jump to the next difference:
 
-`Ctrl + w {{h|l|k|j}}`
+`[c`
+
+- Jump to the previous difference:
+
+`]c`
+
+- Copy the highlighted difference from the other window to the current window:
+
+`do`
+
+- Copy the highlighted difference from the current window to the other window:
+
+`dp`
+
+- Update all highlights and folds:
+
+`:diffupdate`
+
+- Toggle the highlighted code fold:
+
+`za`

+ 1 - 1
pages/linux/cewl.md

@@ -7,7 +7,7 @@
 
 `cewl --depth {{2}} --write {{path/to/wordlist.txt}} {{url}}`
 
-- Output an alpha-numeric wordlist from the given URL with words of minimum 5 characters:
+- Output an alphanumeric wordlist from the given URL with words of minimum 5 characters:
 
 `cewl --with-numbers --min_word_length {{5}} {{url}}`
 

+ 1 - 1
pages/linux/e2image.md

@@ -19,6 +19,6 @@
 
 `e2image -r {{/dev/sdXN}} {{path/to/image_file}}`
 
-- Ceate a QCOW2 image file instead of a normal or raw image file:
+- Create a QCOW2 image file instead of a normal or raw image file:
 
 `e2image -Q {{/dev/sdXN}} {{path/to/image_file}}`

+ 1 - 1
pages/linux/guake.md

@@ -2,7 +2,7 @@
 
 > A drop-down terminal for GNOME.
 
-- Toggle Guake visiblity:
+- Toggle Guake visibility:
 
 `F12`
 

+ 2 - 2
pages/linux/htpdate.md

@@ -7,7 +7,7 @@
 
 `sudo htpdate {{host}}`
 
-- Perform simulation of syncronization, without any action:
+- Perform simulation of synchronization, without any action:
 
 `htpdate -q {{host}}`
 
@@ -15,6 +15,6 @@
 
 `sudo htpdate -x {{host}}`
 
-- Set time immediate after the syncronization:
+- Set time immediate after the synchronization:
 
 `sudo htpdate -s {{host}}`

+ 1 - 1
pages/linux/i3.md

@@ -1,7 +1,7 @@
 # i3
 
 > A dynamic tiling window manager.
-> More information:<https://i3wm.org/docs/userguide.html>.
+> More information: <https://i3wm.org/docs/userguide.html>.
 
 - Start i3 (Note that a pre-existing window manager must not be open when this command is run.):
 

+ 1 - 1
pages/linux/isosize.md

@@ -7,7 +7,7 @@
 
 `isosize {{path/to/file.iso}}`
 
-- Diplay the block count and block size of an ISO file:
+- Display the block count and block size of an ISO file:
 
 `isosize --sectors {{path/to/file.iso}}`
 

+ 1 - 1
pages/linux/lastcomm.md

@@ -3,7 +3,7 @@
 > Show last commands executed.
 > More information: <https://manpages.debian.org/stable/acct/lastcomm.1.en.html>.
 
-- Print informations about all of the commands in the acct (record file):
+- Print information about all of the commands in the acct (record file):
 
 `lastcomm`
 

+ 1 - 1
pages/linux/lvextend.md

@@ -10,6 +10,6 @@
 
 `lvextend --size +{{40G}} -r {{logical_volume}}`
 
-- Increase a volume's size to 100% of the free phyiscal volume space:
+- Increase a volume's size to 100% of the free physical volume space:
 
 `lvextend --size {{100}}%FREE {{logical_volume}}`

+ 1 - 1
pages/linux/lvresize.md

@@ -10,6 +10,6 @@
 
 `lvresize --size -{{120G}} -r {{logical_volume}}`
 
-- Increase a volume's size to 100% of the free phyiscal volume space:
+- Increase a volume's size to 100% of the free physical volume space:
 
 `lvresize --size {{100}}%FREE {{logical_volume}}`

+ 1 - 1
pages/linux/medusa.md

@@ -10,7 +10,7 @@
 
 `medusa -M HTTP -h host -u {{username}} -p {{password}} -m USER-AGENT:"{{Agent}}"`
 
-- Execute a brute force against a MySQL server using a file cointaining usernames and a hash:
+- Execute a brute force against a MySQL server using a file containing usernames and a hash:
 
 `medusa -M mysql -h host -U {{path/to/username_file}} -p {{hash}} -m PASS:HASH`
 

+ 1 - 1
pages/linux/openfortivpn.md

@@ -11,7 +11,7 @@
 
 `sudo openfortivpn --config={{path/to/config}}`
 
-- Connect to a VPN by specifiying the host and port:
+- Connect to a VPN by specifying the host and port:
 
 `openfortivpn {{host}}:{{port}}`
 

+ 1 - 1
pages/linux/opkg.md

@@ -22,7 +22,7 @@
 
 `opkg upgrade {{package(s)}}`
 
-- Display informations for a specific package:
+- Display information for a specific package:
 
 `opkg info {{package}}`
 

+ 36 - 0
pages/linux/parted.md

@@ -0,0 +1,36 @@
+# parted
+
+> A partition manipulation program.
+> More information: <https://www.gnu.org/software/parted/parted.html>.
+
+- List partitions on all block devices:
+
+`sudo parted --list`
+
+- Start to manipulate disk partition:
+
+`sudo parted {{/dev/sdX}}`
+
+- Create a new partition table of label-type directly, label-type can be gpt, msdos etc:
+
+`sudo parted --script {{/dev/sdX}} mklabel {{gpt}}`
+
+- Show disk partition information in interactive mode:
+
+`print`
+
+- Select a disk in interactive mode:
+
+`select {{/dev/sdX}}`
+
+- Interactively create a 16GB partition with a given filesystem:
+
+`mkpart {{primary|logical|extended}} {{filesystem}} {{0%}} {{16G}}`
+
+- Resize partition size:
+
+`resizepart {{/dev/sdXN}} {{end_position_of_partition}}`
+
+- Remove partition:
+
+`rm {{/dev/sdXN}}`

+ 16 - 0
pages/linux/resolveip.md

@@ -0,0 +1,16 @@
+# resolveip
+
+> Resolve hostnames to their IP addresses and vice versa.
+> More information: <https://mariadb.com/kb/en/resolveip/>.
+
+- Resolve a hostname to an IP address:
+
+`resolveip {{example.org}}`
+
+- Resolve an IP address to a hostname:
+
+`resolveip {{1.1.1.1}}`
+
+- Silent mode. Produces less output:
+
+`resolveip --silent {{example.org}}`

+ 1 - 1
pages/linux/rtcwake.md

@@ -22,6 +22,6 @@
 
 `sudo rtcwake -m disable`
 
-- Perform a dry run to wakup the computer at a given time. (Press Ctrl + C to abort):
+- Perform a dry run to wakeup the computer at a given time. (Press Ctrl + C to abort):
 
 `sudo rtcwake -m on --date {{hh:ss}}`

+ 1 - 1
pages/linux/slapt-get.md

@@ -17,7 +17,7 @@
 
 - Upgrade all installed packages to their latest available versions:
 
-`slapt-get --upgrade {{package_name}}`
+`slapt-get --upgrade`
 
 - Locate packages of interest by the package name, disk set, or version:
 

+ 25 - 0
pages/linux/slapt-src.md

@@ -0,0 +1,25 @@
+# slapt-src
+
+> A utility to automate building of slackbuilds.
+> SlackBuild sources need to be configured in the slapt-srcrc file.
+> More information: <https://github.com/jaos/slapt-src>.
+
+- Update the list of available slackbuilds and versions:
+
+`slapt-src --update`
+
+- List all available slackbuilds:
+
+`slapt-src --list`
+
+- Fetch, build and install the specified slackbuild(s):
+
+`slapt-src --install {{slackbuild_name}}`
+
+- Locate slackbuilds of interest by their name or description:
+
+`slapt-src --search {{search_term}}`
+
+- Display information about a slackbuild:
+
+`slapt-src --show {{slackbuild_name}}`

+ 28 - 0
pages/linux/spi.md

@@ -0,0 +1,28 @@
+# spi
+
+> A meta package manager that handles both packages and slackbuilds.
+> More information: <https://github.com/gapan/spi>.
+
+- Update the list of available packages and slackbuilds:
+
+`spi --update`
+
+- Install a package or slackbuild:
+
+`spi --install {{package/slackbuild_name}}`
+
+- Upgrade all installed packages to the latest versions available:
+
+`spi --upgrade`
+
+- Locate packages or slackbuilds of interest by package name or description:
+
+`spi {{search_terms}}`
+
+- Display information about a package or slackbuild:
+
+`spi --show {{package/slackbuild_name}}`
+
+- Purge the local package and slackbuild caches:
+
+`spi --clean`

+ 1 - 1
pages/linux/vipw.md

@@ -7,6 +7,6 @@
 
 `vipw`
 
-- Display the current verson of `vipw`:
+- Display the current version of `vipw`:
 
 `vipw --version`

+ 1 - 1
pages/linux/x11vnc.md

@@ -1,6 +1,6 @@
 # x11vnc
 
-> A VNC server that will enable VNC on an existing display ser.
+> A VNC server that will enable VNC on an existing display server.
 > By default, the server will automatically terminate once all clients disconnect from it.
 
 - Launch a VNC server that allows multiple clients to connect:

+ 1 - 1
pages/osx/GetFileInfo.md

@@ -2,7 +2,7 @@
 
 > Get information about a file in an HFS+ directory.
 
-- Display infomation about a given file:
+- Display information about a given file:
 
 `GetFileInfo {{path/to/filename}}`
 

+ 1 - 1
pages/osx/whatis.md

@@ -3,7 +3,7 @@
 > Tool that searches a set of database files containing short descriptions of system commands for keywords.
 > More information: <http://www.linfo.org/whatis.html>.
 
-- Search for informations about keyword:
+- Search for information about keyword:
 
 `whatis {{keyword}}`
 

+ 5 - 0
scripts/deploy.sh

@@ -30,6 +30,11 @@ function upload_assets {
   mv -f "$TLDR_ARCHIVE" "$SITE_HOME/assets/"
   cp -f "$TLDRHOME/index.json" "$SITE_HOME/assets/"
 
+  # Copy PDF to assets
+  if [[ -f "${TLDRHOME}/scripts/pdf/tldr-pages.pdf" ]]; then
+    cp -f "${TLDRHOME}/scripts/pdf/tldr-pages.pdf" "${SITE_HOME}/assets/tldr-book.pdf"
+  fi
+
   cd "$SITE_HOME"
   git add -A
   git commit -m "[GitHub Actions] uploaded assets after commit ${GITHUB_SHA}"

+ 14 - 14
scripts/pdf/basic.css

@@ -1,34 +1,34 @@
 @font-face {
-  font-family: "PT Serif";
-  src: url("pt-serif-web-regular.ttf") format("truetype");
+    font-family: "PT Serif";
+    src: url("pt-serif-web-regular.ttf") format("truetype");
 }
 
 p {
-  margin-left: 2.5em;
+    margin-left: 2.5em;
 }
 
 code {
-  color: darkslategrey;
+    color: darkslategrey;
 }
 
 h1, h2, h4, ul {
-  font-family: "PT Serif";
+    font-family: "PT Serif";
 }
 
 .title-main {
-  text-align: center;
-  margin-top: 6em;
-  font-size: 350%;
+    text-align: center;
+    margin-top: 6em;
+    font-size: 350%;
 }
 
 .title-sub {
-  text-align: center;
-  font-size: 120%;
-  color: darkslategrey;
+    text-align: center;
+    font-size: 120%;
+    color: darkslategrey;
 }
 
 .title-dir {
-  text-align: center;
-  margin-top: 8.2em;
-  font-size: 300%;
+    text-align: center;
+    margin-top: 8.2em;
+    font-size: 300%;
 }

+ 74 - 63
scripts/pdf/render.py

@@ -12,98 +12,109 @@ import glob
 import re
 import markdown
 import argparse
+from datetime import datetime
 
 from weasyprint import HTML
 
+
 def main(loc, colorscheme):
 
-  oslist = []
-  allmd = []
-  group = []
-  ap = []
+    oslist = []
+    allmd = []
+    group = []
+    ap = []
+
+    # Checking correctness of path
+    if not os.path.isdir(loc):
+        print("Invalid directory. Please try again!", file=sys.stderr)
+        sys.exit(1)
+
+    # Writing names of all directories inside 'pages' to a list
+    for os_dir in os.listdir(loc):
+        oslist.append(os_dir)
 
-  # Checking correctness of path
-  if not os.path.isdir(loc):
-    print("Invalid directory. Please try again!", file = sys.stderr)
-    sys.exit(1)
+    oslist.sort()
 
-  # Writing names of all directories inside 'pages' to a list
-  for os_dir in os.listdir(loc):
-    oslist.append(os_dir)
+    # Required strings to create intermediate HTML files
+    header = '<!doctype html><html><head><meta charset="utf-8"><link rel="stylesheet" href="basic.css">'
+    if colorscheme != "basic":
+        header += '<link rel="stylesheet" href="' + colorscheme + '.css"></head><body>\n'
 
-  oslist.sort()
+    header += "</head><body>\n"
+    footer = "</body></html>"
+    title_content = "<h1 class=title-main>tldr pages</h1>" \
+        + "<h4 class=title-sub>Simplified and community-driven man pages</h4>" \
+        + "<h6 class=title-sub><em><small>Generated on " + datetime.now().strftime("%c") + "</small></em></h6>" \
+        + "</body></html>"
 
-  # Required strings to create intermediate HTML files
-  header = '<!doctype html><html><head><meta charset="utf-8"><link rel="stylesheet" href="basic.css">'
-  if colorscheme != "basic":
-    header += '<link rel="stylesheet" href="' + colorscheme + '.css"></head><body>\n'
-  header += "</head><body>\n"
-  footer = "</body></html>"
-  title_content = "<h1 class=title-main>tldr pages</h1><h4 class=title-sub>Simplified and community-driven man pages</h4></body></html>"
+    # Creating title page
+    with open("title.html", "w") as f:
+        f.write(header + title_content)
 
-  # Creating title page
-  with open("title.html", "w") as f:
-    f.write(header + title_content)
+    group.append(HTML("title.html").render())
 
-  group.append(HTML("title.html").render())
+    for operating_sys in oslist:
 
-  for operating_sys in oslist:
+        i = 1
 
-    # Required string to create directory title pages
-    dir_title = "<h2 class=title-dir>" + operating_sys.capitalize() + "</h2></body></html>"
+        # Required string to create directory title pages
+        dir_title = "<h2 class=title-dir>" + \
+            operating_sys.capitalize() + "</h2></body></html>"
 
-    # Creating directory title page for current directory
-    with open("dir_title.html", "w") as os_html:
-      os_html.write(header + dir_title)
+        # Creating directory title page for current directory
+        with open("dir_title.html", "w") as os_html:
+            os_html.write(header + dir_title)
 
-    group.append(HTML("dir_title.html").render())
+        group.append(HTML("dir_title.html").render())
 
-    # Creating a list of all md files in the current directory
-    for temp in glob.glob(os.path.join(loc, operating_sys, "*.md")):
-      allmd.append(temp)
+        # Creating a list of all md files in the current directory
+        for temp in glob.glob(os.path.join(loc, operating_sys, "*.md")):
+            allmd.append(temp)
 
-    # Sorting all filenames in the directory, to maintain the order of the PDF
-    allmd.sort()
+        # Sorting all filenames in the directory, to maintain the order of the PDF
+        allmd.sort()
 
     # Conversion of Markdown to HTML
     for page_number, md in enumerate(allmd, start=1):
 
-      with open(md, "r") as inp:
-        text = inp.readlines()
+            with open(md, "r") as inp:
+                text = inp.readlines()
 
-      with open("htmlout.html", "w") as out:
-        out.write(header)
+            with open("htmlout.html", "w") as out:
+                out.write(header)
 
-        for line in text:
-          if re.match(r'^>', line):
-            line = line[:0] + '####' + line[1:]
-          html = markdown.markdown(line)
-          out.write(html)
-        out.write(footer)
+                for line in text:
+                    if re.match(r'^>', line):
+                        line = line[:0] + '####' + line[1:]
+                    html = markdown.markdown(line)
+                    out.write(html)
+                out.write(footer)
 
-      group.append(HTML("htmlout.html").render())
-      print("Rendered page {} of the directory {}".format(str(page_number), operating_sys))
+            group.append(HTML("htmlout.html").render())
+            print("Rendered page {} of the directory {}".format(
+                str(i), operating_sys))
+            i += 1
 
-    allmd.clear()
+        allmd.clear()
 
-  # Merging all the documents into a single PDF
-  for doc in group:
-    for p in doc.pages:
-      ap.append(p)
+    # Merging all the documents into a single PDF
+    for doc in group:
+        for p in doc.pages:
+            ap.append(p)
 
-  # Writing the PDF to disk, preserving metadata of first `tldr` page
-  group[2].copy(ap).write_pdf('tldr-pages.pdf')
+    # Writing the PDF to disk, preserving metadata of first `tldr` page
+    group[2].copy(ap).write_pdf('tldr-pages.pdf')
 
-  if os.path.exists("tldr-pages.pdf"):
-    print("\nCreated tldr-pages.pdf in the current directory!\n")
+    if os.path.exists("tldr-pages.pdf"):
+        print("\nCreated tldr-pages.pdf in the current directory!\n")
 
-  # Removing unnecessary intermediate files
-  try:
-    os.remove("htmlout.html")
-    os.remove("title.html")
-    os.remove("dir_title.html")
-  except OSError:
-    print("Error removing temporary file(s)")
+    # Removing unnecessary intermediate files
+    try:
+        os.remove("htmlout.html")
+        os.remove("title.html")
+        os.remove("dir_title.html")
+    except OSError:
+        print("Error removing temporary file(s)")
 
 
 if __name__ == "__main__":