Prevent missing regex_patterns (#15)
This commit is contained in:
parent
599fd6209f
commit
783609d2e3
195 changed files with 1617 additions and 562 deletions
|
|
@ -1,18 +1,12 @@
|
|||
# /// script
|
||||
# requires-python = ">=3.13"
|
||||
# dependencies = [
|
||||
# "markdownify",
|
||||
# "pyyaml",
|
||||
# ]
|
||||
# ///
|
||||
import os
|
||||
import sys
|
||||
import yaml
|
||||
|
||||
import yaml
|
||||
from utils.custom_formats import collect_custom_formats
|
||||
from utils.regex_patterns import collect_regex_patterns
|
||||
from utils.profiles import collect_profiles
|
||||
from utils.media_management import collect_media_management
|
||||
from utils.profiles import collect_profiles
|
||||
from utils.regex_patterns import collect_regex_patterns
|
||||
|
||||
|
||||
# Prevent aliases from showing up
|
||||
yaml.Dumper.ignore_aliases = lambda *args: True
|
||||
|
|
@ -20,7 +14,7 @@ yaml.Dumper.ignore_aliases = lambda *args: True
|
|||
|
||||
def clear_output_dir(output_dir):
|
||||
if not os.path.exists(output_dir):
|
||||
print(f"Output directory does not exist, skipping clearing")
|
||||
print("Output directory does not exist, skipping clearing")
|
||||
else:
|
||||
for filename in os.listdir(output_dir):
|
||||
file_path = os.path.join(output_dir, filename)
|
||||
|
|
@ -58,7 +52,7 @@ def main():
|
|||
f"Custom format directory {trash_custom_formats_dir} does not exist, skipping."
|
||||
)
|
||||
continue
|
||||
custom_regex_patterns = collect_regex_patterns(
|
||||
regex_patterns = collect_regex_patterns(
|
||||
service,
|
||||
trash_custom_formats_dir,
|
||||
regex_patterns_dir,
|
||||
|
|
@ -79,7 +73,7 @@ def main():
|
|||
)
|
||||
continue
|
||||
trash_id_to_scoring_mapping = collect_custom_formats(
|
||||
service, trash_custom_formats_dir, custom_formats_dir, custom_regex_patterns
|
||||
service, trash_custom_formats_dir, custom_formats_dir, regex_patterns
|
||||
)
|
||||
collect_profiles(
|
||||
service,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue