printavo-ruby 0.18.0 → 0.18.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b7e5a10f0b5ecc844c1625db1ebae2f19154c81d49a666af5d5f4e6f9d55bd8
4
- data.tar.gz: 8a75223829bbb6a67c9477460556b78260ef99104ab7e5ef9af7bdcc64c9b558
3
+ metadata.gz: d2291442eb2c04c3ead1543773bcd188723de181093941cdc8519681b5b43e4b
4
+ data.tar.gz: 00274b8c115044888d4099465521acf974c0356261130eb6aacaa21f1d4aa5ce
5
5
  SHA512:
6
- metadata.gz: 4a92c64b1c47d1f9aab27a2fb29957337f582fe4b59cfb675ee937fcd8ef18c4ebf078479fe8cbceb608589648636be5e74daf40f95e0c1d1df63c8d359bb106
7
- data.tar.gz: 90c15ea027dfffa37c57aab86086edee3624feb5b31cd4bec431cf41d250b3296bd097f388e69609f13077db7c46fc8db047aaaddbce7a7964d16f7b4b108b74
6
+ metadata.gz: fdd286fc6a29e0313aed8f7ebbea302f7737e17f44144a524396eadcde292d70d9a87b610d22ec3bd692a9a93572d7bb844c861c71dd1e87435c59a3cd465ade
7
+ data.tar.gz: 29719257b52dfd20f4f9da862e3ccca5df84f8dc64dfb564421a73cbe1b88e46e2a5b36891066ed1e43607e30a3e9a9c6ceecdb3697ac85ce53c2eb1a17b9afa
data/docs/FUTURE.md CHANGED
@@ -38,18 +38,8 @@ See [docs/CACHING.md](docs/CACHING.md) for caching options.
38
38
 
39
39
  ## Visualization
40
40
 
