Skip to content

Commit 9e8c071

Browse files
wesmclaude
andauthored
Automate screenshot SVG generation (#6)
This spares us having to create manual screenshots. Textual has a "pilot" driver and the ability to export screenshots to SVG or PNG. Co-authored-by: Claude <noreply@anthropic.com>
1 parent 065ffc4 commit 9e8c071

File tree

10 files changed

+823
-96
lines changed

10 files changed

+823
-96
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
A keyboard-driven terminal UI for managing personal finance transactions. Built for users who prefer efficiency and direct control over their financial data.
1111

12-
![moneyflow main screen](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/home-screen.png)
12+
![moneyflow main screen](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/home-screen.svg)
1313

1414
**Supported Platforms:**
1515
-**Monarch Money** - Full integration with editing and sync

docs/guide/editing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ This workflow gives you precise control over merchant names while making it easy
6262

6363
Select multiple transactions to edit them all at once:
6464

65-
![Multi-select transactions with checkmarks](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/drill-down-detail-multi-select.png)
65+
![Multi-select transactions with checkmarks](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/drill-down-detail-multi-select.svg)
6666

6767
1. Press ++space++ on each transaction you want to edit
6868
- A `` checkmark appears
@@ -86,7 +86,7 @@ Select multiple transactions to edit them all at once:
8686

8787
From any aggregate view (Merchants, Categories, Groups, Accounts), press ++m++, ++c++, or ++h++ to edit ALL transactions in that group:
8888

89-
![Bulk edit merchant modal](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/drill-down-bulk-edit-merchant.png)
89+
![Bulk edit merchant modal](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/drill-down-bulk-edit-merchant.svg)
9090

9191
**Example: Rename a merchant (all transactions)**
9292

@@ -96,7 +96,7 @@ From any aggregate view (Merchants, Categories, Groups, Accounts), press ++m++,
9696
4. Type "Amazon" and press ++enter++
9797
5. ALL transactions for that merchant are renamed
9898

99-
![Edit category selection](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/drill-down-edit-category.png)
99+
![Edit category selection](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/drill-down-edit-category.svg)
100100

101101
### Multi-Select Groups (NEW!)
102102

docs/guide/monarch.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ moneyflow
5555

5656
On first run, you'll be prompted to select a backend:
5757

58-
![Backend selection](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/backend-select.png)
58+
![Backend selection](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/backend-select.svg)
5959

6060
Select **Monarch Money**.
6161

6262
### 2. Enter Monarch Money Credentials
6363

6464
You'll see the credential setup screen:
6565

66-
![Credential setup screen](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/monarch-credentials.png)
66+
![Credential setup screen](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/monarch-credentials.svg)
6767

6868
Enter:
6969

docs/guide/navigation.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ Press `g` to cycle through aggregate views. Aggregate views group your transacti
1414
<tr>
1515
<td width="50%">
1616
<strong>Merchant View</strong><br>
17-
<img src="https://raw.githubusercontent.com/wesm/moneyflow-assets/main/cycle-1-merchants.png" width="100%">
17+
<img src="https://raw.githubusercontent.com/wesm/moneyflow-assets/main/cycle-1-merchants.svg" width="100%">
1818
</td>
1919
<td width="50%">
2020
<strong>Category View</strong><br>
21-
<img src="https://raw.githubusercontent.com/wesm/moneyflow-assets/main/cycle-2-categories.png" width="100%">
21+
<img src="https://raw.githubusercontent.com/wesm/moneyflow-assets/main/cycle-2-categories.svg" width="100%">
2222
</td>
2323
</tr>
2424
<tr>
2525
<td width="50%">
2626
<strong>Group View</strong><br>
27-
<img src="https://raw.githubusercontent.com/wesm/moneyflow-assets/main/cycle-3-groups.png" width="100%">
27+
<img src="https://raw.githubusercontent.com/wesm/moneyflow-assets/main/cycle-3-groups.svg" width="100%">
2828
</td>
2929
<td width="50%">
3030
<strong>Account View</strong><br>
31-
<img src="https://raw.githubusercontent.com/wesm/moneyflow-assets/main/cycle-4-accounts.png" width="100%">
31+
<img src="https://raw.githubusercontent.com/wesm/moneyflow-assets/main/cycle-4-accounts.svg" width="100%">
3232
</td>
3333
</tr>
3434
</table>
@@ -86,13 +86,13 @@ Press `d` to view all transactions ungrouped in chronological order, or press `E
8686
- Multi-select for bulk operations
8787
- View full transaction details
8888

89-
![Detail view with indicators](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/detail-view-flags.png)
89+
![Detail view with indicators](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/detail-view-flags.svg)
9090

9191
## Drill-Down
9292

9393
From any aggregate view, press `Enter` on a row to drill into it and see the individual transactions that make up that aggregate.
9494

95-
![Merchant view with Amazon highlighted](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/merchants-view.png)
95+
![Merchant view with Amazon highlighted](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/merchants-view.svg)
9696

9797
**Example workflow:**
9898

@@ -101,7 +101,7 @@ From any aggregate view, press `Enter` on a row to drill into it and see the ind
101101
3. **Press `Enter`** - Drill down to see transactions
102102
4. **View results** - All Amazon transactions displayed
103103

104-
![Drilled down into Amazon - transaction detail view](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/drill-down-detail.png)
104+
![Drilled down into Amazon - transaction detail view](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/drill-down-detail.svg)
105105

106106
The breadcrumb shows your current path: `Merchants > Amazon`
107107

@@ -124,9 +124,9 @@ Once you've drilled down into a specific item, press `g` to sub-group the filter
124124
5. **Press `g` again** - Returns to detail view
125125
- Shows all Amazon transactions ungrouped
126126

127-
![Drilled into Merchant, grouped by Category](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/merchants-drill-by-category.png)
127+
![Drilled into Merchant, grouped by Category](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/merchants-drill-by-category.svg)
128128

129-
![Drilled into Amazon, grouped by Account](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/drill-down-group-by-account.png)
129+
![Drilled into Amazon, grouped by Account](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/drill-down-group-by-account.svg)
130130

131131
Sub-grouping helps answer analytical questions like:
132132
- "How much did I spend on groceries from Amazon?"
@@ -147,7 +147,7 @@ You can drill down from sub-grouped views to add another level of filtering, cre
147147
4. **View results** - Breadcrumb shows: `Merchants > Amazon > Groceries`
148148
- Now viewing only Amazon grocery transactions
149149

150-
![Multi-level drill-down breadcrumb](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/drill-down-multi-level.png)
150+
![Multi-level drill-down breadcrumb](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/drill-down-multi-level.svg)
151151

152152
This powerful feature lets you combine multiple filters to answer very specific questions about your spending.
153153

@@ -213,7 +213,7 @@ moneyflow --month 2025-03 # Load March 2025 only
213213

214214
Press `/` to search and filter transactions by text matching across merchant names, categories, and transaction notes.
215215

216-
![Search modal](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/search-modal.png)
216+
![Search modal](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/search-modal.svg)
217217

218218
**Using search:**
219219

@@ -222,7 +222,7 @@ Press `/` to search and filter transactions by text matching across merchant nam
222222
3. **Press `Enter`** - Applies the search filter
223223
4. **Press `Escape`** - Clears search and returns to previous view
224224

225-
![Search results for "coffee"](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/merchants-search.png)
225+
![Search results for "coffee"](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/merchants-search.svg)
226226

227227
Search filters persist as you navigate between different views. The breadcrumb displays "Search: your query" to remind you that search is active. To clear a search, press `/` again and submit an empty search, or press `Escape` if search was your most recent action.
228228

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
**Terminal UI for personal finance power users**
99

10-
![moneyflow terminal UI](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/home-screen.png)
10+
![moneyflow terminal UI](https://raw.githubusercontent.com/wesm/moneyflow-assets/main/home-screen.svg)
1111

1212
```bash
1313
# Install and run

docs/javascripts/lightbox.js

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
overlay.id = 'lightbox-overlay';
1313
overlay.innerHTML = `
1414
<div class="lightbox-content">
15-
<img id="lightbox-image" src="" alt="">
15+
<div id="lightbox-image-container"></div>
1616
<button id="lightbox-close" aria-label="Close lightbox">&times;</button>
1717
<div class="lightbox-caption"></div>
1818
</div>
@@ -55,11 +55,33 @@
5555
// Open lightbox with image
5656
function openLightbox(imgSrc, altText) {
5757
const overlay = document.getElementById('lightbox-overlay') || createLightbox();
58-
const lightboxImg = document.getElementById('lightbox-image');
58+
const container = document.getElementById('lightbox-image-container');
5959
const caption = overlay.querySelector('.lightbox-caption');
6060

61-
lightboxImg.src = imgSrc;
62-
lightboxImg.alt = altText;
61+
// Clear previous content
62+
container.innerHTML = '';
63+
64+
// Check if it's an SVG
65+
if (imgSrc.endsWith('.svg')) {
66+
// For SVG, create an img element with specific sizing
67+
const img = document.createElement('img');
68+
img.src = imgSrc;
69+
img.alt = altText;
70+
img.id = 'lightbox-image';
71+
img.style.width = 'auto';
72+
img.style.height = 'auto';
73+
img.style.maxWidth = '100%';
74+
img.style.maxHeight = '100%';
75+
container.appendChild(img);
76+
} else {
77+
// For PNG/JPG, use regular img tag
78+
const img = document.createElement('img');
79+
img.src = imgSrc;
80+
img.alt = altText;
81+
img.id = 'lightbox-image';
82+
container.appendChild(img);
83+
}
84+
6385
caption.textContent = altText;
6486

6587
overlay.classList.add('active');

docs/stylesheets/extra.css

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,21 @@
208208
align-items: center;
209209
}
210210

211+
/* Lightbox image container */
212+
#lightbox-image-container {
213+
max-width: 75vw;
214+
max-height: 70vh;
215+
display: flex;
216+
align-items: center;
217+
justify-content: center;
218+
}
219+
211220
/* Lightbox image */
212221
#lightbox-image {
213222
max-width: 100%;
214-
max-height: 85vh;
223+
max-height: 100%;
224+
width: 100%;
225+
height: 100%;
215226
object-fit: contain;
216227
border-radius: 4px;
217228
box-shadow: 0 8px 32px rgba(0,0,0,0.5);
@@ -255,8 +266,9 @@
255266
background-color: rgba(0, 0, 0, 0.98);
256267
}
257268

258-
#lightbox-image {
259-
max-height: 90vh;
269+
#lightbox-image-container {
270+
max-width: 85vw;
271+
max-height: 70vh;
260272
}
261273

262274
#lightbox-close {

0 commit comments

Comments
 (0)