flag empty articles

This commit is contained in:
Guilhem Fauré 2023-05-16 17:15:43 +02:00
parent f5c0f8cf51
commit 6f11783f7c

View File

@ -43,8 +43,10 @@ for counter, article in Articles(maxexport):
f"\n{BOLD}Exporting {R}{counter['remaining']+1}{RESET}" f"\n{BOLD}Exporting {R}{counter['remaining']+1}{RESET}"
+ f"{BOLD} SPIP articles to Markdown & YAML files{RESET}\n" + f"{BOLD} SPIP articles to Markdown & YAML files{RESET}\n"
) )
empty: str = "EMPTY " if len(article.text) < 1 else ""
print( print(
f"{BOLD}{counter['exported']}.{RESET} " + highlight_unknown_chars(article.title) f"{BOLD}{counter['exported']}. {empty}{RESET}"
+ highlight_unknown_chars(article.title)
) )
fullpath: str = config.output_dir + "/" + article.get_path() fullpath: str = config.output_dir + "/" + article.get_path()
print(f"{BOLD}>{RESET} {fullpath}{article.get_filename()}") print(f"{BOLD}>{RESET} {fullpath}{article.get_filename()}")