Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add overrideMap <association> to the udl-list.md FunctionList section #276

Merged
merged 2 commits into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions .validators/validator_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<association>` row to your overrideMap.xml's `<associationMap>` section_

| Name | Author | Description | overrideMap `<association>` |
|------|--------|-------------|-----------------------------|
'''
tmpl_fl_pct = '`<association id="%s" userDefinedLangName="%s" />`'


def post_error(message):
global has_error
Expand Down Expand Up @@ -224,6 +231,13 @@ def gen_md_table(udlfile):

# print(f'functionList: {udl["functionList"]} => {fl_link}')

# generate the overrideMap <assocation> 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))

Expand All @@ -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"])}')

Expand All @@ -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)}')

Expand Down
20 changes: 11 additions & 9 deletions udl-list.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## UDL Definitions

| Name | Author | Description |
|-----|--------|-------------|
|------|--------|-------------|
| [3GL](./UDLs/3GL_byDrezzzz.xml) | [drezzzzz](mailto:[email protected]) | 3GL |
| [6502 Assembly](./UDLs/6502Assembly_byCarlMyerholtz.xml) | [Carl Myerholtz W9OMS](mailto:[email protected]) | ASM for 6502 |
| [68k Assembly](./UDLs/68K_Assembly_byAmix73.xml) | [Amix 73](mailto:[email protected]) | 68k Assembly |
Expand Down Expand Up @@ -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) |
Expand All @@ -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:[email protected]) | 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 `<association>` row to your overrideMap.xml's `<associationMap>` section_

| Name | Author | Description | overrideMap `<association>` |
|------|--------|-------------|-----------------------------|
| [dBASEPlus_DarkTheme](./functionList/dbaseplus.xml) | Lycan Thrope | dBASE Plus (Dark Theme) | `<association id="dbaseplus.xml" userDefinedLangName="dBASEPlus_DarkTheme" />` |
| [dBASEPlus_LightTheme](./functionList/dbaseplus.xml) | Lycan Thrope | dBASE Plus (Light Theme) | `<association id="dbaseplus.xml" userDefinedLangName="dBASEPlus_LightTheme" />` |
| [LSL](./functionList/LSL_byKimpaTammas.xml) | [Kimpa Tammas](mailto:[email protected]) | Linden Script Language (dark theme version) | `<association id="LSL_byKimpaTammas.xml" userDefinedLangName="LSL" />` |
| [STL 3dObject](./functionList/STL-3dObject-ASCII.byPryrt.xml) | [Pryrt](https://github.com/pryrt/) | 3d Stereolithography ASCII file (STL) | `<association id="STL-3dObject-ASCII.byPryrt.xml" userDefinedLangName="STL 3dObject" />` |
| [Vim script](./functionList/Vimscript_by_rdipardo.xml) | Pryrt | User Defined Language for Vim script | `<association id="Vimscript_by_rdipardo.xml" userDefinedLangName="Vim script" />` |