From eb3386ed3ba28795a7fa529ea334eb9ed1319ffe Mon Sep 17 00:00:00 2001 From: PeterCJ Date: Sun, 13 Oct 2024 13:05:42 -0700 Subject: [PATCH 1/2] Add the overrideMap line to the udl-list.md generated output --- .validators/validator_json.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.validators/validator_json.py b/.validators/validator_json.py index 20a67f7..5073754 100644 --- a/.validators/validator_json.py +++ b/.validators/validator_json.py @@ -26,8 +26,15 @@ tmpl_td = ' | ' tmpl_tr_e = ' |' tmpl_tab_head = '''| Name | Author | Description | -|-----|--------|-------------| +|------|--------|-------------| ''' +tmpl_fl_head = '''_If you download a functionList definition, remember to add the `` row to your overrideMap.xml's `` section_ + +| Name | Author | Description | overrideMap `` | +|------|--------|-------------|-----------------------------| +''' +tmpl_fl_pct = '``' + def post_error(message): global has_error @@ -224,6 +231,13 @@ def gen_md_table(udlfile): # print(f'functionList: {udl["functionList"]} => {fl_link}') + # generate the overrideMap line + fl_assoc = fl_link + if fl_assoc[0:4] == "http": + pass # TODO: need to strip all but name + + ov_map = tmpl_fl_pct % (fl_assoc, udl["display-name"]) + # absolute path for existence testing fl_link_abs = Path(os.path.join(os.getcwd(),"functionList", fl_link)) @@ -248,7 +262,7 @@ def gen_md_table(udlfile): print(f'fl_link = {fl_link}') post_error(f'{udl["display-name"]}: functionList file missing from repo: JSON id-name expects it at filename="{fl_link}"') else: - fl_list.append(tmpl_tr_b + "[" + udl["display-name"] +"](" + fl_link + ")" + tmpl_td + author + tmpl_td + udl["description"] + tmpl_tr_e) + fl_list.append(tmpl_tr_b + "[" + udl["display-name"] +"](" + fl_link + ")" + tmpl_td + author + tmpl_td + udl["description"] + tmpl_td + ov_map + tmpl_tr_e) print(f'- Number of UDLs: {len(udlfile["UDLs"])}') @@ -263,7 +277,7 @@ def gen_md_table(udlfile): tab_text += tmpl_new_line tab_text += tmpl_new_line tab_text += "## FunctionList Definitions%s%s" % (tmpl_new_line, tmpl_new_line) - tab_text += tmpl_tab_head + tab_text += tmpl_fl_head tab_text += tmpl_new_line.join(fl_list) print(f'- Number of FunctionLists referenced: {len(fl_list)}') From 816b94d6e77400c746e0e30d9f53ac757208a9b8 Mon Sep 17 00:00:00 2001 From: pryrt Date: Sun, 13 Oct 2024 20:06:25 +0000 Subject: [PATCH 2/2] Automatically re-build udl-list.md --- udl-list.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/udl-list.md b/udl-list.md index 53fbab2..d29e571 100644 --- a/udl-list.md +++ b/udl-list.md @@ -1,7 +1,7 @@ ## UDL Definitions | Name | Author | Description | -|-----|--------|-------------| +|------|--------|-------------| | [3GL](./UDLs/3GL_byDrezzzz.xml) | [drezzzzz](mailto:drezzzzz@users.sourceforge.net) | 3GL | | [6502 Assembly](./UDLs/6502Assembly_byCarlMyerholtz.xml) | [Carl Myerholtz W9OMS](mailto:carl_myerholtz@yahoo.com) | ASM for 6502 | | [68k Assembly](./UDLs/68K_Assembly_byAmix73.xml) | [Amix 73](mailto:amix@pc-dome.com) | 68k Assembly | @@ -361,7 +361,7 @@ ## Auto-Completion Definitions | Name | Author | Description | -|-----|--------|-------------| +|------|--------|-------------| | [Amiga_E](./autoCompletion/Amiga_E_bydmcoles.xml) | [dmcoles](https://github.com/dmcoles) | Amiga E syntax highlighting | | [Amiga_E_dark](./autoCompletion/Amiga_E_dark_bydmcoles.xml) | [dmcoles](https://github.com/dmcoles) | Amiga E syntax highlighting (dark version) | | [DAX](./autoCompletion/DAX_bySaschaKasper.xml) | [Sascha D. Kasper](https://sascha-kasper.com/dax-syntax-highlighting-for-notepad/) | DAX Data Visualization (Microsoft Power BI) | @@ -382,10 +382,12 @@ ## FunctionList Definitions -| Name | Author | Description | -|-----|--------|-------------| -| [dBASEPlus_DarkTheme](./functionList/dbaseplus.xml) | Lycan Thrope | dBASE Plus (Dark Theme) | -| [dBASEPlus_LightTheme](./functionList/dbaseplus.xml) | Lycan Thrope | dBASE Plus (Light Theme) | -| [LSL](./functionList/LSL_byKimpaTammas.xml) | [Kimpa Tammas](mailto:kimpa.tammas@free.fr) | Linden Script Language (dark theme version) | -| [STL 3dObject](./functionList/STL-3dObject-ASCII.byPryrt.xml) | [Pryrt](https://github.com/pryrt/) | 3d Stereolithography ASCII file (STL) | -| [Vim script](./functionList/Vimscript_by_rdipardo.xml) | Pryrt | User Defined Language for Vim script | +_If you download a functionList definition, remember to add the `` row to your overrideMap.xml's `` section_ + +| Name | Author | Description | overrideMap `` | +|------|--------|-------------|-----------------------------| +| [dBASEPlus_DarkTheme](./functionList/dbaseplus.xml) | Lycan Thrope | dBASE Plus (Dark Theme) | `` | +| [dBASEPlus_LightTheme](./functionList/dbaseplus.xml) | Lycan Thrope | dBASE Plus (Light Theme) | `` | +| [LSL](./functionList/LSL_byKimpaTammas.xml) | [Kimpa Tammas](mailto:kimpa.tammas@free.fr) | Linden Script Language (dark theme version) | `` | +| [STL 3dObject](./functionList/STL-3dObject-ASCII.byPryrt.xml) | [Pryrt](https://github.com/pryrt/) | 3d Stereolithography ASCII file (STL) | `` | +| [Vim script](./functionList/Vimscript_by_rdipardo.xml) | Pryrt | User Defined Language for Vim script | `` |