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

Removing non-RMM and dupes #23

Merged
merged 8 commits into from
Oct 1, 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
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