From 1809b30d8788bb3ab7753d42fcdbc6d70195988f Mon Sep 17 00:00:00 2001 From: Patrice Denis Date: Wed, 26 Jun 2024 15:01:03 +0000 Subject: [PATCH 1/9] Update tldr.py #236 add aliases to OS_DIRECTORY variable --- tldr.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tldr.py b/tldr.py index ed8192e..3c458a2 100755 --- a/tldr.py +++ b/tldr.py @@ -42,13 +42,17 @@ URLOPEN_CONTEXT.verify_mode = ssl.CERT_NONE OS_DIRECTORIES = { - "linux": "linux", + "android": "android", "darwin": "osx", "freebsd": "freebsd", - "openbsd": "openbsd", + "linux": "linux", + "macos": "osx" "netbsd": "netbsd", + "openbsd": "openbsd", + "osx": "osx", "sunos": "sunos", "win32": "windows" + "windows": "windows" } From a1b9ef1e64c79ea62a26fd16aac20cf6f193459f Mon Sep 17 00:00:00 2001 From: Patrice Denis Date: Wed, 26 Jun 2024 15:10:41 +0000 Subject: [PATCH 2/9] Update tldr.py add_argument platforms update supported platforms in the parser --platform add_argument method --- tldr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tldr.py b/tldr.py index 3c458a2..83dc779 100755 --- a/tldr.py +++ b/tldr.py @@ -519,9 +519,9 @@ def create_parser() -> ArgumentParser: nargs=1, default=None, type=str, - choices=['linux', 'osx', 'sunos', 'windows', 'common'], + choices=['android', 'freebsd', 'linux', 'netbsd', 'openbsd', 'osx', 'sunos', 'windows', 'common'], metavar='PLATFORM', - help="Override the operating system [linux, osx, sunos, windows, common]" + help="Override the operating system [android, freebsd, linux, netbsd, openbsd, osx, sunos, windows, common]" ) parser.add_argument('-l', '--list', From 4595993edc26c0a51d926c53d86571e6947d6492 Mon Sep 17 00:00:00 2001 From: Patrice Denis Date: Wed, 26 Jun 2024 15:38:21 +0000 Subject: [PATCH 3/9] Update tldr.py : fix syntax error in def of OS_DIRECTORIES --- tldr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tldr.py b/tldr.py index 83dc779..5d009b4 100755 --- a/tldr.py +++ b/tldr.py @@ -41,7 +41,7 @@ URLOPEN_CONTEXT.check_hostname = False URLOPEN_CONTEXT.verify_mode = ssl.CERT_NONE -OS_DIRECTORIES = { + = { "android": "android", "darwin": "osx", "freebsd": "freebsd", @@ -51,7 +51,7 @@ "openbsd": "openbsd", "osx": "osx", "sunos": "sunos", - "win32": "windows" + "win32": "windows", "windows": "windows" } From 10e6d28cebff40ab69a7e96a03d821b3d8b37a4e Mon Sep 17 00:00:00 2001 From: Patrice Denis Date: Wed, 26 Jun 2024 15:42:15 +0000 Subject: [PATCH 4/9] Update tldr.py : again fix OS_DIRECTORIES def --- tldr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tldr.py b/tldr.py index 5d009b4..a0f6ea7 100755 --- a/tldr.py +++ b/tldr.py @@ -41,7 +41,7 @@ URLOPEN_CONTEXT.check_hostname = False URLOPEN_CONTEXT.verify_mode = ssl.CERT_NONE - = { + OS_DIRECTORIES = { "android": "android", "darwin": "osx", "freebsd": "freebsd", From cf706cbba9b30d93492d48a3ecc57b6072259a59 Mon Sep 17 00:00:00 2001 From: Patrice Denis Date: Wed, 26 Jun 2024 16:08:29 +0000 Subject: [PATCH 5/9] Update tldr.py : fix space typo in OS_DIRECTORIES definition Co-authored-by: spageektti --- tldr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tldr.py b/tldr.py index a0f6ea7..cfbe1cc 100755 --- a/tldr.py +++ b/tldr.py @@ -41,7 +41,7 @@ URLOPEN_CONTEXT.check_hostname = False URLOPEN_CONTEXT.verify_mode = ssl.CERT_NONE - OS_DIRECTORIES = { +OS_DIRECTORIES = { "android": "android", "darwin": "osx", "freebsd": "freebsd", From c8fada31b7f2aa7587009fecdf44fa99b596ef6e Mon Sep 17 00:00:00 2001 From: Patrice Denis Date: Wed, 26 Jun 2024 16:24:32 +0000 Subject: [PATCH 6/9] Update tldr.py : fix coma typo in OS_DIRECTORIES def Co-authored-by: spageektti --- tldr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tldr.py b/tldr.py index cfbe1cc..4ad250d 100755 --- a/tldr.py +++ b/tldr.py @@ -46,7 +46,7 @@ "darwin": "osx", "freebsd": "freebsd", "linux": "linux", - "macos": "osx" + "macos": "osx", "netbsd": "netbsd", "openbsd": "openbsd", "osx": "osx", From 48c38579b02b9345b1d0e2b0fb049f0a3f7e53ac Mon Sep 17 00:00:00 2001 From: Patrice Denis Date: Wed, 26 Jun 2024 16:55:38 +0000 Subject: [PATCH 7/9] Update tldr.py : fix too long parser platform options add multi line support --- tldr.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tldr.py b/tldr.py index 4ad250d..db1c33f 100755 --- a/tldr.py +++ b/tldr.py @@ -519,9 +519,11 @@ def create_parser() -> ArgumentParser: nargs=1, default=None, type=str, - choices=['android', 'freebsd', 'linux', 'netbsd', 'openbsd', 'osx', 'sunos', 'windows', 'common'], + choices=['android', 'freebsd', 'linux', 'netbsd', 'openbsd', 'osx', 'sunos', + 'windows', 'common'], metavar='PLATFORM', - help="Override the operating system [android, freebsd, linux, netbsd, openbsd, osx, sunos, windows, common]" + help="Override the operating system [android, freebsd, linux, netbsd, openbsd," + "osx, sunos, windows, common]" ) parser.add_argument('-l', '--list', From 69d2ed4957c5fef4774afb7e14f13663cf710cb8 Mon Sep 17 00:00:00 2001 From: Patrice Denis Date: Wed, 26 Jun 2024 17:19:53 +0000 Subject: [PATCH 8/9] Update tldr.py --- tldr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tldr.py b/tldr.py index db1c33f..7eb4a95 100755 --- a/tldr.py +++ b/tldr.py @@ -523,7 +523,7 @@ def create_parser() -> ArgumentParser: 'windows', 'common'], metavar='PLATFORM', help="Override the operating system [android, freebsd, linux, netbsd, openbsd," - "osx, sunos, windows, common]" + " osx, sunos, windows, common]" ) parser.add_argument('-l', '--list', From 656dfffcb42c151fcf4c9e38e92c866b6c23f4ff Mon Sep 17 00:00:00 2001 From: Patrice Denis Date: Thu, 27 Jun 2024 00:31:01 +0200 Subject: [PATCH 9/9] Update tldr.py : fix lint e131 indent error --- tldr.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tldr.py b/tldr.py index 7eb4a95..88000e6 100755 --- a/tldr.py +++ b/tldr.py @@ -522,8 +522,9 @@ def create_parser() -> ArgumentParser: choices=['android', 'freebsd', 'linux', 'netbsd', 'openbsd', 'osx', 'sunos', 'windows', 'common'], metavar='PLATFORM', - help="Override the operating system [android, freebsd, linux, netbsd, openbsd," - " osx, sunos, windows, common]" + help="Override the operating system " + "[android, freebsd, linux, netbsd, openbsd," + " osx, sunos, windows, common]" ) parser.add_argument('-l', '--list',