trmnl_preview 0.7.1 → 0.7.2

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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/bin/trmnlp +15 -13
  3. metadata +17 -301
  4. data/CHANGELOG.md +0 -139
  5. data/LICENSE.txt +0 -21
  6. data/README.md +0 -144
  7. data/bin/rake +0 -27
  8. data/lib/trmnlp/api_client.rb +0 -86
  9. data/lib/trmnlp/app.rb +0 -103
  10. data/lib/trmnlp/cli.rb +0 -68
  11. data/lib/trmnlp/commands/base.rb +0 -40
  12. data/lib/trmnlp/commands/build.rb +0 -21
  13. data/lib/trmnlp/commands/clone.rb +0 -30
  14. data/lib/trmnlp/commands/init.rb +0 -55
  15. data/lib/trmnlp/commands/login.rb +0 -27
  16. data/lib/trmnlp/commands/pull.rb +0 -43
  17. data/lib/trmnlp/commands/push.rb +0 -67
  18. data/lib/trmnlp/commands/serve.rb +0 -25
  19. data/lib/trmnlp/commands.rb +0 -1
  20. data/lib/trmnlp/config/app.rb +0 -47
  21. data/lib/trmnlp/config/plugin.rb +0 -75
  22. data/lib/trmnlp/config/project.rb +0 -54
  23. data/lib/trmnlp/config.rb +0 -15
  24. data/lib/trmnlp/context.rb +0 -238
  25. data/lib/trmnlp/paths.rb +0 -58
  26. data/lib/trmnlp/screen_generator.rb +0 -240
  27. data/lib/trmnlp/version.rb +0 -5
  28. data/lib/trmnlp.rb +0 -14
  29. data/templates/init/.trmnlp.yml +0 -14
  30. data/templates/init/bin/trmnlp +0 -44
  31. data/templates/init/src/full.liquid +0 -1
  32. data/templates/init/src/half_horizontal.liquid +0 -1
  33. data/templates/init/src/half_vertical.liquid +0 -1
  34. data/templates/init/src/quadrant.liquid +0 -1
  35. data/templates/init/src/settings.yml +0 -15
  36. data/templates/init/src/shared.liquid +0 -1
  37. data/trmnl_preview.gemspec +0 -68
  38. data/web/public/highlight/highlight.min.js +0 -315
  39. data/web/public/highlight/styles/atom-one-dark.min.css +0 -1
  40. data/web/public/index.css +0 -113
  41. data/web/public/index.js +0 -83
  42. data/web/public/trmnl-picker.js +0 -656
  43. data/web/views/index.erb +0 -68
  44. data/web/views/render_html.erb +0 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f442804907f15903eb4e5f543ad94eb18fdef92f82d191e67c4554621ca3c74
4
- data.tar.gz: 0e8df9b455430254cc007c28e9799155b6e75cccc675fd9790e9a260e998c84a
3
+ metadata.gz: d37a034edabdffdea4cfd43b0a768f43955d0d1d41d8b7d5d49a8c30de676525
4
+ data.tar.gz: cc6e4d027d53e52e4c05b1a1f35ddafbbf136fa3467c5b1015d5813397935b49
5
5
  SHA512:
6
- metadata.gz: ae89a85a00a4b5719128dc4e198cda157085c905b914a3f30ebf14b17f7c2ff3d3c4f87552e0c455d0691671998c003b019cf34dd5f948859f64749f05b615c0
7
- data.tar.gz: 59642ee5f4741bf88fbcedcdcc8af927ed80127b044afdc464144e660a283c055dd395d8e579d97b58b001e7f441ecafe63a838bb90f9ea6cc2ed4ea3f8aff69
6
+ metadata.gz: c55ca2009766d890fbfc851752281d587ee4f76d48df50eb144e4aff113f8ae7255c1003a9519f2182151b1dd8294edb566462306c5d7777661ef60ba0bd831e
7
+ data.tar.gz: 5060f91212a819e479a12ddf72d44e970d098781abdacedd994a1716bb2642201dc5c753b09ee1da3c69de2b3a6acf191cd847967c6ae412f53f08042eca1557
data/bin/trmnlp CHANGED
@@ -1,17 +1,19 @@
1
- #! /usr/bin/env ruby
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- require 'thor'
4
+ warn <<~MESSAGE
5
+ trmnlp requires Ruby 4.0 or newer.
4
6
 
5
- require_relative '../lib/trmnlp/cli'
7
+ You are running Ruby #{RUBY_VERSION}. RubyGems installed this notice
8
+ instead of trmnlp, because the current release cannot run on your Ruby.
6
9
 
7
- # Force UTC to match trmnl.com server time zone
8
- ENV['TZ'] = 'UTC'
10
+ To use trmnlp, either:
9
11
 
10
- begin
11
- TRMNLP::CLI.start
12
- rescue TRMNLP::Error => e
13
- puts "Error: #{e.message}"
14
- exit 1
15
- rescue Interrupt
16
- exit 1
17
- end
12
+ * Upgrade to Ruby 4.0 or newer, then run:
13
+ gem install trmnl_preview
14
+
15
+ * Or run it through Docker, no Ruby needed:
16
+ https://github.com/usetrmnl/trmnlp#installing-via-docker
17
+ MESSAGE
18
+
19
+ exit 1
metadata CHANGED
@@ -1,267 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trmnl_preview
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rockwell Schrock
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-02-02 00:00:00.000000000 Z
11
- dependencies:
12
- - !ruby/object:Gem::Dependency
13
- name: sinatra
14
- requirement: !ruby/object:Gem::Requirement
15
- requirements:
16
- - - "~>"
17
- - !ruby/object:Gem::Version
18
- version: '4.1'
19
- type: :runtime
20
- prerelease: false
21
- version_requirements: !ruby/object:Gem::Requirement
22
- requirements:
23
- - - "~>"
24
- - !ruby/object:Gem::Version
25
- version: '4.1'
26
- - !ruby/object:Gem::Dependency
27
- name: rackup
28
- requirement: !ruby/object:Gem::Requirement
29
- requirements:
30
- - - "~>"
31
- - !ruby/object:Gem::Version
32
- version: '2.2'
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '2.2'
40
- - !ruby/object:Gem::Dependency
41
- name: puma
42
- requirement: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: '6.5'
47
- type: :runtime
48
- prerelease: false
49
- version_requirements: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - "~>"
52
- - !ruby/object:Gem::Version
53
- version: '6.5'
54
- - !ruby/object:Gem::Dependency
55
- name: faye-websocket
56
- requirement: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - "~>"
59
- - !ruby/object:Gem::Version
60
- version: 0.11.3
61
- type: :runtime
62
- prerelease: false
63
- version_requirements: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: 0.11.3
68
- - !ruby/object:Gem::Dependency
69
- name: activesupport
70
- requirement: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '8.0'
75
- type: :runtime
76
- prerelease: false
77
- version_requirements: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: '8.0'
82
- - !ruby/object:Gem::Dependency
83
- name: trmnl-liquid
84
- requirement: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - "~>"
87
- - !ruby/object:Gem::Version
88
- version: 0.4.0
89
- type: :runtime
90
- prerelease: false
91
- version_requirements: !ruby/object:Gem::Requirement
92
- requirements:
93
- - - "~>"
94
- - !ruby/object:Gem::Version
95
- version: 0.4.0
96
- - !ruby/object:Gem::Dependency
97
- name: selenium-webdriver
98
- requirement: !ruby/object:Gem::Requirement
99
- requirements:
100
- - - "~>"
101
- - !ruby/object:Gem::Version
102
- version: '4.39'
103
- type: :runtime
104
- prerelease: false
105
- version_requirements: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - "~>"
108
- - !ruby/object:Gem::Version
109
- version: '4.39'
110
- - !ruby/object:Gem::Dependency
111
- name: mini_magick
112
- requirement: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - "~>"
115
- - !ruby/object:Gem::Version
116
- version: 4.12.0
117
- type: :runtime
118
- prerelease: false
119
- version_requirements: !ruby/object:Gem::Requirement
120
- requirements:
121
- - - "~>"
122
- - !ruby/object:Gem::Version
123
- version: 4.12.0
124
- - !ruby/object:Gem::Dependency
125
- name: filewatcher
126
- requirement: !ruby/object:Gem::Requirement
127
- requirements:
128
- - - "~>"
129
- - !ruby/object:Gem::Version
130
- version: '2.1'
131
- type: :runtime
132
- prerelease: false
133
- version_requirements: !ruby/object:Gem::Requirement
134
- requirements:
135
- - - "~>"
136
- - !ruby/object:Gem::Version
137
- version: '2.1'
138
- - !ruby/object:Gem::Dependency
139
- name: faraday
140
- requirement: !ruby/object:Gem::Requirement
141
- requirements:
142
- - - "~>"
143
- - !ruby/object:Gem::Version
144
- version: '2.1'
145
- type: :runtime
146
- prerelease: false
147
- version_requirements: !ruby/object:Gem::Requirement
148
- requirements:
149
- - - "~>"
150
- - !ruby/object:Gem::Version
151
- version: '2.1'
152
- - !ruby/object:Gem::Dependency
153
- name: faraday-multipart
154
- requirement: !ruby/object:Gem::Requirement
155
- requirements:
156
- - - "~>"
157
- - !ruby/object:Gem::Version
158
- version: '1.1'
159
- type: :runtime
160
- prerelease: false
161
- version_requirements: !ruby/object:Gem::Requirement
162
- requirements:
163
- - - "~>"
164
- - !ruby/object:Gem::Version
165
- version: '1.1'
166
- - !ruby/object:Gem::Dependency
167
- name: xdg
168
- requirement: !ruby/object:Gem::Requirement
169
- requirements:
170
- - - "~>"
171
- - !ruby/object:Gem::Version
172
- version: '9.1'
173
- type: :runtime
174
- prerelease: false
175
- version_requirements: !ruby/object:Gem::Requirement
176
- requirements:
177
- - - "~>"
178
- - !ruby/object:Gem::Version
179
- version: '9.1'
180
- - !ruby/object:Gem::Dependency
181
- name: rubyzip
182
- requirement: !ruby/object:Gem::Requirement
183
- requirements:
184
- - - "~>"
185
- - !ruby/object:Gem::Version
186
- version: 2.3.0
187
- type: :runtime
188
- prerelease: false
189
- version_requirements: !ruby/object:Gem::Requirement
190
- requirements:
191
- - - "~>"
192
- - !ruby/object:Gem::Version
193
- version: 2.3.0
194
- - !ruby/object:Gem::Dependency
195
- name: thor
196
- requirement: !ruby/object:Gem::Requirement
197
- requirements:
198
- - - "~>"
199
- - !ruby/object:Gem::Version
200
- version: '1.3'
201
- type: :runtime
202
- prerelease: false
203
- version_requirements: !ruby/object:Gem::Requirement
204
- requirements:
205
- - - "~>"
206
- - !ruby/object:Gem::Version
207
- version: '1.3'
208
- - !ruby/object:Gem::Dependency
209
- name: oj
210
- requirement: !ruby/object:Gem::Requirement
211
- requirements:
212
- - - "~>"
213
- - !ruby/object:Gem::Version
214
- version: 3.16.9
215
- type: :runtime
216
- prerelease: false
217
- version_requirements: !ruby/object:Gem::Requirement
218
- requirements:
219
- - - "~>"
220
- - !ruby/object:Gem::Version
221
- version: 3.16.9
222
- - !ruby/object:Gem::Dependency
223
- name: tzinfo-data
224
- requirement: !ruby/object:Gem::Requirement
225
- requirements:
226
- - - "~>"
227
- - !ruby/object:Gem::Version
228
- version: '1.2025'
229
- type: :runtime
230
- prerelease: false
231
- version_requirements: !ruby/object:Gem::Requirement
232
- requirements:
233
- - - "~>"
234
- - !ruby/object:Gem::Version
235
- version: '1.2025'
236
- - !ruby/object:Gem::Dependency
237
- name: pathname
238
- requirement: !ruby/object:Gem::Requirement
239
- requirements:
240
- - - "~>"
241
- - !ruby/object:Gem::Version
242
- version: '0.4'
243
- type: :runtime
244
- prerelease: false
245
- version_requirements: !ruby/object:Gem::Requirement
246
- requirements:
247
- - - "~>"
248
- - !ruby/object:Gem::Version
249
- version: '0.4'
250
- - !ruby/object:Gem::Dependency
251
- name: rexml
252
- requirement: !ruby/object:Gem::Requirement
253
- requirements:
254
- - - "~>"
255
- - !ruby/object:Gem::Version
256
- version: '3.4'
257
- type: :runtime
258
- prerelease: false
259
- version_requirements: !ruby/object:Gem::Requirement
260
- requirements:
261
- - - "~>"
262
- - !ruby/object:Gem::Version
263
- version: '3.4'
264
- description: Automatically rebuild and preview TRNML plugins in multiple views
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ description: This version is not trmnlp. It is a notice published for Ruby installs
13
+ too old to run trmnlp, which would otherwise silently receive an outdated release.
14
+ Upgrade to Ruby 4.0 or newer and reinstall.
265
15
  email:
266
16
  - rockwell@schrock.me
267
17
  executables:
@@ -269,55 +19,21 @@ executables:
269
19
  extensions: []
270
20
  extra_rdoc_files: []
271
21
  files:
272
- - CHANGELOG.md
273
- - LICENSE.txt
274
- - README.md
275
- - bin/rake
276
22
  - bin/trmnlp
277
- - lib/trmnlp.rb
278
- - lib/trmnlp/api_client.rb
279
- - lib/trmnlp/app.rb
280
- - lib/trmnlp/cli.rb
281
- - lib/trmnlp/commands.rb
282
- - lib/trmnlp/commands/base.rb
283
- - lib/trmnlp/commands/build.rb
284
- - lib/trmnlp/commands/clone.rb
285
- - lib/trmnlp/commands/init.rb
286
- - lib/trmnlp/commands/login.rb
287
- - lib/trmnlp/commands/pull.rb
288
- - lib/trmnlp/commands/push.rb
289
- - lib/trmnlp/commands/serve.rb
290
- - lib/trmnlp/config.rb
291
- - lib/trmnlp/config/app.rb
292
- - lib/trmnlp/config/plugin.rb
293
- - lib/trmnlp/config/project.rb
294
- - lib/trmnlp/context.rb
295
- - lib/trmnlp/paths.rb
296
- - lib/trmnlp/screen_generator.rb
297
- - lib/trmnlp/version.rb
298
- - templates/init/.trmnlp.yml
299
- - templates/init/bin/trmnlp
300
- - templates/init/src/full.liquid
301
- - templates/init/src/half_horizontal.liquid
302
- - templates/init/src/half_vertical.liquid
303
- - templates/init/src/quadrant.liquid
304
- - templates/init/src/settings.yml
305
- - templates/init/src/shared.liquid
306
- - trmnl_preview.gemspec
307
- - web/public/highlight/highlight.min.js
308
- - web/public/highlight/styles/atom-one-dark.min.css
309
- - web/public/index.css
310
- - web/public/index.js
311
- - web/public/trmnl-picker.js
312
- - web/views/index.erb
313
- - web/views/render_html.erb
314
23
  homepage: https://github.com/usetrmnl/trmnlp
