Export to file(s) when first line/title of an entry is very long (#1527)

This commit is contained in:
Jonathan van der Steege 2022-08-13 22:02:19 +02:00 committed by GitHub
parent c92ee47632
commit fb473007da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 58 additions and 3 deletions

View file

@ -17,6 +17,21 @@ def does_directory_contain_files(file_list, directory_path):
return True
def does_directory_contain_n_files(directory_path, number):
count = 0
if not os.path.isdir(directory_path):
return False
files = [
f
for f in os.listdir(directory_path)
if os.path.isfile(os.path.join(directory_path, f))
]
count = len(files)
return int(number) == count
def parse_should_or_should_not(should_or_should_not):
if should_or_should_not == "should":
return True