diff --git a/.gitignore b/.gitignore index 882f342ba..e1408c7be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ # Created by https://www.toptal.com/developers/gitignore/api/python # Edit at https://www.toptal.com/developers/gitignore?templates=python +site.toml + ### Python ### # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/docker-compose.yml b/docker-compose.yml index 349f90abc..3cfe6b9a9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,4 +8,7 @@ services: image: loconotion:latest volumes: - ${LOCONOTION_LOCAL_DIST:-/tmp/}:/app/loconotion/dist - restart: always \ No newline at end of file + restart: always + + # for debugging + # command: tail -f /dev/null \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index b5d3802d5..1ab40b8f1 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -34,4 +34,6 @@ COPY requirements.txt . RUN pip install -r requirements.txt COPY . . + +# comment out for debugging ENTRYPOINT [ "python", "loconotion", "--chromedriver", "/chromedriver/chromedriver"] diff --git a/loconotion/modules/notionparser.py b/loconotion/modules/notionparser.py index 4fccf6518..394f69b61 100644 --- a/loconotion/modules/notionparser.py +++ b/loconotion/modules/notionparser.py @@ -771,3 +771,15 @@ def run(self): log.info( f"Finished!\n\nProcessed {len(self.processed_pages)} pages in {formatted_time}" ) + + # for debugging + from pathlib import Path + + def generate_all_files(root: Path, only_files: bool = True): + for p in root.rglob("*"): + if only_files and not p.is_file(): + continue + yield p + + for p in generate_all_files(Path("/app/loconotion/dist"), only_files=False): + print(p) \ No newline at end of file