Skip to content

Commit

Permalink
Change convert script to save project markdown files to index.md
Browse files Browse the repository at this point in the history
  • Loading branch information
liraymond04 committed Dec 12, 2024
1 parent 181b290 commit 8701c17
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/update-buckets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
with:
recover_deleted_files: true
recover_deleted_files_to_destination: 'actions/recovered'
output_renamed_files_as_deleted_and_added: true
separator: ","
files: |
**/*.png
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/update-supabase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
with:
recover_deleted_files: true
recover_deleted_files_to_destination: 'actions/recovered'
output_renamed_files_as_deleted_and_added: true
separator: ","
files: |
**/*.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: webnovel
title: Stand by me Pleiades Part 4
repo_url: liraymond04/re0-translations
file_path: posts/side_stories/Stand by me Pleiades Part 4/Stand by me Pleiades Part 4.md
file_path: posts/side_stories/Stand by me Pleiades Part 4/index.md
supabase_page_format: true
media_files: ['posts/side_stories/Stand by me Pleiades Part 4/media/image1.png', 'posts/side_stories/Stand by me Pleiades Part 4/media/image2.png']
---
Expand Down
4 changes: 2 additions & 2 deletions scripts/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
cur_dir = os.getcwd()

def generate_yaml_frontmatter(md_file_path, media_files):
title = os.path.splitext(os.path.basename(md_file_path))[0]
title = os.path.split(os.path.dirname(md_file_path))[1]

file_path = os.path.relpath(md_file_path, start=cur_dir)

Expand Down Expand Up @@ -82,7 +82,7 @@ def process_directories(root_dir, output_dir, lua_filter=None):

os.makedirs(output_file_dir, exist_ok=True)

output_file = os.path.join(output_file_dir, target_file.replace('.docx', '.md'))
output_file = os.path.join(output_file_dir, "index.md")

convert_docx_to_md(input_file, output_file, output_file_dir, lua_filter)
else:
Expand Down

0 comments on commit 8701c17

Please sign in to comment.