opencode-log 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. opencode_log-0.3.0/.github/workflows/release.yml +55 -0
  2. opencode_log-0.3.0/.gitignore +10 -0
  3. opencode_log-0.3.0/CHANGELOG.md +126 -0
  4. opencode_log-0.3.0/LICENSE +21 -0
  5. opencode_log-0.3.0/PKG-INFO +519 -0
  6. opencode_log-0.3.0/README.md +494 -0
  7. opencode_log-0.3.0/UPGRADE_GUIDE.md +224 -0
  8. opencode_log-0.3.0/opencode_log/__init__.py +3 -0
  9. opencode_log-0.3.0/opencode_log/cache.py +240 -0
  10. opencode_log-0.3.0/opencode_log/cli.py +565 -0
  11. opencode_log-0.3.0/opencode_log/markdown.py +197 -0
  12. opencode_log-0.3.0/opencode_log/models.py +131 -0
  13. opencode_log-0.3.0/opencode_log/normalizer.py +146 -0
  14. opencode_log-0.3.0/opencode_log/render.py +360 -0
  15. opencode_log-0.3.0/opencode_log/storage.py +271 -0
  16. opencode_log-0.3.0/opencode_log/templates/combined.html +345 -0
  17. opencode_log-0.3.0/opencode_log/templates/components/base_styles.css +126 -0
  18. opencode_log-0.3.0/opencode_log/templates/components/edit_diff_styles.css +76 -0
  19. opencode_log-0.3.0/opencode_log/templates/components/filter_styles.css +168 -0
  20. opencode_log-0.3.0/opencode_log/templates/components/global_styles.css +237 -0
  21. opencode_log-0.3.0/opencode_log/templates/components/message_styles.css +1057 -0
  22. opencode_log-0.3.0/opencode_log/templates/components/page_nav_styles.css +79 -0
  23. opencode_log-0.3.0/opencode_log/templates/components/project_card_styles.css +138 -0
  24. opencode_log-0.3.0/opencode_log/templates/components/pygments_styles.css +218 -0
  25. opencode_log-0.3.0/opencode_log/templates/components/search.html +774 -0
  26. opencode_log-0.3.0/opencode_log/templates/components/search_inline.html +29 -0
  27. opencode_log-0.3.0/opencode_log/templates/components/search_inline_script.html +3 -0
  28. opencode_log-0.3.0/opencode_log/templates/components/search_results_panel.html +10 -0
  29. opencode_log-0.3.0/opencode_log/templates/components/search_styles.css +371 -0
  30. opencode_log-0.3.0/opencode_log/templates/components/session_nav.html +39 -0
  31. opencode_log-0.3.0/opencode_log/templates/components/session_nav_styles.css +106 -0
  32. opencode_log-0.3.0/opencode_log/templates/components/timeline.html +493 -0
  33. opencode_log-0.3.0/opencode_log/templates/components/timeline_styles.css +151 -0
  34. opencode_log-0.3.0/opencode_log/templates/components/timezone_converter.js +115 -0
  35. opencode_log-0.3.0/opencode_log/templates/components/todo_styles.css +186 -0
  36. opencode_log-0.3.0/opencode_log/templates/index.html +308 -0
  37. opencode_log-0.3.0/opencode_log/templates/transcript.html +372 -0
  38. opencode_log-0.3.0/pyproject.toml +55 -0
  39. opencode_log-0.3.0/tests/test_cache_roundtrip.py +48 -0
  40. opencode_log-0.3.0/tests/test_cli_formats.py +112 -0
  41. opencode_log-0.3.0/tests/test_markdown_render.py +51 -0
  42. opencode_log-0.3.0/tests/test_storage_and_normalizer.py +112 -0
  43. opencode_log-0.3.0/uv.lock +462 -0
@@ -0,0 +1,55 @@
1
+ name: Release Python Package
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - name: Checkout
17
+ uses: actions/checkout@v4
18
+
19
+ - name: Setup Python
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: "3.11"
23
+
24
+ - name: Install build tools
25
+ run: python -m pip install --upgrade pip build twine
26
+
27
+ - name: Build package
28
+ run: python -m build
29
+
30
+ - name: Check metadata
31
+ run: python -m twine check dist/*
32
+
33
+ - name: Upload dist artifact
34
+ uses: actions/upload-artifact@v4
35
+ with:
36
+ name: python-dist
37
+ path: dist/
38
+
39
+ publish-pypi:
40
+ needs: build
41
+ runs-on: ubuntu-latest
42
+ if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
43
+ environment:
44
+ name: pypi
45
+ permissions:
46
+ id-token: write
47
+ steps:
48
+ - name: Download dist artifact
49
+ uses: actions/download-artifact@v4
50
+ with:
51
+ name: python-dist
52
+ path: dist/
53
+
54
+ - name: Publish to PyPI
55
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,10 @@
1
+ __pycache__/
2
+ *.pyc
3
+
4
+ dist/
5
+ build/
6
+ *.egg-info/
7
+
8
+ out/
9
+ opencode-logs/
10
+ .opencode-log-cache/
@@ -0,0 +1,126 @@
1
+ # Changelog
2
+
3
+ All notable changes to opencode-log will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.3.0] - 2025-03-18
9
+
10
+ ### Added - Major UI/UX Overhaul (Inspired by claude-code-log)
11
+
12
+ #### 🎨 Interactive Features
13
+ - **Timeline Visualization**: Interactive vis-timeline component with:
14
+ - Message grouping by type (user, assistant, tool, reasoning)
15
+ - Click-to-navigate functionality
16
+ - Zoomable and draggable interface
17
+ - Resizable height
18
+ - Filter integration
19
+ - **Advanced Search & Filter**:
20
+ - Inline search with real-time filtering
21
+ - Message type toggle buttons with counts
22
+ - Select all/none actions
23
+ - Search results highlighting
24
+ - **Floating Action Buttons**: Quick access toolbar with:
25
+ - Timeline toggle
26
+ - Search/filter panel toggle
27
+ - Details expand/collapse
28
+ - Scroll to top
29
+ - **Timezone Conversion**: Automatic conversion of timestamps to user's local timezone
30
+ - **Message Folding**: Collapsible content sections with `<details>` elements
31
+
32
+ #### 🎨 Visual Improvements
33
+ - **Modern CSS Components**: Modular component-based styling:
34
+ - `global_styles.css` - Shared base styles
35
+ - `message_styles.css` - Message rendering
36
+ - `filter_styles.css` - Filter toolbar
37
+ - `timeline_styles.css` - Timeline visualization
38
+ - `search_styles.css` - Search components
39
+ - `todo_styles.css` - Todo list styling
40
+ - `project_card_styles.css` - Project cards
41
+ - `session_nav_styles.css` - Session navigation
42
+ - `pygments_styles.css` - Code syntax highlighting
43
+ - `edit_diff_styles.css` - Diff display
44
+ - `page_nav_styles.css` - Pagination
45
+ - **Enhanced Card Design**: Modern card-based layouts with shadows and hover effects
46
+ - **Responsive Layout**: Improved mobile and desktop responsiveness
47
+ - **Better Typography**: Improved readability with refined font sizes and spacing
48
+
49
+ #### πŸš€ CLI Improvements
50
+ - **Default Browser Opening**: Now opens browser by default after generation
51
+ - Use `--no-open-browser` to disable (reversed from `--open-browser`)
52
+ - Smart opening: index.html for multiple projects, combined_transcripts.html for single project
53
+ - **Positional Argument**: Added `[PROJECT_PATH]` as optional positional argument
54
+ - Replaces `--project-dir` (now deprecated but still supported)
55
+ - Default behavior: process all projects if no path provided
56
+ - **Short Options**: Added `-o` for `--output` and `-f` for `--format`
57
+ - **New Options**:
58
+ - `--clear-output`: Clear generated HTML/Markdown files before processing
59
+ - `--page-size`: Control pagination (default: 2000 messages per page)
60
+ - `--no-timeline`: Disable timeline visualization for faster generation
61
+ - `--no-syntax-highlight`: Disable code highlighting for faster generation
62
+ - `--no-warnings`: Suppress schema version and other informational warnings
63
+ - `--debug`: Show full error tracebacks
64
+ - **Format Normalization**: `--format md` now recognized as alias for `markdown`
65
+
66
+ #### πŸ“¦ Dependencies
67
+ - Added `pygments>=2.19.0` for code syntax highlighting
68
+ - Added `mistune>=3.1.4` for markdown rendering
69
+
70
+ #### πŸ“š Documentation
71
+ - Completely rewritten README with:
72
+ - Comprehensive feature list
73
+ - Updated CLI usage examples
74
+ - Advanced usage patterns
75
+ - Bilingual (English/δΈ­ζ–‡) documentation
76
+ - Added CHANGELOG.md following Keep a Changelog format
77
+
78
+ ### Changed
79
+
80
+ #### Template Updates
81
+ - Rewrote `transcript.html` with modern layout and all new features
82
+ - Rewrote `combined.html` with session grouping and filtering
83
+ - Rewrote `index.html` with improved project cards and search
84
+ - Added HTML component templates:
85
+ - `timeline.html` - Timeline visualization
86
+ - `search_inline.html` - Inline search input
87
+ - `search_inline_script.html` - Search functionality
88
+ - `search_results_panel.html` - Search results display
89
+ - `session_nav.html` - Session navigation macro
90
+ - `timezone_converter.js` - Timezone conversion
91
+
92
+ #### Behavior Changes
93
+ - Default behavior changed: now processes all projects by default
94
+ - Browser opens automatically unless `--no-open-browser` is specified
95
+ - Improved error handling with optional debug mode
96
+
97
+ ### Deprecated
98
+ - `--project-dir` option (use positional `PROJECT_PATH` instead)
99
+ - Still supported for backward compatibility but hidden from help
100
+
101
+ ### Fixed
102
+ - Improved cache key generation for better cache hit rates
103
+ - Better handling of missing or invalid data
104
+ - More robust error messages
105
+
106
+ ---
107
+
108
+ ## [0.2.0] - Previous Release
109
+
110
+ ### Features
111
+ - Basic HTML log generation from OpenCode storage
112
+ - Support for todos and session diffs
113
+ - Simple caching system
114
+ - Markdown output option
115
+ - Date range filtering
116
+ - Message type rendering (user, assistant, tool, reasoning)
117
+
118
+ ---
119
+
120
+ ## [0.1.0] - Initial Release
121
+
122
+ ### Features
123
+ - Basic OpenCode storage parsing
124
+ - HTML output generation
125
+ - Session and project organization
126
+ - Simple message rendering
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 opencode-log contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.