diffstory 0.2.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.
@@ -0,0 +1,207 @@
1
+ Metadata-Version: 2.4
2
+ Name: diffstory
3
+ Version: 0.2.0
4
+ Summary: Transform Git diffs into rich, interactive, self-contained HTML reports
5
+ License: MIT
6
+ Project-URL: Homepage, https://github.com/lakshayjindal/diffstory
7
+ Classifier: Development Status :: 3 - Alpha
8
+ Classifier: Environment :: Console
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Topic :: Software Development :: Version Control :: Git
14
+ Requires-Python: >=3.10
15
+ Description-Content-Type: text/markdown
16
+ Requires-Dist: Pygments>=2.10
17
+
18
+ # DiffStory
19
+
20
+ **Transform Git diffs into rich, interactive, self-contained HTML reports.**
21
+
22
+ DiffStory turns any `git diff` into a beautiful, portable HTML report that answers not just *what* changed, but *who* changed it, *when*, and *why* — all offline, in a single file.
23
+
24
+ ```bash
25
+ pip install diffstory
26
+ cd my-repo
27
+ diffstory --staged -o report.html
28
+ # Open report.html in any browser
29
+ ```
30
+
31
+ ---
32
+
33
+ ## Features
34
+
35
+ ### Phase 1 (MVP)
36
+ - **Unified View** — Classic git-style diff with syntax highlighting
37
+ - **Side-by-Side View** — Original and modified columns, synchronized
38
+ - **Inline Edit View** — Word-level diff showing exact token changes
39
+ - **Syntax Highlighting** — 30+ languages via Pygments, light + dark themes
40
+ - **Statistics Dashboard** — Files changed, +/-, authors breakdown
41
+ - **File Sidebar** — Navigate files with search, collapse/expand
42
+ - **Keyboard Shortcuts** — `U`/`S`/`I` to switch views, `D` for theme, `Esc` to close
43
+ - **Theme Toggle** — Light/dark with system preference detection and persistence
44
+ - **Export Formats** — HTML, JSON, Markdown, CSV
45
+
46
+ ### Phase 2 (Blame Integration)
47
+ - **Blame Tooltips** — Hover any changed line to see author, commit, date, and message
48
+ - **Commit Drawer** — Click a line to open a detailed side panel with full commit metadata
49
+ - **Relative Time** — "2h ago", "3d ago" for at-a-glance recency
50
+
51
+ ### Future Phases
52
+ - Search across filename, author, commit message, and code content
53
+ - Filtering by author, date range, file type, change type
54
+ - Commit evolution viewer and timeline
55
+ - Deep linking to specific lines and files
56
+
57
+ ---
58
+
59
+ ## Installation
60
+
61
+ ### From PyPI (once published)
62
+ ```bash
63
+ pip install diffstory
64
+ ```
65
+
66
+ ### From source
67
+ ```bash
68
+ git clone https://github.com/user/diffstory.git
69
+ cd diffstory
70
+ pip install -e .
71
+ ```
72
+
73
+ **Requirements:** Python 3.10+, Git
74
+
75
+ ---
76
+
77
+ ## Usage
78
+
79
+ ### Basic Commands
80
+
81
+ ```bash
82
+ # Working tree diff
83
+ diffstory
84
+
85
+ # Staged changes
86
+ diffstory --staged
87
+
88
+ # Compare commits
89
+ diffstory HEAD~3 HEAD
90
+
91
+ # Compare branches
92
+ diffstory main feature
93
+
94
+ # Custom output file
95
+ diffstory -o my-report.html
96
+
97
+ # Multiple export formats
98
+ diffstory --staged --json --md --csv -o report
99
+ ```
100
+
101
+ ### Keyboard Shortcuts (in the HTML report)
102
+
103
+ | Key | Action |
104
+ |---|---|
105
+ | `U` | Unified view |
106
+ | `S` | Side-by-side view |
107
+ | `I` | Inline edit view |
108
+ | `D` | Toggle theme |
109
+ | `Esc` | Close drawer / stats panel |
110
+ | `F` | Focus file search |
111
+
112
+ ---
113
+
114
+ ## Report Features
115
+
116
+ ### Three View Modes
117
+
118
+ | Mode | Description |
119
+ |---|---|
120
+ | **Unified** | Classic git diff format with line numbers |
121
+ | **Side-by-Side** | Two-column layout — original on left, modified on right |
122
+ | **Inline Edit** | Word-level diff showing additions (green) and removals (red strikethrough) within the same line |
123
+
124
+ ### Blame Tooltips (Phase 2)
125
+
126
+ Hover over any changed line to see:
127
+ - **Author** name
128
+ - **Commit hash** (short, 7 chars)
129
+ - **Commit subject**
130
+ - **Date** with relative time ("2h ago")
131
+
132
+ Click any line to open the **Commit Drawer** with full metadata: body, committer, parents, files changed, insertions/deletions.
133
+
134
+ ### Statistics
135
+
136
+ The statistics panel shows:
137
+ - Files changed, additions, deletions
138
+ - Added / deleted / modified / renamed file counts
139
+ - Top 10 most-changed files with per-file breakdown
140
+
141
+ ---
142
+
143
+ ## Output
144
+
145
+ Reports are fully self-contained single HTML files:
146
+ - All CSS inlined
147
+ - All JavaScript inlined
148
+ - All data embedded as JSON
149
+ - No external dependencies
150
+ - Works offline in any modern browser
151
+ - Safe to email or archive
152
+
153
+ ---
154
+
155
+ ## Project Structure
156
+
157
+ ```
158
+ diffstory/
159
+ ├── pyproject.toml # Build config & entry point
160
+ ├── requirements.md # Full product requirements
161
+ ├── .gitignore
162
+ ├── src/diffstory/
163
+ │ ├── __init__.py # Package version
164
+ │ ├── __main__.py # python -m diffstory
165
+ │ ├── cli.py # CLI argument parsing & orchestration
166
+ │ ├── git_utils.py # Git subprocess wrappers
167
+ │ ├── diff_parser.py # Unified diff → structured data
168
+ │ ├── syntax.py # Pygments syntax highlighting
169
+ │ └── html_generator.py # Self-contained HTML report generation
170
+ └── tests/
171
+ └── __init__.py
172
+ ```
173
+
174
+ ---
175
+
176
+ ## Development
177
+
178
+ ```bash
179
+ # Install in editable mode
180
+ pip install -e .
181
+
182
+ # Run against a test repo
183
+ cd /tmp && mkdir test && cd test
184
+ git init
185
+ echo "hello" > test.py
186
+ git add -A && git commit -m "init"
187
+ echo "world" >> test.py
188
+ diffstory
189
+ ```
190
+
191
+ ---
192
+
193
+ ## Security
194
+
195
+ DiffStory is designed for air-gapped, audit-safe use:
196
+ - Never uploads code
197
+ - Never transmits data
198
+ - No telemetry
199
+ - No accounts required
200
+ - No external API calls
201
+ - Never modifies your repository
202
+
203
+ ---
204
+
205
+ ## License
206
+
207
+ MIT
@@ -0,0 +1,190 @@
1
+ # DiffStory
2
+
3
+ **Transform Git diffs into rich, interactive, self-contained HTML reports.**
4
+
5
+ DiffStory turns any `git diff` into a beautiful, portable HTML report that answers not just *what* changed, but *who* changed it, *when*, and *why* — all offline, in a single file.
6
+
7
+ ```bash
8
+ pip install diffstory
9
+ cd my-repo
10
+ diffstory --staged -o report.html
11
+ # Open report.html in any browser
12
+ ```
13
+
14
+ ---
15
+
16
+ ## Features
17
+
18
+ ### Phase 1 (MVP)
19
+ - **Unified View** — Classic git-style diff with syntax highlighting
20
+ - **Side-by-Side View** — Original and modified columns, synchronized
21
+ - **Inline Edit View** — Word-level diff showing exact token changes
22
+ - **Syntax Highlighting** — 30+ languages via Pygments, light + dark themes
23
+ - **Statistics Dashboard** — Files changed, +/-, authors breakdown
24
+ - **File Sidebar** — Navigate files with search, collapse/expand
25
+ - **Keyboard Shortcuts** — `U`/`S`/`I` to switch views, `D` for theme, `Esc` to close
26
+ - **Theme Toggle** — Light/dark with system preference detection and persistence
27
+ - **Export Formats** — HTML, JSON, Markdown, CSV
28
+
29
+ ### Phase 2 (Blame Integration)
30
+ - **Blame Tooltips** — Hover any changed line to see author, commit, date, and message
31
+ - **Commit Drawer** — Click a line to open a detailed side panel with full commit metadata
32
+ - **Relative Time** — "2h ago", "3d ago" for at-a-glance recency
33
+
34
+ ### Future Phases
35
+ - Search across filename, author, commit message, and code content
36
+ - Filtering by author, date range, file type, change type
37
+ - Commit evolution viewer and timeline
38
+ - Deep linking to specific lines and files
39
+
40
+ ---
41
+
42
+ ## Installation
43
+
44
+ ### From PyPI (once published)
45
+ ```bash
46
+ pip install diffstory
47
+ ```
48
+
49
+ ### From source
50
+ ```bash
51
+ git clone https://github.com/user/diffstory.git
52
+ cd diffstory
53
+ pip install -e .
54
+ ```
55
+
56
+ **Requirements:** Python 3.10+, Git
57
+
58
+ ---
59
+
60
+ ## Usage
61
+
62
+ ### Basic Commands
63
+
64
+ ```bash
65
+ # Working tree diff
66
+ diffstory
67
+
68
+ # Staged changes
69
+ diffstory --staged
70
+
71
+ # Compare commits
72
+ diffstory HEAD~3 HEAD
73
+
74
+ # Compare branches
75
+ diffstory main feature
76
+
77
+ # Custom output file
78
+ diffstory -o my-report.html
79
+
80
+ # Multiple export formats
81
+ diffstory --staged --json --md --csv -o report
82
+ ```
83
+
84
+ ### Keyboard Shortcuts (in the HTML report)
85
+
86
+ | Key | Action |
87
+ |---|---|
88
+ | `U` | Unified view |
89
+ | `S` | Side-by-side view |
90
+ | `I` | Inline edit view |
91
+ | `D` | Toggle theme |
92
+ | `Esc` | Close drawer / stats panel |
93
+ | `F` | Focus file search |
94
+
95
+ ---
96
+
97
+ ## Report Features
98
+
99
+ ### Three View Modes
100
+
101
+ | Mode | Description |
102
+ |---|---|
103
+ | **Unified** | Classic git diff format with line numbers |
104
+ | **Side-by-Side** | Two-column layout — original on left, modified on right |
105
+ | **Inline Edit** | Word-level diff showing additions (green) and removals (red strikethrough) within the same line |
106
+
107
+ ### Blame Tooltips (Phase 2)
108
+
109
+ Hover over any changed line to see:
110
+ - **Author** name
111
+ - **Commit hash** (short, 7 chars)
112
+ - **Commit subject**
113
+ - **Date** with relative time ("2h ago")
114
+
115
+ Click any line to open the **Commit Drawer** with full metadata: body, committer, parents, files changed, insertions/deletions.
116
+
117
+ ### Statistics
118
+
119
+ The statistics panel shows:
120
+ - Files changed, additions, deletions
121
+ - Added / deleted / modified / renamed file counts
122
+ - Top 10 most-changed files with per-file breakdown
123
+
124
+ ---
125
+
126
+ ## Output
127
+
128
+ Reports are fully self-contained single HTML files:
129
+ - All CSS inlined
130
+ - All JavaScript inlined
131
+ - All data embedded as JSON
132
+ - No external dependencies
133
+ - Works offline in any modern browser
134
+ - Safe to email or archive
135
+
136
+ ---
137
+
138
+ ## Project Structure
139
+
140
+ ```
141
+ diffstory/
142
+ ├── pyproject.toml # Build config & entry point
143
+ ├── requirements.md # Full product requirements
144
+ ├── .gitignore
145
+ ├── src/diffstory/
146
+ │ ├── __init__.py # Package version
147
+ │ ├── __main__.py # python -m diffstory
148
+ │ ├── cli.py # CLI argument parsing & orchestration
149
+ │ ├── git_utils.py # Git subprocess wrappers
150
+ │ ├── diff_parser.py # Unified diff → structured data
151
+ │ ├── syntax.py # Pygments syntax highlighting
152
+ │ └── html_generator.py # Self-contained HTML report generation
153
+ └── tests/
154
+ └── __init__.py
155
+ ```
156
+
157
+ ---
158
+
159
+ ## Development
160
+
161
+ ```bash
162
+ # Install in editable mode
163
+ pip install -e .
164
+
165
+ # Run against a test repo
166
+ cd /tmp && mkdir test && cd test
167
+ git init
168
+ echo "hello" > test.py
169
+ git add -A && git commit -m "init"
170
+ echo "world" >> test.py
171
+ diffstory
172
+ ```
173
+
174
+ ---
175
+
176
+ ## Security
177
+
178
+ DiffStory is designed for air-gapped, audit-safe use:
179
+ - Never uploads code
180
+ - Never transmits data
181
+ - No telemetry
182
+ - No accounts required
183
+ - No external API calls
184
+ - Never modifies your repository
185
+
186
+ ---
187
+
188
+ ## License
189
+
190
+ MIT
@@ -0,0 +1,32 @@
1
+ [build-system]
2
+ requires = ["setuptools>=59.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "diffstory"
7
+ version = "0.2.0"
8
+ description = "Transform Git diffs into rich, interactive, self-contained HTML reports"
9
+ readme = "README.md"
10
+ license = {text = "MIT"}
11
+ requires-python = ">=3.10"
12
+ dependencies = [
13
+ "Pygments>=2.10",
14
+ ]
15
+ classifiers = [
16
+ "Development Status :: 3 - Alpha",
17
+ "Environment :: Console",
18
+ "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Topic :: Software Development :: Version Control :: Git",
23
+ ]
24
+
25
+ [project.urls]
26
+ Homepage = "https://github.com/lakshayjindal/diffstory"
27
+
28
+ [project.scripts]
29
+ diffstory = "diffstory.cli:main"
30
+
31
+ [tool.setuptools.packages.find]
32
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ """DiffStory — Transform Git diffs into rich, interactive HTML reports."""
2
+
3
+ __version__ = "0.2.0"
@@ -0,0 +1,5 @@
1
+ """Allow running diffstory with `python -m diffstory`."""
2
+ from diffstory.cli import main
3
+
4
+ if __name__ == "__main__":
5
+ main()