41
- ### Workflow Diagram Generation (SVG/PNG)
42
-
43
- Generate a visual map of a shop's Printavo status workflow:
44
-
45
- ```ruby
46
- client.workflow.diagram(format: :svg)
47
- # => Outputs an SVG flowchart: Quote → Approved → In Production → Completed
48
- ```
49
-
50
- Implementation options:
51
- - [ruby-graphviz](https://github.com/glejeune/Ruby-Graphviz) — DOT → SVG/PNG
52
- - Pure Ruby → Mermaid output (copy-paste into docs or GitHub markdown)
41
+ See **[docs/VISUALIZATION.md](VISUALIZATION.md)** for workflow diagram generation —
42
+ Mermaid, DOT, ASCII, and SVG output via the standalone example script.
53
43
 
54
44
  ## Multi-Language SDK Family
55
45
 
data/docs/TODO.md CHANGED
@@ -417,6 +417,15 @@ return values — they are exposed via model field accessors, not separate resou
417
417
  - [x] `default_ttl: 300` configurable per-client
418
418
  - [x] `docs/CACHING.md` updated with built-in adapter usage examples
419
419
 
420
+ ### v0.18.1 — Examples: Diagramming & Reporting
421
+
422
+ - [x] `examples/diagramming/workflow_diagram.rb` — Mermaid, DOT, ASCII, SVG (dot CLI + ruby-graphviz gem)
423
+ - [x] `examples/reporting/sales_report.rb` — today, week, month, quarter, YTD, last year, custom range
424
+ - [x] `examples/reporting/sales_tax_report.rb` — invoice-level estimates + fee-level taxable detail
425
+ - [x] `examples/reporting/customers_export.rb` — CSV, XLSX, XLS, vCard (.vcf), HubSpot, Salesforce, Mailchimp, Constant Contact, Beehiiv, Brevo, ActiveCampaign
426
+ - [x] `examples/reporting/outstanding_tasks.rb` — overdue, due today, this week, upcoming, no due date; by-assignee summary; HTML calendar export
427
+ - [x] `docs/FUTURE.md` — Workflow Diagram section replaced with examples reference and rationale
428
+
420
429
  ### v0.99.0 — API Freeze
421
430
 
422
431
  - [ ] Community feedback integration
@@ -0,0 +1,81 @@
1
+ <!-- docs/VISUALIZATION.md -->
2
+ # Visualization for [printavo-ruby](https://github.com/scarver2/printavo-ruby)
3
+
4
+ ## Workflow Diagram Generation
5
+
6
+ See **[examples/diagramming/workflow_diagram.rb](../examples/diagramming/workflow_diagram.rb)**
7
+ for a complete, runnable example covering all four output formats.
8
+
9
+ Adding diagram generation to the gem itself would require either shipping
10
+ `ruby-graphviz` as a hard dependency or assuming a system `dot` binary —
11
+ both are burdensome for a Ruby API client. The standalone example gives
12
+ consumers full control over their output format and toolchain without
13
+ bloating the gem.
14
+
15
+ **Supported formats in the example:**
16
+
17
+ | Format | Dependency | Best for |
18
+ |---|---|---|
19
+ | `:ascii` | none | Terminal output, quick sanity-check |
20
+ | `:mermaid` | none | GitHub README/issues/PRs, VS Code preview |
21
+ | `:dot` | none (text) | Piping to `dot -Tsvg` or any Graphviz renderer |
22
+ | `:svg` | `brew install graphviz` or `gem install ruby-graphviz` | Production-grade visual files |
23
+
24
+ Statuses are fetched via `client.statuses.all` and rendered as a linear
25
+ left-to-right flow in the order Printavo returns them. Printavo has no
26
+ explicit transition edges in its API — the workflow is an implied sequence.
27
+
28
+ ### Quick Start
29
+
30
+ ```bash
31
+ cd examples/diagramming
32
+ cp .env.example .env # fill in PRINTAVO_EMAIL and PRINTAVO_TOKEN
33
+ gem install printavo-ruby dotenv
34
+ ruby workflow_diagram.rb
35
+ ```
36
+
37
+ Output files written to the current directory:
38
+
39
+ | File | Format |
40
+ |---|---|
41
+ | *(stdout)* | ASCII chain |
42
+ | *(stdout)* | Mermaid fenced block |
43
+ | `workflow.dot` | Graphviz DOT source |
44
+ | `workflow_cli.svg` | SVG via `dot` CLI (if graphviz installed) |
45
+ | `workflow_gv.svg` | SVG via `ruby-graphviz` gem (if installed) |
46
+
47
+ ### Rendering DOT to Other Formats
48
+
49
+ ```bash
50
+ # SVG
51
+ dot -Tsvg workflow.dot > workflow.svg
52
+
53
+ # PNG
54
+ dot -Tpng workflow.dot > workflow.png
55
+
56
+ # PDF
57
+ dot -Tpdf workflow.dot > workflow.pdf
58
+ ```
59
+
60
+ ### Embedding Mermaid in GitHub Markdown
61
+
62
+ Paste the Mermaid output between fences in any `.md` file:
63
+
64
+ ````markdown
65
+ ```mermaid
66
+ flowchart LR
67
+ s_quote["Quote"] --> s_in_production["In Production"] --> s_completed["Completed"]
68
+ ```
69
+ ````
70
+
71
+ GitHub renders it automatically in READMEs, issues, PRs, and wiki pages.
72
+
73
+ ---
74
+
75
+ ## Colophon
76
+
77
+ [MIT License](LICENSE)
78
+
79
+ &copy;2026 [Stan Carver II](https://stancarver.com)
80
+
81
+ ![Made in Texas](https://raw.githubusercontent.com/scarver2/howdy-world/master/_dashboard/www/assets/made-in-texas.png)
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Printavo
5
- VERSION = '0.18.0'
5
+ VERSION = '0.18.1'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: printavo-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stan Carver II
@@ -285,6 +285,7 @@ files:
285
285
  - docs/CONTRIBUTING.md
286
286
  - docs/FUTURE.md
287
287
  - docs/TODO.md
288
+ - docs/VISUALIZATION.md
288
289
  - lib/printavo.rb
289
290
  - lib/printavo/cli.rb
290
291
  - lib/printavo/client.rb