Commit 5516c76
Add batch command for converting all sessions to HTML archive (#11)
* Add batch command for converting all sessions to HTML archive
Adds a new `batch` command that converts all local Claude Code sessions
into a browsable HTML archive with:
- Master index listing all projects with session counts
- Per-project pages listing sessions by date
- Individual session transcripts (using existing generate_html)
New features:
- `find_all_sessions()` - discovers sessions grouped by project
- `get_project_display_name()` - extracts readable names from encoded paths
- `--dry-run` flag to preview what would be converted
- `--include-agents` flag to include agent-* session files
- Progress indicator during conversion
Usage: claude-code-transcripts batch -o ./my-archive
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Refactor batch command for better code reuse and error handling
- Move datetime import to module level for consistency
- Add progress_callback parameter to generate_batch_html() for progress reporting
- Add try/except around individual session conversion with failed_sessions tracking
- Refactor batch_cmd() to use generate_batch_html() instead of duplicating the loop
- Add --quiet/-q flag to suppress non-error output for scripting
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix --quiet flag not respected in dry-run mode
- Wrap dry-run output in `if not quiet` check
- Add test for --quiet with --dry-run combination
- Add .playwright-mcp/ to .gitignore
- Rename html variable to html_content to avoid shadowing html module
- Remove unused imports from test file
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add batch command documentation to README
Document the new batch command that converts all local Claude Code
sessions to a browsable HTML archive with master and project indexes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Rename batch command to all
https://gistpreview.github.io/?be627e42c25a1ffdf39cfb2f9a79f1ff/index.html
Refs #11 (comment)
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Simon Willison <swillison@gmail.com>1 parent 68f7395 commit 5516c76
File tree
6 files changed
+894
-3
lines changed- src/claude_code_transcripts
- templates
- tests
6 files changed
+894
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
102 | 141 | | |
103 | 142 | | |
104 | 143 | | |
| |||
0 commit comments