diff --git a/doc/p/abc_medical_notes.md b/doc/p/abc_medical_notes.md index d6a89f84c..7db7f6070 100644 --- a/doc/p/abc_medical_notes.md +++ b/doc/p/abc_medical_notes.md @@ -12,8 +12,6 @@ | Write support | No | | Single-file | Yes | | Kind | 🔢 binary | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | | Wiki | ― | | Website | [Makindo.co.uk Comprehensive Medical Encyclopedia](https://www.makindo.co.uk/topics/_index.php) | diff --git a/doc/p/almaany.md b/doc/p/almaany.md index 7fb436ba8..8d0343645 100644 --- a/doc/p/almaany.md +++ b/doc/p/almaany.md @@ -12,8 +12,6 @@ | Write support | No | | Single-file | Yes | | Kind | 🔢 binary | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | | Wiki | ― | | Website | [Almaany.com Arabic Dictionary - Google Play](https://play.google.com/store/apps/details?id=com.almaany.arar) | diff --git a/doc/p/appledict_bin.md b/doc/p/appledict_bin.md index 1a3e40f94..b13600a24 100644 --- a/doc/p/appledict_bin.md +++ b/doc/p/appledict_bin.md @@ -12,8 +12,6 @@ | Write support | No | | Single-file | Yes | | Kind | 🔢 binary | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | | Wiki | ― | | Website | [Dictionary User Guide for Mac](https://support.apple.com/en-gu/guide/dictionary/welcome/mac) | diff --git a/doc/p/babylon_bgl.md b/doc/p/babylon_bgl.md index 6a08413ac..f8b14d2e5 100644 --- a/doc/p/babylon_bgl.md +++ b/doc/p/babylon_bgl.md @@ -2,20 +2,18 @@ ### General Information -| Attribute | Value | -| --------------- | ------------------ | -| Name | BabylonBgl | -| snake_case_name | babylon_bgl | -| Description | Babylon (.BGL) | -| Extensions | `.bgl` | -| Read support | Yes | -| Write support | No | -| Single-file | Yes | -| Kind | 🔢 binary | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | -| Wiki | ― | -| Website | ― | +| Attribute | Value | +| --------------- | -------------- | +| Name | BabylonBgl | +| snake_case_name | babylon_bgl | +| Description | Babylon (.BGL) | +| Extensions | `.bgl` | +| Read support | Yes | +| Write support | No | +| Single-file | Yes | +| Kind | 🔢 binary | +| Wiki | ― | +| Website | ― | ### Read options diff --git a/doc/p/cc_kedict.md b/doc/p/cc_kedict.md index 4c4bc63e7..df6c4b044 100644 --- a/doc/p/cc_kedict.md +++ b/doc/p/cc_kedict.md @@ -12,8 +12,6 @@ | Write support | No | | Single-file | Yes | | Kind | 📝 text | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | | Wiki | ― | | Website | [@mhagiwara/cc-kedict](https://github.com/mhagiwara/cc-kedict) | diff --git a/doc/p/dict_cc.md b/doc/p/dict_cc.md index 87cb6ec3d..99aee5678 100644 --- a/doc/p/dict_cc.md +++ b/doc/p/dict_cc.md @@ -12,8 +12,6 @@ | Write support | No | | Single-file | Yes | | Kind | 🔢 binary | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | | Wiki | [Dict.cc](https://en.wikipedia.org/wiki/Dict.cc) | | Website | [dict.cc dictionary - Google Play](https://play.google.com/store/apps/details?id=cc.dict.dictcc) | diff --git a/doc/p/dict_cc_split.md b/doc/p/dict_cc_split.md index c4cc2fdc9..7cdb74c60 100644 --- a/doc/p/dict_cc_split.md +++ b/doc/p/dict_cc_split.md @@ -12,8 +12,6 @@ | Write support | No | | Single-file | Yes | | Kind | 🔢 binary | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | | Wiki | [Dict.cc](https://en.wikipedia.org/wiki/Dict.cc) | | Website | [dict.cc dictionary - Google Play](https://play.google.com/store/apps/details?id=cc.dict.dictcc) | diff --git a/doc/p/dictunformat.md b/doc/p/dictunformat.md index b0c0e0aea..5401d2097 100644 --- a/doc/p/dictunformat.md +++ b/doc/p/dictunformat.md @@ -12,8 +12,6 @@ | Write support | No | | Single-file | Yes | | Kind | 📝 text | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | | Wiki | [Dictd](https://directory.fsf.org/wiki/Dictd) | | Website | [dictd/dictunformat.1.in - @cheusov/dictd](https://github.com/cheusov/dictd/blob/master/dictunformat.1.in) | diff --git a/doc/p/digitalnk.md b/doc/p/digitalnk.md index 2071eda52..cd0d93124 100644 --- a/doc/p/digitalnk.md +++ b/doc/p/digitalnk.md @@ -12,8 +12,6 @@ | Write support | No | | Single-file | Yes | | Kind | 🔢 binary | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | | Wiki | ― | | Website | [@digitalprk/dicrs](https://github.com/digitalprk/dicrs) | diff --git a/doc/p/dsl.md b/doc/p/dsl.md index b370132fe..c32d0b65e 100644 --- a/doc/p/dsl.md +++ b/doc/p/dsl.md @@ -12,8 +12,6 @@ | Write support | No | | Single-file | Yes | | Kind | 📝 text | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | | Wiki | [ABBYY Lingvo](https://ru.wikipedia.org/wiki/ABBYY_Lingvo) | | Website | [www.lingvo.ru](https://www.lingvo.ru/) | diff --git a/doc/p/edict2.md b/doc/p/edict2.md index 887926be8..ca33d5f6b 100644 --- a/doc/p/edict2.md +++ b/doc/p/edict2.md @@ -12,8 +12,6 @@ | Write support | No | | Single-file | Yes | | Kind | 📝 text | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | | Wiki | [CEDICT](https://en.wikipedia.org/wiki/CEDICT) | | Website | ― | diff --git a/doc/p/freedict.md b/doc/p/freedict.md index c03adde03..1012713d8 100644 --- a/doc/p/freedict.md +++ b/doc/p/freedict.md @@ -12,8 +12,6 @@ | Write support | No | | Single-file | Yes | | Kind | 📝 text | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | | Wiki | [@freedict/fd-dictionaries/wiki](https://github.com/freedict/fd-dictionaries/wiki) | | Website | [FreeDict.org](https://freedict.org/) | diff --git a/doc/p/jmdict.md b/doc/p/jmdict.md index 3ade36e14..bc5d65c51 100644 --- a/doc/p/jmdict.md +++ b/doc/p/jmdict.md @@ -12,8 +12,6 @@ | Write support | No | | Single-file | Yes | | Kind | 📝 text | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | | Wiki | [JMdict](https://en.wikipedia.org/wiki/JMdict) | | Website | [The JMDict Project](https://www.edrdg.org/jmdict/j_jmdict.html) | diff --git a/doc/p/jmnedict.md b/doc/p/jmnedict.md index 8a8963bbd..dba9ec79e 100644 --- a/doc/p/jmnedict.md +++ b/doc/p/jmnedict.md @@ -12,8 +12,6 @@ | Write support | No | | Single-file | Yes | | Kind | 📝 text | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | | Wiki | [JMdict](https://en.wikipedia.org/wiki/JMdict) | | Website | [EDRDG Wiki](https://www.edrdg.org/wiki/index.php/Main_Page) | diff --git a/doc/p/octopus_mdict.md b/doc/p/octopus_mdict.md index 1db99b152..df9ab6db5 100644 --- a/doc/p/octopus_mdict.md +++ b/doc/p/octopus_mdict.md @@ -12,8 +12,6 @@ | Write support | No | | Single-file | No | | Kind | 🔢 binary | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | | Wiki | ― | | Website | [Download - MDict.cn](https://www.mdict.cn/wp/?page_id=5325&lang=en) | diff --git a/doc/p/wiktextract.md b/doc/p/wiktextract.md index 61d8b07c5..328d2362f 100644 --- a/doc/p/wiktextract.md +++ b/doc/p/wiktextract.md @@ -12,8 +12,6 @@ | Write support | No | | Single-file | Yes | | Kind | 📝 text | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | | Wiki | ― | | Website | [@tatuylonen/wiktextract](https://github.com/tatuylonen/wiktextract) | diff --git a/doc/p/wordnet.md b/doc/p/wordnet.md index cf66850a1..9344f4656 100644 --- a/doc/p/wordnet.md +++ b/doc/p/wordnet.md @@ -12,7 +12,5 @@ | Write support | No | | Single-file | No | | Kind | 📁 directory | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | | Wiki | [WordNet](https://en.wikipedia.org/wiki/WordNet) | | Website | [WordNet - A Lexical Database for English](https://wordnet.princeton.edu/) | diff --git a/doc/p/wordset.md b/doc/p/wordset.md index 03d29f6e9..d70798f5b 100644 --- a/doc/p/wordset.md +++ b/doc/p/wordset.md @@ -12,8 +12,6 @@ | Write support | No | | Single-file | No | | Kind | 📁 directory | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | | Wiki | ― | | Website | [@wordset/wordset-dictionary](https://github.com/wordset/wordset-dictionary) | diff --git a/doc/p/xdxf.md b/doc/p/xdxf.md index 4b94529ec..0a7d75cc8 100644 --- a/doc/p/xdxf.md +++ b/doc/p/xdxf.md @@ -12,8 +12,6 @@ | Write support | No | | Single-file | Yes | | Kind | 📝 text | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | | Wiki | [XDXF](https://en.wikipedia.org/wiki/XDXF) | | Website | [XDXF standard - @soshial/xdxf_makedict](https://github.com/soshial/xdxf_makedict/tree/master/format_standard) | diff --git a/doc/p/xdxf_css.md b/doc/p/xdxf_css.md index 244bf12dd..8096a45e7 100644 --- a/doc/p/xdxf_css.md +++ b/doc/p/xdxf_css.md @@ -12,8 +12,6 @@ | Write support | No | | Single-file | Yes | | Kind | 📝 text | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | | Wiki | [XDXF](https://en.wikipedia.org/wiki/XDXF) | | Website | [XDXF standard - @soshial/xdxf_makedict](https://github.com/soshial/xdxf_makedict/tree/master/format_standard) | diff --git a/doc/p/xdxf_lax.md b/doc/p/xdxf_lax.md index a3765dacc..b5b7adb18 100644 --- a/doc/p/xdxf_lax.md +++ b/doc/p/xdxf_lax.md @@ -12,8 +12,6 @@ | Write support | No | | Single-file | Yes | | Kind | 📝 text | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | | Wiki | [XDXF](https://en.wikipedia.org/wiki/XDXF) | | Website | [XDXF standard - @soshial/xdxf_makedict](https://github.com/soshial/xdxf_makedict/tree/master/format_standard) | diff --git a/doc/p/zim.md b/doc/p/zim.md index ffb417b96..97aca2e77 100644 --- a/doc/p/zim.md +++ b/doc/p/zim.md @@ -12,8 +12,6 @@ | Write support | No | | Single-file | Yes | | Kind | 🔢 binary | -| Sort-on-write | No (by default) | -| Sort key | (`headword_lower`) | | Wiki | [ZIM (file format)]() | | Website | [OpenZIM](https://wiki.openzim.org/wiki/OpenZIM) | diff --git a/scripts/gen.sh b/scripts/gen.sh index 908b5b17c..697b2f12c 100755 --- a/scripts/gen.sh +++ b/scripts/gen.sh @@ -4,7 +4,7 @@ set -e myDir1=$(dirname "$0") # to handle rename of a plugin: -rm $myDir1/../doc/p/*.md +rm $myDir1/../doc/p/*.md || true set -x diff --git a/scripts/plugin-doc.py b/scripts/plugin-doc.py index a9c24b0ee..026695155 100755 --- a/scripts/plugin-doc.py +++ b/scripts/plugin-doc.py @@ -254,23 +254,30 @@ def getToolSourceLink(tool): tool.update({"name": toolName}) tools = tools_toml.values() - generalInfoTable = "### General Information\n\n" + renderTable( - [ - ("Attribute", "Value"), - ("Name", p.name), - ("snake_case_name", p.lname), - ("Description", p.description), - ("Extensions", ", ".join([codeValue(ext) for ext in p.extensions])), - ("Read support", yesNo(p.canRead)), - ("Write support", yesNo(p.canWrite)), - ("Single-file", yesNo(p.singleFile)), - ("Kind", f"{kindEmoji(module.kind)} {module.kind}"), + table = [ + ("Attribute", "Value"), + ("Name", p.name), + ("snake_case_name", p.lname), + ("Description", p.description), + ("Extensions", ", ".join([codeValue(ext) for ext in p.extensions])), + ("Read support", yesNo(p.canRead)), + ("Write support", yesNo(p.canWrite)), + ("Single-file", yesNo(p.singleFile)), + ("Kind", f"{kindEmoji(module.kind)} {module.kind}"), + ] + + if p.canWrite: + table += [ ("Sort-on-write", p.sortOnWrite.desc), ("Sort key", sortKeyName(p)), - ("Wiki", wiki_md), - ("Website", website_md), - ], - ) + ] + + table += [ + ("Wiki", wiki_md), + ("Website", website_md), + ] + + generalInfoTable = "### General Information\n\n" + renderTable(table) topTables = generalInfoTable try: