fixes to use the program with repr

This commit is contained in:
Guilhem Fauré 2023-05-17 10:58:09 +02:00
parent c38274b58e
commit 221aa5d3aa

View File

@ -1,17 +1,15 @@
#!python
# pyright: basic
import sys
from os import makedirs, mkdir
from shutil import rmtree
from articles import Article, Articles
from config import config
from converter import highlight_unknown_chars
from database import db
if __name__ != "__main__":
exit()
import sys
from os import makedirs, mkdir
from shutil import rmtree
# Clean the output dir & create a new
rmtree(config.output_dir, True)
mkdir(config.output_dir)
@ -36,6 +34,7 @@ RESET: str = "\033[0m"
# Articles that contains unknown chars
unknown_chars_articles: list[Article] = []
if __name__ != "__main__":
# Loop among first maxexport articles & export them
for counter, article in Articles(maxexport):
if (counter["exported"] - 1) % 100 == 0: