sakusei 0.3.0 → 0.4.0

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: ab634a886e4a04c4a309f672ff57317e54eab5d44e8fcac304a42c9463c5bb15
4
- data.tar.gz: 4c2e2a610935627d01c80dd0f0b7ad48f6a840dddf2b433a122f4655f3a27826
3
+ metadata.gz: 51994014be2b8900d793d1954389a52a2726b54703cd60673886f7b85cfbeaa2
4
+ data.tar.gz: d650c71e17c76b74f770dd32cc83b45848cacd0b1f7a8f49c3d4eb98185fee50
5
5
  SHA512:
6
- metadata.gz: caf4eb2b35c3de565416c7001f5c5fb4e79837f3ddc5cb5817154b2ea4eb6e6125ad818b71520337b6381b90b9d0fd2ecbae392fe8b1d7645e41038df9d457fe
7
- data.tar.gz: 579ad95d4b5a86a3095f7c6138a57bc577863cfecef7244520404bfddcd84281b9d405fbbc37053dcaf7dea6b7f8d3b81461325e186b7ba806fe547b684f96ff
6
+ metadata.gz: 0c8a398207d15178355e2da253dd4e3d20e9e524a044125214e7c074f264892a5ae9749b2773cf42c4de353532d731a8798d52eb922da38f6d0e5e5185940f8c
7
+ data.tar.gz: 0b8970fdb542f9fe5f2b81bda13019be3893501735c62962f7a66e60c2acc8f38672ccf74fc4df08ece6b149796d84da52a4207b1ccde31793d079856c426ce7
data/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  *.gem
2
2
  .DS_Store
3
3
  *.pdf
