Skip to content

Commit

Permalink
Debuggging
Browse files Browse the repository at this point in the history
  • Loading branch information
Yin-Ting Chou committed Sep 11, 2023
1 parent 027a342 commit f986c98
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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__/
Expand Down
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ services:
image: loconotion:latest
volumes:
- ${LOCONOTION_LOCAL_DIST:-/tmp/}:/app/loconotion/dist
restart: always
restart: always

# for debugging
# command: tail -f /dev/null
2 changes: 2 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ COPY requirements.txt .
RUN pip install -r requirements.txt

COPY . .

# comment out for debugging
ENTRYPOINT [ "python", "loconotion", "--chromedriver", "/chromedriver/chromedriver"]
12 changes: 12 additions & 0 deletions loconotion/modules/notionparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit f986c98

Please sign in to comment.