315
24
  licenses:
316
25
  - MIT
317
26
  metadata:
318
- allowed_push_host: https://rubygems.org
319
27
  homepage_uri: https://github.com/usetrmnl/trmnlp
320
28
  source_code_uri: https://github.com/usetrmnl/trmnlp
29
+ rubygems_mfa_required: 'true'
30
+ post_install_message: |
31
+ This is not trmnlp. It is a notice.
32
+
33
+ trmnlp requires Ruby 4.0 or newer, and your Ruby is older, so RubyGems
34
+ selected this version. Upgrade to Ruby 4.0 or newer and run
35
+ `gem install trmnl_preview` again, or run trmnlp through Docker:
36
+ https://github.com/usetrmnl/trmnlp#installing-via-docker
321
37
  rdoc_options: []
322
38
  require_paths:
323
39
  - lib
@@ -325,14 +41,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
325
41
  requirements:
326
42
  - - ">="
327
43
  - !ruby/object:Gem::Version
328
- version: 3.0.0
44
+ version: '0'
329
45
  required_rubygems_version: !ruby/object:Gem::Requirement
330
46
  requirements:
331
47
  - - ">="
332
48
  - !ruby/object:Gem::Version
333
49
  version: '0'
334
50
  requirements: []
335
- rubygems_version: 3.6.2
51
+ rubygems_version: 4.0.16
336
52
  specification_version: 4
337
- summary: Local web server to preview TRMNL plugins
53
+ summary: 'Notice: trmnlp requires Ruby 4.0 or newer'
338
54
  test_files: []
data/CHANGELOG.md DELETED
@@ -1,139 +0,0 @@
1
-
2
- # Changelog
3
-
4
- ## 0.7.0
5
-
6
- - Switch from Puppeteer + CDP to Selenium + WebDriver BiDi (@SorceressLyra)
7
-
8
- ## 0.6.1
9
-
10
- - Update trmnl-liquid to 0.4.0
11
-
12
- ## 0.6.0
13
-
14
- - Drop trmnl-component in lieu of plain iframe
15
- - Add [trmnl-picker](https://github.com/usetrmnl/trmnl-picker) to support new TRMNL and BYOD screens
16
- - Fix mashup layout previews
17
-
18
- ## 0.5.10
19
-
20
- - Fix interpolation of multi-line polling URLs with custom fields
21
-
22
- ## 0.5.9
23
-
24
- - Add `pathname` dependency
25
-
26
- ## 0.5.8
27
-
28
- - Improve Docker commands in `bin/trmnlp` (@jrand0m, @jbarreiros)
29
-
30
- ## 0.5.7
31
-
32
- - Use the `trmnl-liquid` gem so tags and filters stay up-to-date with the core offering
33
-
34
- ## 0.5.6
35
-
36
- - Fixed bug that left blank plugins on server after upload failed
37
- - Fixed bug creating upload.zip after previous upload had failed
38
- - Added support to read API key fromk `TRMNL_API_KEY` environment variable (@andi4000)
39
- - Fixed `init` command in Docker container (@jbarreiros)
40
- - Automatically remove ephemeral Docker container after exit (@andi4000)
41
-
42
- ## 0.5.5
43
-
44
- - Added dark mode (@stephenyeargin)
45
- - Added override for `polling_url` in project config (@heroheman)
46
- - Reworked `bin/dev` into more generic `bin/trmnlp`
47
- - Fixed pull, push, and clone commands on Windows (@eugenio)
48
-
49
- ## 0.5.4
50
-
51
- - Added `shared.liquid` file to template (@mariovisic)
52
- - Stringified custom field values to match production (@mariovisic)
53
- - Optimized image generation (@sd416)
54
- - Fixed preview from growing when JSON data becomes too wide (@stephenyeargin)
55
-
56
- ## 0.5.3
57
-
58
- - Added support for [reusable markup](https://docs.trmnl.com/go/reusing-markup) in `shared.liquid`
59
- - Replaced custom case images with [\<trmnl-frame\> component](https://github.com/usetrmnl/trmnl-component)
60
- - Updated custom Liquid filters
61
- - Added API key validation during `trmnlp login`
62
-
63
- ## 0.5.2
64
-
65
- - Added `time_zone` project config option, which is injected into `trmnl.user` variables
66
- - Fixed time zone to always be UTC, matching trmnl.com servers (#38)
67
-
68
- ## 0.5.1
69
-
70
- - Fixed `trmnl init`
71
-
72
- ## 0.5.0
73
-
74
- - Added `trmlnp init` command
75
- - Added `trmnlp clone` command
76
- - Improved `trmnlp push` to create remote plugin on first publish
77
- - Changed syntax of `trmnlp push` and `trmnlp pull` commands
78
- - Added `oj` gem for JSON parsing (#32)
79
-
80
- ## 0.4.0
81
-
82
- ### Plugin Migration Strategy
83
-
84
- The plugin directory structure has changed to better align with the [plugin archive format](https://help.trmnl.com/en/articles/10542599-importing-and-exporting-private-plugins#h_581fb988f0).
85
-
86
- Here is a migration strategy for existing plugin repositories:
87
-
88
- 1. Create `.trmnlp.yml` and bring over preview settings from `config.toml` - [see README](README.md)
89
- 2. Rename directory `views/` to `src/`
90
- 3. Create `src/settings.yml` and bring over plugin settings from `config.toml` - [see TRMNL docs](https://help.trmnl.com/en/articles/10542599-importing-and-exporting-private-plugins#h_581fb988f0)
91
- 4. Delete `config.toml`
92
-
93
- ### Changes
94
-
95
- - Change plugin directory structure (see README for details)
96
- - Add `login`, `push`, and `pull` commands
97
- - Bring up-to-date with latest private plugin features:
98
- - Add `static` strategy
99
- - Add polling features: multiple URLs, new verbs, and request body
100
- - Add settings `dark_mode`, `no_screen_padding`, `custom_fields`
101
- - Add interpolation of custom fields in `polling\_\*` options
102
- - Add `{{ trmnl }}` variables
103
- - Add `watch` config
104
- - Add interpolation of environment variables in `.trmnlp.yml` via `{{ env }}`
105
- - Add auto-reload when `.trmnlp.yml` or `settings.yml` changes
106
- - Add variable display
107
- - Fix crash when #poll_data fails (#12)
108
- - Fix git runtime error in Docker container (#12)
109
-
110
-
111
-
112
- ## 0.3.2
113
-
114
- - Add bitmap rendering
115
- - Add TRMNL's [custom plugin filters](https://help.trmnl.com/en/articles/10347358-custom-plugin-filters)
116
- - Add support for user-supplied custom filters
117
-
118
- ## 0.3.1
119
-
120
- - Add live render
121
-
122
- ## 0.3.0
123
-
124
- - Add poll button
125
- - Add case image overlays
126
- - Add `trmnlp build` command
127
- - Add support for `url` pointing to a local JSON data file
128
-
129
- ## 0.2.0
130
-
131
- - Add "commands" concept to `trmnlp` executable
132
- - `trmnlp serve` improvements
133
- - Add argument for plugin directory
134
- - Add options `-b` and `-p` for host bind and port, respectively
135
- - Add Dockerfile
136
-
137
- ## 0.1.2
138
-
139
- - Initial working release
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2025 Rockwell Schrock
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
data/README.md DELETED
@@ -1,144 +0,0 @@
1
- # trmnlp
2
-
3
- A basic self-hosted web server to ease the development and sharing of [TRMNL](https://trmnl.com/) plugins.
4
-
5
- [Liquid](https://shopify.github.io/liquid/) templates are rendered leveraging the [TRMNL Design System](https://trmnl.com/framework). They may be generated as HTML (faster, and a good approximation of the final result) or as PNG images (slower, but more accurate).
6
-
7
- Custom Liquid filters and tags are provided by the [trmnl-liquid](https://github.com/usetrmnl/trmnl-liquid) gem.
8
-
9
- The server watches the filesystem for changes to the Liquid templates, seamlessly updating the preview without the need to refresh.
10
-
11
- ![Screenshot](docs/preview.png)
12
-
13
- ## Project Structure
14
-
15
- This is the structure of a plugin project:
16
-
17
- ```
18
- .
19
- ├── .trmnlp.yml
20
- ├── bin
21
- │ └── dev
22
- └── src
23
- ├── full.liquid
24
- ├── half_horizontal.liquid
25
- ├── half_vertical.liquid
26
- ├── quadrant.liquid
27
- ├── shared.liquid
28
- └── settings.yml
29
- ```
30
-
31
- ## Creating a New Plugin
32
-
33
- You can start building a plugin locally, then `push` it to the TRMNL server for display on your device.
34
-
35
- ```sh
36
- trmnlp init [my_plugin] # generate
37
- cd [my_plugin]
38
- trmnlp serve # develop locally
39
- trmnlp login # authenticate
40
- trmnlp push # upload
41
- ```
42
-
43
- ## Modifying an Existing Plugin
44
-
45
- If you have built a plugin with the web-based editor, you can `clone` it, work on it locally, and `push` changes back to the server.
46
-
47
- ```sh
48
- trmnlp login # authenticate
49
- trmnlp clone [my_plugin] [id] # first download
50
- cd [my_plugin]
51
- trmnlp serve # develop locally
52
- trmnlp push # upload
53
- ```
54
-
55
- ## Authentication
56
-
57
- The `trmnlp login` command saves your API key to `~/.config/trmnlp/config.yml`.
58
-
59
- If an environment variable is more convenient (for example in a CI/CD pipeline), you can set `$TRMNL_API_KEY` instead.
60
-
61
- ## Running trmnlp
62
-
63
- The `bin/trmnlp` script is provided as a convenience. It will use the local Ruby gem if available, falling back to the `trmnl/trmnlp` Docker image.
64
-
65
- You can modify the `bin/trmnlp` script to set up environment variables (plugin secrets, etc.) before running the server.
66
-
67
- ### Installing via RubyGems
68
-
69
- Prerequisites:
70
-
71
- - Ruby 3.x
72
- - For PNG rendering (optional):
73
- - Firefox
74
- - ImageMagick
75
-
76
- ```sh
77
- gem install trmnl_preview
78
- trmnlp serve
79
- ```
80
-
81
- ### Installing via Docker
82
-
83
- ```sh
84
- docker run \
85
- --publish 4567:4567 \
86
- --volume "$(pwd):/plugin" \
87
- trmnl/trmnlp serve
88
- ```
89
-
90
- ## `.trmnlp.yml` Reference - Project Config
91
-
92
- The `.trmnlp.yml` file lives in the root of the plugin project, and is for configuring the local dev server.
93
-
94
- System environment variables are made available in the `{{ env }}` Liquid varible in this file only. This can be used to safely
95
- supply plugin secrets, like API keys.
96
-
97
- All fields are optional.
98
-
99
- ```yaml
100
- ---
101
- # auto-reload when files change (`watch: false` to disable)
102
- watch:
103
- - src
104
- - .trmnlp.yml
105
-
106
- # values of custom fields (defined in src/settings.yml)
107
- custom_fields:
108
- station: "{{ env.ICAO }}" # interpolate $IACO environment variable
109
-
110
- # Time zone IANA identifier to inject into trmnl.user; see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
111
- time_zone: America/New_York
112
-
113
- # override variables
114
- variables:
115
- trmnl:
116
- user:
117
- name: Peter Quill
118
- plugin_settings:
119
- instance_name: Kevin Bacon Facts
120
-
121
- ```
122
-
123
- ## `src/settings.yml` Reference (Plugin Config)
124
-
125
- The `settings.yml` file is part of the plugin definition.
126
-
127
- See [TRMNL documentation](https://help.trmnl.com/en/articles/10542599-importing-and-exporting-private-plugins#h_581fb988f0) for details on this file's contents.
128
-
129
-
130
- ## Tests
131
-
132
- To test, run:
133
-
134
- ```sh
135
- bin/rake
136
- ```
137
-
138
- ## Contributing
139
-
140
- Bug reports and pull requests are welcome on GitHub at https://github.com/usetrmnl/trmnlp.
141
-
142
- ## License
143
-
144
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).