4
+ !examples/*.pdf
4
5
  node_modules/
5
6
  .worktrees/
data/README.md CHANGED
@@ -1,14 +1,5 @@
1
1
  # Sakusei
2
2
 
3
- **Sakusei** (作成) — from the Japanese words meaning "creation," "making," or "craft."
4
-
5
- Like a master artisan refining their craft, Sakusei transforms raw Markdown into beautifully crafted PDF documents. Every document is an act of creation — structured, styled, and brought to life with precision.
6
-
7
- The name embodies the philosophy behind this tool: documents aren't just generated, they're _crafted_.
8
-
9
-
10
- ## Overview
11
-
12
3
  Sakusei is a build system for creating PDF documents from Markdown source files. It supports:
13
4
 
14
5
  - **Markdown to PDF conversion** via `md-to-pdf`
@@ -17,16 +8,16 @@ Sakusei is a build system for creating PDF documents from Markdown source files.
17
8
  - **File inclusion** for multi-file documents
18
9
  - **PDF concatenation** for combining multiple documents
19
10
 
11
+ ---
20
12
 
21
- ## Installation
13
+ **Sakusei** (作成) — from the Japanese words meaning "creation," "making," or "craft."
22
14
 
23
- ### macOS (Homebrew)
15
+ Like a master artisan refining their craft, Sakusei transforms raw Markdown into beautifully crafted PDF documents. Every document is an act of creation — structured, styled, and brought to life with precision.
16
+
17
+ The name embodies the philosophy behind this tool: documents aren't just generated, they're _crafted_.
24
18
 
25
- ```bash
26
- # Add the tap and install
27
- brew tap keithrowell/sakusei https://github.com/keithrowell/sakusei/homebrew-tap
28
- brew install sakusei
29
- ```
19
+
20
+ ## Installation
30
21
 
31
22
  ### Ruby Gem
32
23
 
@@ -86,6 +77,142 @@ sakusei init my_company
86
77
  sakusei concat part1.pdf part2.pdf -o combined.pdf
87
78
  ```
88
79
 
80
+ ## Examples
81
+
82
+ ### Basic usage
83
+
84
+ Plain Markdown — headings, lists, a table, a blockquote — built with the default style pack:
85
+
86
+ ```markdown
87
+ # Project Kickoff Notes
88
+
89
+ **Date:** 14 April 2026
90
+ **Attendees:** Sarah Chen, Marcus Webb, Priya Nair
91
+
92
+ ---
93
+
94
+ ## Goals for This Sprint
95
+
96
+ The team aligned on three priorities for the next two weeks:
97
+
98
+ 1. Finalise the data model and get sign-off from the product team
99
+ 2. Stand up the staging environment so QA can begin testing early
100
+ 3. Resolve the outstanding API authentication issues before the client demo
101
+
102
+ ## Key Decisions
103
+
104
+ - **Database:** Sticking with PostgreSQL — the migration cost to Mongo isn't justified at this scale
105
+ - **Auth:** Moving to OAuth 2.0 with JWT refresh tokens; existing session-based auth deprecated end of month
106
+ - **Deployment:** Staging mirrors production (same instance type, same region) to avoid environment surprises
107
+
108
+ ## Action Items
109
+
110
+ | Owner | Task | Due |
111
+ |--------|-------------------------------------|--------|
112
+ | Marcus | Finalise schema and create migration | 17 Apr |
113
+ | Priya | Provision staging environment | 16 Apr |
114
+ | Sarah | Draft OAuth integration spec | 18 Apr |
115
+ | All | Review and comment on API auth RFC | 15 Apr |
116
+
117
+ > The client demo is locked in for the 25th — that date is immovable.
118
+ > Flag anything at risk by end of day Wednesday.
119
+ ```
120
+
121
+ Built with `sakusei build getting-started.md`:
122
+
123
+ [![Project Kickoff Notes PDF](examples/getting-started-screenshot.png)](examples/getting-started.pdf)
124
+
125
+ The full source is at [`examples/getting-started.md`](examples/getting-started.md).
126
+
127
+
128
+ ### Style packs and Vue components
129
+
130
+ The source for a one-page consulting proposal, using a custom style pack with `DocMeta`, `ProcessSteps`, and `DeliverableCards` components:
131
+
132
+ ```markdown
133
+ # Meridian Property Group — Operations Automation Assessment
134
+
135
+ <vue-component name="DocMeta"
136
+ client="Meridian Property Group"
137
+ preparedBy="KD Consulting"
138
+ date="<%= today('%d %B %Y') %>"
139
+ status="Proposal"
140
+ />
141
+
142
+
143
+ ## Opportunity
144
+
145
+ Meridian Property Group manages a portfolio of 340 residential and commercial tenancies
146
+ across Southeast Queensland. The business runs on strong fundamentals, but operational
147
+ bandwidth is a growing constraint: leasing coordinators spend the majority of their week
148
+ on routine correspondence, manual data entry, and chasing approvals through email chains.
149
+ This is work that AI and automation can largely eliminate.
150
+
151
+ KD Consulting proposes a focused **Operations Automation Assessment** — a two-week
152
+ engagement to map current workflows, identify the highest-impact automation opportunities,
153
+ and deliver a clear implementation roadmap.
154
+
155
+
156
+ ## How We Work
157
+
158
+ Our methodology is structured around rapid discovery and focused analysis. We do not run
159
+ open-ended workshops or produce lengthy process documentation for its own sake. Every
160
+ step is oriented toward the output: a prioritised set of recommendations the business
161
+ can act on.
162
+
163
+ <vue-component name="ProcessSteps" steps='[
164
+ {
165
+ "title": "Discovery",
166
+ "description": "Structured interviews with leasing coordinators, property managers,
167
+ and leadership. We map the full lifecycle of a tenancy — from enquiry through to
168
+ renewal or exit — and identify where time goes and where friction accumulates."
169
+ },
170
+ {
171
+ "title": "Analysis & Opportunity Mapping",
172
+ "description": "We analyse workflows against current AI and automation capabilities,
173
+ assessing each opportunity for feasibility, integration requirements, and business
174
+ impact."
175
+ },
176
+ {
177
+ "title": "Roadmap & Report",
178
+ "description": "Prioritised recommendations delivered as a practical implementation
179
+ roadmap — phased by effort and impact, with clear next steps for each initiative and
180
+ indicative investment requirements."
181
+ }
182
+ ]' />
183
+
184
+
185
+ ## Deliverables
186
+
187
+ <vue-component name="DeliverableCards" columns="3" items='[
188
+ {
189
+ "title": "Workflow Assessment",
190
+ "description": "A clear map of current operations across leasing, tenancy management,
191
+ and communications — documenting where time is spent and where the significant
192
+ friction points lie."
193
+ },
194
+ {
195
+ "title": "Automation Opportunity Register",
196
+ "description": "A structured register of identified automation opportunities, each
197
+ assessed for business impact, implementation effort, and integration requirements
198
+ with existing systems."
199
+ },
200
+ {
201
+ "title": "Implementation Roadmap",
202
+ "description": "A phased, prioritised action plan with recommended sequencing,
203
+ indicative timelines, and investment estimates — ready to brief a delivery team or
204
+ internal stakeholders."
205
+ }
206
+ ]' />
207
+ ```
208
+
209
+ Built with `sakusei build meridian-proposal.md -s kd-consulting`:
210
+
211
+ [![Meridian Property Group proposal PDF](examples/meridian-proposal-screenshot.png)](examples/meridian-proposal.pdf)
212
+
213
+ The full source is at [`examples/meridian-proposal.md`](examples/meridian-proposal.md).
214
+
215
+
89
216
  ## Style Packs
90
217
 
91
218
  Style packs are stored in `.sakusei/style_packs/` directories. Sakusei searches for style packs by walking up the directory tree from your source file.
@@ -126,20 +253,22 @@ Environment: <%= env('RAILS_ENV', 'development') %>
126
253
 
127
254
  ### Manual Page Breaks
128
255
 
129
- Insert page breaks in your markdown using HTML:
256
+ Insert a page break with the `::break::` shorthand:
130
257
 
131
258
  ```markdown
132
259
  # Chapter 1
133
260
 
134
261
  Content here...
135
262
 
136
- <div class="page-break"></div>
263
+ ::break::
137
264
 
138
265
  # Chapter 2
139
266
 
140
267
  More content...
141
268
  ```
142
269
 
270
+ This expands to `<div class="page-break"></div>` before rendering. You can also use that HTML directly if you prefer.
271
+
143
272
  Available classes:
144
273
  - `.page-break` or `.page-break-after` - Break after this element
145
274
  - `.page-break-before` - Break before this element
@@ -0,0 +1,31 @@
1
+ # Project Kickoff Notes
2
+
3
+ **Date:** 14 April 2026
4
+ **Attendees:** Sarah Chen, Marcus Webb, Priya Nair
5
+
6
+ ---
7
+
8
+ ## Goals for This Sprint
9
+
10
+ The team aligned on three priorities for the next two weeks:
11
+
12
+ 1. Finalise the data model and get sign-off from the product team
13
+ 2. Stand up the staging environment so QA can begin testing early
14
+ 3. Resolve the outstanding API authentication issues before the client demo
15
+
16
+ ## Key Decisions
17
+
18
+ - **Database:** Sticking with PostgreSQL — the migration cost to Mongo isn't justified at this scale
19
+ - **Auth:** Moving to OAuth 2.0 with JWT refresh tokens; existing session-based auth deprecated end of month
20
+ - **Deployment:** Staging mirrors production (same instance type, same region) to avoid environment surprises
21
+
22
+ ## Action Items
23
+
24
+ | Owner | Task | Due |
25
+ |--------|------------------------------------|--------|
26
+ | Marcus | Finalise schema and create migration | 17 Apr |
27
+ | Priya | Provision staging environment | 16 Apr |
28
+ | Sarah | Draft OAuth integration spec | 18 Apr |
29
+ | All | Review and comment on API auth RFC | 15 Apr |
30
+
31
+ > The client demo is locked in for the 25th — that date is immovable. Flag anything at risk by end of day Wednesday.
Binary file
@@ -0,0 +1,61 @@
1
+ # Meridian Property Group — Operations Automation Assessment
2
+
3
+ <vue-component name="DocMeta"
4
+ client="Meridian Property Group"
5
+ preparedBy="KD Consulting"
6
+ date="<%= today('%d %B %Y') %>"
7
+ status="Proposal"
8
+ />
9
+
10
+
11
+ Report Generated <%= today %>
12
+
13
+ ## Opportunity
14
+
15
+ Meridian Property Group manages a portfolio of 340 residential and commercial tenancies across Southeast Queensland. The business runs on strong fundamentals, but operational bandwidth is a growing constraint: leasing coordinators spend the majority of their week on routine correspondence, manual data entry, and chasing approvals through email chains. This is work that AI and automation can largely eliminate.
16
+
17
+ KD Consulting proposes a focused **Operations Automation Assessment** — a two-week engagement to map current workflows, identify the highest-impact automation opportunities, and deliver a clear implementation roadmap. The outcome is a practical action plan, not a theoretical report. Meridian's team will finish the engagement knowing exactly what to build, in what order, and what it will take to get there.
18
+
19
+
20
+ ## How We Work
21
+
22
+ Our methodology is structured around rapid discovery and focused analysis. We do not run open-ended workshops or produce lengthy process documentation for its own sake. Every step is oriented toward the output: a prioritised set of recommendations the business can act on.
23
+
24
+ <vue-component name="ProcessSteps" steps='[
25
+ {
26
+ "title": "Discovery",
27
+ "description": "Structured interviews with leasing coordinators, property managers, and leadership. We map the full lifecycle of a tenancy — from enquiry through to renewal or exit — and identify where time goes and where friction accumulates."
28
+ },
29
+ {
30
+ "title": "Analysis & Opportunity Mapping",
31
+ "description": "We analyse workflows against current AI and automation capabilities, assessing each opportunity for feasibility, integration requirements, and business impact. We distinguish quick wins from longer-horizon initiatives."
32
+ },
33
+ {
34
+ "title": "Roadmap & Report",
35
+ "description": "Prioritised recommendations delivered as a practical implementation roadmap — phased by effort and impact, with clear next steps for each initiative and indicative investment requirements."
36
+ }
37
+ ]' />
38
+
39
+
40
+ ## Deliverables
41
+
42
+ <vue-component name="DeliverableCards" columns="3" items='[
43
+ {
44
+ "title": "Workflow Assessment",
45
+ "description": "A clear map of current operations across leasing, tenancy management, and communications — documenting where time is spent and where the significant friction points lie."
46
+ },
47
+ {
48
+ "title": "Automation Opportunity Register",
49
+ "description": "A structured register of identified automation opportunities, each assessed for business impact, implementation effort, and integration requirements with existing systems."
50
+ },
51
+ {
52
+ "title": "Implementation Roadmap",
53
+ "description": "A phased, prioritised action plan with recommended sequencing, indicative timelines, and investment estimates — ready to brief a delivery team or internal stakeholders."
54
+ }
55
+ ]' />
56
+
57
+ ---
58
+
59
+ *This proposal is valid for 30 days from the date above. Prepared in confidence for Meridian Property Group.*
60
+
61
+ **KD Consulting**
Binary file
@@ -30,6 +30,9 @@ module Sakusei
30
30
  $stderr.puts "[sakusei] processing ERB..."
31
31
  processed_content = process_erb(resolved_content)
32
32
 
33
+ # 3.5. Expand shorthand syntax (e.g. ::break:: → page-break div)
34
+ processed_content = expand_break_syntax(processed_content)
35
+
33
36
  # 4. Process Vue components (if available)
34
37
  processed_content = process_vue(processed_content, style_pack)
35
38
 
@@ -67,6 +70,10 @@ module Sakusei
67
70
  VueProcessor.new(content, @source_dir, style_pack: style_pack).process
68
71
  end
69
72
 
73
+ def expand_break_syntax(content)
74
+ content.gsub(/::break::/, '<div class="page-break"></div>')
75
+ end
76
+
70
77
  def wrap_headings(content)
71
78
  HeadingWrapper.new(content).wrap
72
79
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sakusei
4
- VERSION = '0.3.0'
4
+ VERSION = '0.4.0'
5
5
  end
@@ -17,7 +17,7 @@ module.exports = {
17
17
  `,
18
18
  footerTemplate: `
19
19
  <div style="font-size: 9px; width: 100%; text-align: center; color: #666;">
20
- Page <span class="pageNumber"></span> of <span class="totalPages"></span>
20
+ <span class="pageNumber"></span>
21
21
  </div>
22
22
  `
23
23
  },
@@ -1,5 +1,5 @@
1
1
  <!-- Custom footer template - used when configured in config.js -->
2
2
  <!-- Available classes: date, title, url, pageNumber, totalPages -->
3
3
  <div style="font-size: 9px; width: 100%; text-align: center; color: #666;">
4
- Page <span class="pageNumber"></span> of <span class="totalPages"></span>
4
+ <span class="pageNumber"></span>
5
5
  </div>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sakusei
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Rowell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-18 00:00:00.000000000 Z
11
+ date: 2026-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -80,6 +80,12 @@ files:
80
80
  - README.md
81
81
  - Rakefile
82
82
  - bin/sakusei
83
+ - examples/getting-started-screenshot.png
84
+ - examples/getting-started.md
85
+ - examples/getting-started.pdf
86
+ - examples/meridian-proposal-screenshot.png
87
+ - examples/meridian-proposal.md
88
+ - examples/meridian-proposal.pdf
83
89
  - lib/sakusei.rb
84
90
  - lib/sakusei/builder.rb
85
91
  - lib/sakusei/cli.rb