From 2e33afbe18d553eee0808ecbb64462ca83c68446 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Sun, 10 Dec 2023 10:53:28 -0800 Subject: [PATCH] doc cleanup --- docs/parsers/deb_packages_index.md | 138 ------------------ docs/parsers/iso_datetime.md | 37 ----- docs/parsers/pkg_index_alpine.md | 126 ---------------- .../parsers/{apkindex.md => pkg_index_apk.md} | 14 +- 4 files changed, 7 insertions(+), 308 deletions(-) delete mode 100644 docs/parsers/deb_packages_index.md delete mode 100644 docs/parsers/iso_datetime.md delete mode 100644 docs/parsers/pkg_index_alpine.md rename docs/parsers/{apkindex.md => pkg_index_apk.md} (91%) diff --git a/docs/parsers/deb_packages_index.md b/docs/parsers/deb_packages_index.md deleted file mode 100644 index ea718414..00000000 --- a/docs/parsers/deb_packages_index.md +++ /dev/null @@ -1,138 +0,0 @@ -[Home](https://kellyjonbrazil.github.io/jc/) - - -# jc.parsers.deb\_packages\_index - -jc - JSON Convert Debian Packages Index file parser - -Usage (cli): - - $ cat Packages | jc --deb-packages-index - -Usage (module): - - import jc - result = jc.parse('deb_packages_index', deb_package_index_output) - -Schema: - - [ - { - "package": string, - "version": string, - "architecture": string, - "section": string, - "priority": string, - "installed_size": integer, - "maintainer": string, - "description": string, - "homepage": string, - "depends": string, - "conflicts": string, - "replaces": string, - "vcs_git": string, - "sha256": string, - "size": integer, - "vcs_git": string, - "filename": string - } - ] - -Examples: - - $ cat Packages | jc --deb-packages-index - [ - { - "package": "aspnetcore-runtime-2.1", - "version": "2.1.22-1", - "architecture": "amd64", - "section": "devel", - "priority": "standard", - "installed_size": 71081, - "maintainer": "Microsoft ", - "description": "Microsoft ASP.NET Core 2.1.22 Shared Framework", - "homepage": "https://www.asp.net/", - "depends": "libc6 (>= 2.14), dotnet-runtime-2.1 (>= 2.1.22)", - "sha256": "48d4e78a7ceff34105411172f4c3e91a0359b3929d84d26a493...", - "size": 21937036, - "filename": "pool/main/a/aspnetcore-runtime-2.1/aspnetcore-run..." - }, - { - "package": "azure-functions-core-tools-4", - "version": "4.0.4590-1", - "architecture": "amd64", - "section": "devel", - "priority": "optional", - "maintainer": "Ahmed ElSayed ", - "description": "Azure Function Core Tools v4", - "homepage": "https://docs.microsoft.com/en-us/azure/azure-func...", - "conflicts": "azure-functions-core-tools-2, azure-functions-co...", - "replaces": "azure-functions-core-tools-2, azure-functions-cor...", - "vcs_git": "https://github.com/Azure/azure-functions-core-tool...", - "sha256": "a2a4f99d6d98ba0a46832570285552f2a93bab06cebbda2afc7...", - "size": 124417844, - "filename": "pool/main/a/azure-functions-core-tools-4/azure-fu..." - } - ] - - $ cat Packages | jc --deb-packages-index -r - [ - { - "package": "aspnetcore-runtime-2.1", - "version": "2.1.22-1", - "architecture": "amd64", - "section": "devel", - "priority": "standard", - "installed_size": "71081", - "maintainer": "Microsoft ", - "description": "Microsoft ASP.NET Core 2.1.22 Shared Framework", - "homepage": "https://www.asp.net/", - "depends": "libc6 (>= 2.14), dotnet-runtime-2.1 (>= 2.1.22)", - "sha256": "48d4e78a7ceff34105411172f4c3e91a0359b3929d84d26a493...", - "size": "21937036", - "filename": "pool/main/a/aspnetcore-runtime-2.1/aspnetcore-run..." - }, - { - "package": "azure-functions-core-tools-4", - "version": "4.0.4590-1", - "architecture": "amd64", - "section": "devel", - "priority": "optional", - "maintainer": "Ahmed ElSayed ", - "description": "Azure Function Core Tools v4", - "homepage": "https://docs.microsoft.com/en-us/azure/azure-func...", - "conflicts": "azure-functions-core-tools-2, azure-functions-co...", - "replaces": "azure-functions-core-tools-2, azure-functions-cor...", - "vcs_git": "https://github.com/Azure/azure-functions-core-tool...", - "sha256": "a2a4f99d6d98ba0a46832570285552f2a93bab06cebbda2afc7...", - "size": "124417844", - "filename": "pool/main/a/azure-functions-core-tools-4/azure-fu..." - } - ] - - - -### parse - -```python -def parse(data: str, - raw: bool = False, - quiet: bool = False) -> List[JSONDictType] -``` - -Main text parsing function - -Parameters: - - data: (string) text data to parse - raw: (boolean) unprocessed output if True - quiet: (boolean) suppress warning messages if True - -Returns: - - List of Dictionaries. Raw or processed structured data. - -### Parser Information -Compatibility: linux, darwin, cygwin, win32, aix, freebsd - -Version 1.0 by Kelly Brazil (kellyjonbrazil@gmail.com) diff --git a/docs/parsers/iso_datetime.md b/docs/parsers/iso_datetime.md deleted file mode 100644 index b26ee730..00000000 --- a/docs/parsers/iso_datetime.md +++ /dev/null @@ -1,37 +0,0 @@ -[Home](https://kellyjonbrazil.github.io/jc/) - - -# jc.parsers.iso\_datetime - -jc - JSON Convert ISO 8601 Datetime string parser - -This parser has been renamed to datetime-iso (cli) or datetime_iso (module). - -This parser will be removed in a future version, so please start using -the new parser name. - - - -### parse - -```python -def parse(data, raw=False, quiet=False) -``` - -This parser is deprecated and calls datetime_iso. Please use datetime_iso -directly. This parser will be removed in the future. - -Parameters: - - data: (string) text data to parse - raw: (boolean) unprocessed output if True - quiet: (boolean) suppress warning messages if True - -Returns: - - Dictionary. Raw or processed structured data. - -### Parser Information -Compatibility: linux, aix, freebsd, darwin, win32, cygwin - -Version 1.1 by Kelly Brazil (kellyjonbrazil@gmail.com) diff --git a/docs/parsers/pkg_index_alpine.md b/docs/parsers/pkg_index_alpine.md deleted file mode 100644 index fc6d6267..00000000 --- a/docs/parsers/pkg_index_alpine.md +++ /dev/null @@ -1,126 +0,0 @@ -[Home](https://kellyjonbrazil.github.io/jc/) - - -# jc.parsers.pkg\_index\_alpine - -jc - JSON Convert Alpine Linux Package Index files - -Usage (cli): - - $ cat APKINDEX | jc --pkg-index-alpine - -Usage (module): - - import jc - result = jc.parse('pkg_index_alpine', pkg_index_alpine_output) - -Schema: - - [ - { - "checksum": string, - "package": string, - "version": string, - "architecture": string, - "package_size": integer, - "installed_size": integer, - "description": string, - "url": string, - "license": string, - "origin": string, - "maintainer": { - "name": string, - "email": string, - }, - "build_time": integer, - "commit": string, - "provider_priority": string, - "dependencies": [ - string - ], - "provides": [ - string - ], - "install_if": [ - string - ], - } - ] - -Example: - - $ cat APKINDEX | jc --pkg-index-alpine - [ - { - "checksum": "Q1znBl9k+RKgY6gl5Eg3iz73KZbLY=", - "package": "yasm", - "version": "1.3.0-r4", - "architecture": "x86_64", - "package_size": 772109, - "installed_size": 1753088, - "description": "A rewrite of NASM to allow for multiple synta...", - "url": "http://www.tortall.net/projects/yasm/", - "license": "BSD-2-Clause", - "origin": "yasm", - "maintainer": { - "name": "Natanael Copa", - "email": "ncopa@alpinelinux.org" - }, - "build_time": 1681228881, - "commit": "84a227baf001b6e0208e3352b294e4d7a40e93de", - "dependencies": [ - "so:libc.musl-x86_64.so.1" - ], - "provides": [ - "cmd:vsyasm=1.3.0-r4", - "cmd:yasm=1.3.0-r4", - "cmd:ytasm=1.3.0-r4" - ] - } - ] - - $ cat APKINDEX | jc --pkg-index-alpine --raw - [ - { - "C": "Q1znBl9k+RKgY6gl5Eg3iz73KZbLY=", - "P": "yasm", - "V": "1.3.0-r4", - "A": "x86_64", - "S": "772109", - "I": "1753088", - "T": "A rewrite of NASM to allow for multiple syntax supported...", - "U": "http://www.tortall.net/projects/yasm/", - "L": "BSD-2-Clause", - "o": "yasm", - "m": "Natanael Copa ", - "t": "1681228881", - "c": "84a227baf001b6e0208e3352b294e4d7a40e93de", - "D": "so:libc.musl-x86_64.so.1", - "p": "cmd:vsyasm=1.3.0-r4 cmd:yasm=1.3.0-r4 cmd:ytasm=1.3.0-r4" - }, - ] - - - -### parse - -```python -def parse(data: str, raw: bool = False, quiet: bool = False) -> List[Dict] -``` - -Main text parsing function - -Parameters: - - data: (string) text data to parse - raw: (boolean) unprocessed output if True - quiet: (boolean) suppress warning messages if True - -Returns: - - List of Dictionaries. Raw or processed structured data. - -### Parser Information -Compatibility: linux, darwin, cygwin, win32, aix, freebsd - -Version 1.0 by Roey Darwish Dror (roey.ghost@gmail.com) diff --git a/docs/parsers/apkindex.md b/docs/parsers/pkg_index_apk.md similarity index 91% rename from docs/parsers/apkindex.md rename to docs/parsers/pkg_index_apk.md index e860a1a8..8743e03d 100644 --- a/docs/parsers/apkindex.md +++ b/docs/parsers/pkg_index_apk.md @@ -1,18 +1,18 @@ [Home](https://kellyjonbrazil.github.io/jc/) - + -# jc.parsers.apkindex +# jc.parsers.pkg\_index\_apk jc - JSON Convert Alpine Linux Package Index files Usage (cli): - $ jc --apkindex < APKINDEX + $ cat APKINDEX | jc --pkg-index-apk Usage (module): import jc - result = jc.parse('apkindex', apkindex_output) + result = jc.parse('pkg_index_apk', pkg_index_apk_output) Schema: @@ -49,7 +49,7 @@ Schema: Example: - $ jc --apkindex < APKINDEX + $ cat APKINDEX | jc --pkg-index-apk [ { "checksum": "Q1znBl9k+RKgY6gl5Eg3iz73KZbLY=", @@ -79,7 +79,7 @@ Example: } ] - $ jc --apkindex --raw < APKINDEX + $ cat APKINDEX | jc --pkg-index-apk --raw [ { "C": "Q1znBl9k+RKgY6gl5Eg3iz73KZbLY=", @@ -100,7 +100,7 @@ Example: }, ] - + ### parse