diff --git a/CHECKLIST.md b/CHECKLIST.md index 143f36d..f484276 100644 --- a/CHECKLIST.md +++ b/CHECKLIST.md @@ -23,7 +23,7 @@ - [x] Add file content reading/writing utilities - [x] Implement path resolution and validation - [x] Add file timestamp tracking -- [ ] Create backup and restore mechanisms +- [x] Create backup and restore mechanisms # Core Commands @@ -56,10 +56,10 @@ ## Log Command -- [ ] `notevc log` - Show commit history -- [ ] Display snapshots in reverse chronological order -- [ ] Show commit hashes, messages, and timestamps -- [ ] add `--since` time filtering option +- [x] `notevc log` - Show commit history +- [x] Display snapshots in reverse chronological order +- [x] Show commit hashes, messages, and timestamps +- [x] add `--since` time filtering option # Advanced Commands @@ -75,10 +75,10 @@ ## Restore Command -- [ ] `notevc restore ` - Restore entire state -- [ ] `notevc restore ` - Restore specific file -- [ ] Add conformation prompts for destructive operations -- [ ] Handle file conflicts gracefully +- [x] `notevc restore ` - Restore entire state +- [x] `notevc restore ` - Restore specific file +- [x] Add conformation prompts for destructive operations +- [x] Handle file conflicts gracefully ## Show Command @@ -90,11 +90,11 @@ # Utilities and Polish -- [ ] Add colored output for better UX +- [x] Add colored output for better UX - [ ] Implement proper error handling messages - [ ] Add input validation for all commands - [ ] Create help system (`notevc --help`) -- [ ] Add version information (`notevc --version`) +- [x] Add version information (`notevc --version`) - [ ] Implement configuration file support @@ -110,11 +110,11 @@ # Build and Distribution -- [ ] Create fat JAR for distribution -- [ ] Add shell script wrapper for easy execution -- [ ] Test on different operating systems -- [ ] Create installation scripts -- [ ] Add build automation (GitHub Actions) +- [x] Create fat JAR for distribution +- [x] Add shell script wrapper for easy execution +- [x] Test on different operating systems +- [x] Create installation scripts +- [x] Add build automation (GitHub Actions) # Future Features diff --git a/README.md b/README.md index 67afc6a..4ff169b 100644 --- a/README.md +++ b/README.md @@ -1,84 +1,204 @@ # ![logo.png](./images/png/Color40X50.png) NoteVC: Version Control for Markdown +Block-level version control for markdown files. Track changes at the heading level, not just file level. +## Features +- **Block-level tracking**: Version control at heading granularity +- **Frontmatter support**: Control versioning with YAML frontmatter (tags, title, enabled flag) +- **Smart commits**: Only commits changed blocks +- **Block restoration**: Restore individual sections without affecting the entire file +- **Rich diffs**: See exactly which sections changed -# Repository management +--- -Initialize notevc repo: +## Installation + +Build from source: ```bash -notevc init [path] +gradle build ``` -Show changed files: +The executable will be in `build/install/notevc/bin/notevc` + +--- + +## Command Reference + +### Repository Management + +#### `notevc init [path]` +Initialize a new notevc repository in the current or specified directory. + +```bash +notevc init # Initialize in current directory +notevc init ./notes # Initialize in specific directory +``` + +#### `notevc status` or `notevc st` +Show the status of tracked files and which blocks have changed. + ```bash notevc status ``` -Create snapshot: +#### `notevc commit [options] "message"` +Create a commit (snapshot) of changed files. + +**Options:** +- `--file `: Commit only a specific file + +**Examples:** ```bash -notevc commit [--file ] "message" +notevc commit "Added new features" # Commit all changed files +notevc commit --file notes.md "Updated notes" # Commit specific file ``` -Show commit history: +--- + +### Viewing History + +#### `notevc log [options]` +Show commit history with details. + +**Options:** +- `--max-count ` or `-n `: Limit number of commits shown +- `--since