add SOURCE_FILENAME constant
This commit is contained in:
parent
215ff98d00
commit
45e95a8fb9
1 changed files with 3 additions and 1 deletions
|
@ -8,6 +8,7 @@ from pathlib import Path
|
|||
from exclude import EXCLUDED_WORDS
|
||||
|
||||
SOURCE_DIR = Path('data')
|
||||
SOURCE_FILENAME = 'index.txt'
|
||||
OUTPUT_FILE = 'tags.json'
|
||||
TAGS_PER_ARTICLE = 5
|
||||
JSON_INDENT = 2
|
||||
|
@ -126,7 +127,8 @@ def read_file(file: Path) -> str:
|
|||
|
||||
def main():
|
||||
final_tags = {}
|
||||
for file in SOURCE_DIR.glob('**/index.txt'): # Nach allen index.txt Dateien suchen
|
||||
# Nach allen Quelldateien suchen
|
||||
for file in SOURCE_DIR.glob(f'**/{SOURCE_FILENAME}'):
|
||||
# Die Dateien, deren Ordner mit 'autosave-' beginnen, ignorieren.
|
||||
title = file.parent.name
|
||||
if title.startswith('autosave-'):
|
||||
|
|
Loading…
Reference in a new issue