Skip to content

Commit

Permalink
Removing non-RMM and dupes (#23)
Browse files Browse the repository at this point in the history
* Removing non-RMM and dupes

* remove more non rmms

* removing more non rmms and dupes

* modify sitegen to remove mdx files for the deleted yaml

* adding basecamp back

* removing more duplicates

* rm dupes

* cleanup more rmms

---------

Co-authored-by: Hare Sudhan <[email protected]>
Co-authored-by: Jose Hernandez <[email protected]>
  • Loading branch information
3 people authored Oct 1, 2024
1 parent 41a7811 commit 9614854
Show file tree
Hide file tree
Showing 71 changed files with 69 additions and 1,915 deletions.
8 changes: 6 additions & 2 deletions bin/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import jinja2
import csv
import re
import shutil

def write_rmm_tools_csv(rmm_tools, output_dir, VERBOSE):
output_file = os.path.join(output_dir, 'public', 'api', 'rmm_tools.csv')
Expand Down Expand Up @@ -116,16 +117,19 @@ def clean_multiline(text):
j2_env.globals.update(dump=json.dumps)
j2_env.globals.update(escape=re.escape)

tools_dir = os.path.join(OUTPUT_DIR, 'pages', 'tools')
shutil.rmtree(tools_dir)
os.mkdir(tools_dir)
d = datetime.datetime.now()
template = j2_env.get_template('rmm.md.j2')
for rmm_tool in rmm_tools:
# Replace parentheses with underscores in the file name
file_name = f"{rmm_tool['Name'].lower().replace(' ', '_').replace('(', '_').replace(')', '_')}.mdx"
output_path = os.path.join(OUTPUT_DIR, 'pages', 'tools', file_name)
output_path = os.path.join(tools_dir, file_name)
output = template.render(rmm=rmm_tool, time=str(d.strftime("%Y-%m-%d")))
with open(output_path, 'w', encoding="utf-8") as f:
f.write(output)
messages.append(f"site_gen.py wrote {len(rmm_tools)} RMM tools markdown to: {os.path.join(OUTPUT_DIR, 'pages', 'tools')}")
messages.append(f"site_gen.py wrote {len(rmm_tools)} RMM tools markdown to: {tools_dir}")

# Write API CSV
write_rmm_tools_csv(rmm_tools, OUTPUT_DIR, VERBOSE)
Expand Down
32 changes: 0 additions & 32 deletions yaml/air_explorer.yaml

This file was deleted.

32 changes: 0 additions & 32 deletions yaml/air_live_drive.yaml

This file was deleted.

32 changes: 0 additions & 32 deletions yaml/amazon_(cloud)_drive.yaml

This file was deleted.

33 changes: 0 additions & 33 deletions yaml/aria2.yaml

This file was deleted.

38 changes: 0 additions & 38 deletions yaml/awerayawesun.yaml

This file was deleted.

33 changes: 0 additions & 33 deletions yaml/aws-cli.yaml

This file was deleted.

33 changes: 0 additions & 33 deletions yaml/azure_storage_explorer.yaml

This file was deleted.

43 changes: 0 additions & 43 deletions yaml/beyondtrustbomgar.yaml

This file was deleted.

36 changes: 0 additions & 36 deletions yaml/bomgar.yaml

This file was deleted.

27 changes: 0 additions & 27 deletions yaml/bomgar_-_now_beyondtrust.yaml

This file was deleted.

Loading

0 comments on commit 9614854

Please sign in to comment.