mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-28 05:26:13 +02:00
Export to file(s) when first line/title of an entry is very long (#1527)
This commit is contained in:
parent
c92ee47632
commit
fb473007da
4 changed files with 58 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue