powertom 0.2.4 → 0.2.5
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 +4 -4
- data/README.md +4 -8
- data/lib/powertom/version.rb +2 -2
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 78b836be78ce3eb57f1ee656d4a73ffdd307c60bf12bfa11e332800dcda43ece
|
|
4
|
+
data.tar.gz: 5c0ea72ff17fa162c17c265d6a850b0c4b7ff5d16665a1ea418cc9467f5a8a9d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 827c7c32494ffe34e928e33be2eeec447cae486d67cd7fe718e61ead3bd590730ab30824e4ed4a073016ebe7577591f86c0e32ec73b6587a6658a2ea7bb9c99d
|
|
7
|
+
data.tar.gz: e79d9d9bca6fc0b15367cf8d28d4e5ff789374a4b807648e14897281f268b433c653f7165349677009a214685e8501e2d4ce8d970bfd031ccacd472798c4a5b0
|
data/README.md
CHANGED
|
@@ -70,7 +70,7 @@ Notes: {{#each scenarios}}
|
|
|
70
70
|
**2. The engineer prepares the data** — TOML is the default data format:
|
|
71
71
|
|
|
72
72
|
```toml
|
|
73
|
-
# TOML —
|
|
73
|
+
# TOML — default data format
|
|
74
74
|
product_name = "Student workspace"
|
|
75
75
|
show_compare = true
|
|
76
76
|
|
|
@@ -88,17 +88,16 @@ detail = "Ready automatically every Sunday"
|
|
|
88
88
|
```ruby
|
|
89
89
|
require "powertom"
|
|
90
90
|
|
|
91
|
-
#
|
|
92
|
-
# remplacement des images
|
|
91
|
+
# Read the template, bind tags, clone/remove pages, replace images
|
|
93
92
|
result = PowerTom.render("templates/report.pptx", data: "data/report.toml")
|
|
94
93
|
result.save("out/report.pptx")
|
|
95
|
-
result.warnings.each { |w| warn w } #
|
|
94
|
+
result.warnings.each { |w| warn w } # unused fields, fallback values…
|
|
96
95
|
```
|
|
97
96
|
|
|
98
97
|
Or pass a Hash directly when the data comes from a database or an API:
|
|
99
98
|
|
|
100
99
|
```ruby
|
|
101
|
-
#
|
|
100
|
+
# Same call with in-memory data
|
|
102
101
|
result = PowerTom.render("templates/report.pptx", data: {
|
|
103
102
|
product_name: "Student workspace",
|
|
104
103
|
kpis: [{ name: "Adoption rate", value: "29.7%" }],
|
|
@@ -280,9 +279,6 @@ PowerTom occupe la couche intermédiaire : un **moteur de modèles au-dessus de
|
|
|
280
279
|
```ruby
|
|
281
280
|
# Gemfile
|
|
282
281
|
gem "powertom"
|
|
283
|
-
|
|
284
|
-
# Chemin local tant que le gem n'est pas publié sur RubyGems
|
|
285
|
-
# gem "powertom", path: "/chemin/vers/PowerTom"
|
|
286
282
|
```
|
|
287
283
|
|
|
288
284
|
Nécessite Ruby >= 3.3 ; dépend de `ruby_pptx ~> 0.2.0` (lecture/écriture) et de `tomlrb ~> 3.0` (fichiers de données).
|
data/lib/powertom/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: powertom
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- PowerTom contributors
|
|
@@ -45,7 +45,9 @@ description: |-
|
|
|
45
45
|
设计师在 PowerPoint 里维护模板,工程师传一个 Ruby Hash 或 TOML 文件,产出成品 deck。排版、字体、配色、母版和主题完全由设计工具掌控。
|
|
46
46
|
executables: []
|
|
47
47
|
extensions: []
|
|
48
|
-
extra_rdoc_files:
|
|
48
|
+
extra_rdoc_files:
|
|
49
|
+
- LICENSE
|
|
50
|
+
- README.md
|
|
49
51
|
files:
|
|
50
52
|
- LICENSE
|
|
51
53
|
- README.md
|
|
@@ -67,6 +69,7 @@ homepage: https://github.com/ixepet/powertom
|
|
|
67
69
|
licenses:
|
|
68
70
|
- MIT
|
|
69
71
|
metadata:
|
|
72
|
+
homepage_uri: https://github.com/ixepet/powertom
|
|
70
73
|
source_code_uri: https://github.com/ixepet/powertom
|
|
71
74
|
bug_tracker_uri: https://github.com/ixepet/powertom/issues
|
|
72
75
|
documentation_uri: https://github.com/ixepet/powertom/blob/main/docs/usage.md
|