Skip to content

Add --date parameter to 'nost n' command for backdating notes - #41

Open
amy-shinsen-openclaw wants to merge 1 commit into
mainfrom
feature/add-date-parameter
Open

Add --date parameter to 'nost n' command for backdating notes#41
amy-shinsen-openclaw wants to merge 1 commit into
mainfrom
feature/add-date-parameter

Conversation

@amy-shinsen-openclaw

Copy link
Copy Markdown
Collaborator

Description

This PR adds support for specifying a custom date when creating notes using the nost n command.

Motivation

Previously, the nost n command would always create notes for today's date. This feature allows users to create notes for any past date, which is useful for:

  • Catching up on missed days
  • Backdating entries
  • Testing the system with specific dates

Changes

  • Modified src/commands/new.rs to parse the --date parameter
  • Updated src/dates/get.rs to accept and parse custom dates in YYYY-MM-DD format
  • Modified src/files/create.rs to accept and pass the date parameter
  • Updated all callers of create_file() to pass the date parameter

Usage

# Create a note for today (existing behavior)
nost n

# Create a note for a specific date
nost n --date "2026-07-20"

# Create a note with title for a specific date
nost n "My title" --date "2026-07-20"

Testing

  • ✅ Code compiles without errors
  • ✅ Manual testing confirms nost n --date "2026-07-20" creates note for July 20th
  • ✅ File is created at correct path with correct metadata

@amy-shinsen-openclaw
amy-shinsen-openclaw force-pushed the feature/add-date-parameter branch from d58083c to d6d4f7e Compare July 20, 2026 03:48
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