Skip to content

Commit e1f3652

Browse files
Initial commit
0 parents  commit e1f3652

File tree

16 files changed

+408
-0
lines changed

16 files changed

+408
-0
lines changed

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[*.js]
2+
indent_size = 2
3+
indent_style = space
4+
trim_trailing_whitespace = true
5+
insert_final_newline = true
6+
7+
[*.{html,liquid}]
8+
indent_size = 2
9+
indent_style = space
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true

.github/workflows/build.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build and Deploy
2+
3+
on:
4+
workflow_dispatch
5+
# push:
6+
# branches: [ main ]
7+
# pull_request:
8+
# branches: [ main ]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Ruby
18+
uses: ruby/setup-ruby@v1
19+
with:
20+
ruby-version: '3.4'
21+
bundler-cache: true
22+
23+
- name: Run trmnlp build
24+
run: bundle exec trmnlp build
25+
26+
deploy:
27+
needs: build
28+
runs-on: ubuntu-latest
29+
if: github.ref == 'refs/heads/main'
30+
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@v4
33+
34+
- name: Set up Ruby
35+
uses: ruby/setup-ruby@v1
36+
with:
37+
ruby-version: '3.4'
38+
bundler-cache: true
39+
40+
- name: Create trmnlp config directory
41+
run: mkdir -p ~/.config/trmnlp
42+
43+
- name: Create trmnlp config file
44+
run: |
45+
cat > ~/.config/trmnlp/config.yml << EOF
46+
---
47+
api_key: ${{ secrets.TRMNL_API_KEY }}
48+
EOF
49+
50+
- name: Run trmnlp push
51+
run: bundle exec trmnlp push --force

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.env
2+
_build/*

.trmnlp.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# TRMNLP configuration
2+
# {{ env.VARIABLE }} interpolation is available here
3+
---
4+
# auto-reload when files change (`watch: false` to disable)
5+
watch:
6+
- .trmnlp.yml
7+
- src
8+
9+
# values of custom fields (defined in src/settings.yml)
10+
custom_fields: {}
11+
12+
# override variables
13+
variables:
14+
trmnl: {
15+
plugin_settings: {
16+
instance_name: 'My Instance'
17+
}
18+
}

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'trmnl_preview', '0.5.4'

Gemfile.lock

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
actionview (8.0.2)
5+
activesupport (= 8.0.2)
6+
builder (~> 3.1)
7+
erubi (~> 1.11)
8+
rails-dom-testing (~> 2.2)
9+
rails-html-sanitizer (~> 1.6)
10+
activesupport (8.0.2)
11+
base64
12+
benchmark (>= 0.3)
13+
bigdecimal
14+
concurrent-ruby (~> 1.0, >= 1.3.1)
15+
connection_pool (>= 2.2.5)
16+
drb
17+
i18n (>= 1.6, < 2)
18+
logger (>= 1.4.2)
19+
minitest (>= 5.1)
20+
securerandom (>= 0.3)
21+
tzinfo (~> 2.0, >= 2.0.5)
22+
uri (>= 0.13.1)
23+
base64 (0.3.0)
24+
benchmark (0.4.1)
25+
bigdecimal (3.2.2)
26+
builder (3.3.0)
27+
concurrent-ruby (1.3.5)
28+
connection_pool (2.5.3)
29+
crass (1.0.6)
30+
drb (2.2.3)
31+
erubi (1.13.1)
32+
eventmachine (1.2.7)
33+
faraday (2.13.1)
34+
faraday-net_http (>= 2.0, < 3.5)
35+
json
36+
logger
37+
faraday-multipart (1.1.0)
38+
multipart-post (~> 2.0)
39+
faraday-net_http (3.4.0)
40+
net-http (>= 0.5.0)
41+
faye-websocket (0.11.3)
42+
eventmachine (>= 0.12.0)
43+
websocket-driver (>= 0.5.1)
44+
filewatcher (2.1.0)
45+
module_methods (~> 0.1.0)
46+
i18n (1.14.7)
47+
concurrent-ruby (~> 1.0)
48+
json (2.12.2)
49+
liquid (5.8.7)
50+
bigdecimal
51+
strscan (>= 3.1.1)
52+
logger (1.7.0)
53+
loofah (2.24.1)
54+
crass (~> 1.0.2)
55+
nokogiri (>= 1.12.0)
56+
mime-types (3.7.0)
57+
logger
58+
mime-types-data (~> 3.2025, >= 3.2025.0507)
59+
mime-types-data (3.2025.0610)
60+
mini_magick (4.12.0)
61+
minitest (5.25.5)
62+
module_methods (0.1.0)
63+
multipart-post (2.4.1)
64+
mustermann (3.0.3)
65+
ruby2_keywords (~> 0.0.1)
66+
net-http (0.6.0)
67+
uri
68+
nio4r (2.7.4)
69+
nokogiri (1.18.8-aarch64-linux-gnu)
70+
racc (~> 1.4)
71+
nokogiri (1.18.8-aarch64-linux-musl)
72+
racc (~> 1.4)
73+
nokogiri (1.18.8-arm-linux-gnu)
74+
racc (~> 1.4)
75+
nokogiri (1.18.8-arm-linux-musl)
76+
racc (~> 1.4)
77+
nokogiri (1.18.8-arm64-darwin)
78+
racc (~> 1.4)
79+
nokogiri (1.18.8-x86_64-darwin)
80+
racc (~> 1.4)
81+
nokogiri (1.18.8-x86_64-linux-gnu)
82+
racc (~> 1.4)
83+
nokogiri (1.18.8-x86_64-linux-musl)
84+
racc (~> 1.4)
85+
oj (3.16.11)
86+
bigdecimal (>= 3.0)
87+
ostruct (>= 0.2)
88+
ostruct (0.6.1)
89+
puma (6.6.0)
90+
nio4r (~> 2.0)
91+
puppeteer-ruby (0.45.6)
92+
concurrent-ruby (>= 1.1, < 1.4)
93+
mime-types (>= 3.0)
94+
websocket-driver (>= 0.6.0)
95+
racc (1.8.1)
96+
rack (3.1.16)
97+
rack-protection (4.1.1)
98+
base64 (>= 0.1.0)
99+
logger (>= 1.6.0)
100+
rack (>= 3.0.0, < 4)
101+
rack-session (2.1.1)
102+
base64 (>= 0.1.0)
103+
rack (>= 3.0.0)
104+
rackup (2.2.1)
105+
rack (>= 3)
106+
rails-dom-testing (2.3.0)
107+
activesupport (>= 5.0.0)
108+
minitest
109+
nokogiri (>= 1.6)
110+
rails-html-sanitizer (1.6.2)
111+
loofah (~> 2.21)
112+
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
113+
ruby2_keywords (0.0.5)
114+
rubyzip (2.3.2)
115+
securerandom (0.4.1)
116+
sinatra (4.1.1)
117+
logger (>= 1.6.0)
118+
mustermann (~> 3.0)
119+
rack (>= 3.0.0, < 4)
120+
rack-protection (= 4.1.1)
121+
rack-session (>= 2.0.0, < 3)
122+
tilt (~> 2.0)
123+
strscan (3.1.5)
124+
thor (1.3.2)
125+
tilt (2.6.0)
126+
trmnl_preview (0.5.4)
127+
actionview (~> 8.0)
128+
activesupport (~> 8.0)
129+
faraday (~> 2.1)
130+
faraday-multipart (~> 1.1)
131+
faye-websocket (~> 0.11.3)
132+
filewatcher (~> 2.1)
133+
liquid (~> 5.6)
134+
mini_magick (~> 4.12.0)
135+
oj (~> 3.16.9)
136+
puma (~> 6.5)
137+
puppeteer-ruby (~> 0.45.6)
138+
rackup (~> 2.2)
139+
rubyzip (~> 2.3.0)
140+
sinatra (~> 4.1)
141+
thor (~> 1.3)
142+
tzinfo-data (~> 1.2025)
143+
xdg (~> 9.1)
144+
tzinfo (2.0.6)
145+
concurrent-ruby (~> 1.0)
146+
tzinfo-data (1.2025.2)
147+
tzinfo (>= 1.0.0)
148+
uri (1.0.3)
149+
websocket-driver (0.8.0)
150+
base64
151+
websocket-extensions (>= 0.1.0)
152+
websocket-extensions (0.1.5)
153+
xdg (9.2.0)
154+
155+
PLATFORMS
156+
aarch64-linux-gnu
157+
aarch64-linux-musl
158+
arm-linux-gnu
159+
arm-linux-musl
160+
arm64-darwin
161+
x86_64-darwin
162+
x86_64-linux-gnu
163+
x86_64-linux-musl
164+
165+
DEPENDENCIES
166+
trmnl_preview (= 0.5.4)
167+
168+
BUNDLED WITH
169+
2.6.2

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Stephen Yeargin
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 all
13+
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 THE
21+
SOFTWARE.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# TRMNL Plugin
2+
3+
![screenshot](assets/screenshot.png)

assets/screenshot.png

15.2 KB
Loading

bin/dev

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#! /bin/bash
2+
3+
if command -v trmnlp &> /dev/null
4+
then
5+
echo "Starting trmnlp..."
6+
trmnlp serve
7+
exit
8+
fi
9+
10+
if command -v docker &> /dev/null
11+
then
12+
echo "Running trmnl/trmnlp container..."
13+
docker run -p 4567:4567 -v .:/plugin trmnl/trmnlp
14+
exit
15+
fi
16+
17+
echo "Install the trmnl_preview gem:
18+
19+
gem install trmnl_preview
20+
21+
Or install Docker:
22+
23+
https://docs.docker.com/get-docker/"
24+
25+
exit 1

0 commit comments

Comments
 (0)