Skip to content

Add update subcommand to notebook_manager CLI#38

Open
chewinggum604-art wants to merge 1 commit into
PleasePrompto:masterfrom
chewinggum604-art:feature/notebook-update-cli
Open

Add update subcommand to notebook_manager CLI#38
chewinggum604-art wants to merge 1 commit into
PleasePrompto:masterfrom
chewinggum604-art:feature/notebook-update-cli

Conversation

@chewinggum604-art
Copy link
Copy Markdown

Summary

NotebookLibrary.update_notebook() already exists on the class but has no
CLI front-end. To change a notebook's metadata today (description, topics,
tags, URL) you have to remove and re-add — which loses created_at,
use_count, and last_used.

This PR exposes update_notebook as a normal subcommand, mirroring the
shape of add:

python scripts/run.py notebook_manager.py update \
  --id my-notebook \
  --description "New description" \
  --topics "topic1,topic2,topic3"

All flags except --id are optional. Omitted flags leave the existing
value untouched. --topics and --tags replace the lists wholesale (same
semantics as add), which matches update_notebook()'s existing
behavior.

Diff

 scripts/notebook_manager.py | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Pure addition — no existing behavior changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant