Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export on modified only bug fix #1456

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nbdev/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def watch_export(nbs:str=None, # Nb directory to watch for changes
def _export(e,lib=lib):
p = e.src_path
if (not '.ipynb_checkpoints' in p and p.endswith('.ipynb') and not Path(p).name.startswith('.~')):
run(f'nb_export --lib_path {lib} "{p}"')
if e.event_type == 'modified': run(f'nb_export --lib_path {lib} "{p}"')
with fs_watchdog(_export, nbs):
while True: time.sleep(1)

Expand Down
2 changes: 1 addition & 1 deletion nbs/api/13_cli.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@
" def _export(e,lib=lib):\n",
" p = e.src_path\n",
" if (not '.ipynb_checkpoints' in p and p.endswith('.ipynb') and not Path(p).name.startswith('.~')):\n",
" run(f'nb_export --lib_path {lib} \"{p}\"')\n",
" if e.event_type == 'modified': run(f'nb_export --lib_path {lib} \"{p}\"')\n",
" with fs_watchdog(_export, nbs):\n",
" while True: time.sleep(1)"
]
Expand Down
Loading