Skip to content

Commit

Permalink
Update generate_markdown_list.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
diegovelezg authored Jul 3, 2024
1 parent 9ffe8e4 commit 709fcf8
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions .github/workflows/generate_markdown_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,7 @@ jobs:
- name: Generate markdown files list
run: |
echo "
import os
import yaml
import json
import pandas as pd

repo_path = '.'

markdown_files = []

for root, dirs, files in os.walk(repo_path):
for file in files:
if file.endswith('.md'):
full_path = os.path.join(root, file)
relative_path = os.path.relpath(full_path, repo_path)
markdown_files.append(relative_path)

with open('markdown_files.yaml', 'w') as yaml_file:
yaml.dump(markdown_files, yaml_file)

with open('markdown_files.json', 'w') as json_file:
json.dump(markdown_files, json_file, indent=4)

df = pd.DataFrame(markdown_files, columns=['Path'])
df.to_csv('markdown_files.csv', index=False)
" > script.py
python script.py
python generate_markdown_list.py
- name: Commit and push changes
run: |
Expand Down

0 comments on commit 709fcf8

Please sign in to comment.