galaaz 2.1.10.pre.5 → 2.1.10.pre.6
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/CHANGELOG.md +11 -0
- data/lib/galaaz/cli.rb +78 -4
- data/script/omarchy/README.md +10 -9
- data/script/omarchy/fonts/galaaz.ttf +0 -0
- data/script/omarchy/fonts/omarchy-with-galaaz.ttf +0 -0
- data/script/omarchy/install-galaaz.sh +28 -34
- data/script/omarchy/omarchy-menu.jsonc +1 -1
- data/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b1175b28a0271d54017f9688e6436c326da0305c6b383285d9a4adb11538018d
|
|
4
|
+
data.tar.gz: 43c3c80c7764e8a959d45b382a781c1a504e4ea7b3c7028dc3763e8c3493b04e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a038c5ac9ff9eaacd0cd85af5e8613675e27157e2eea28b006d15d6b9083f8059b65b45e5ad8eedacffba22b464c68e288c82f1c2cb2dbf0c3074526f16eaa2e
|
|
7
|
+
data.tar.gz: 4f2eb91d9ccf66c15ad503116a0e14602491b73623eca7395ca2a2dedc6342e900f34ba2d838405879660ff62a74b7fed62163658a6ea33ae0085108affc7149
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 2.1.10.pre.6
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Omarchy **Galaaz (core)** no longer runs `gem install` / uninstall. Flow is:
|
|
10
|
+
`gem install galaaz` → `galaaz omarchy install` → menu core (setup + blogs).
|
|
11
|
+
- `galaaz --version` / `-v` / `version` prints the installed gem version;
|
|
12
|
+
`galaaz doctor` shows `version:`.
|
|
13
|
+
- `galaaz blogs sync` refreshes sty + logo includes without wiping blogs;
|
|
14
|
+
core installer syncs on re-run; `galaaz add knit` refreshes brand assets.
|
|
15
|
+
|
|
5
16
|
## 2.1.10.pre.5
|
|
6
17
|
|
|
7
18
|
### Fixed
|
data/lib/galaaz/cli.rb
CHANGED
|
@@ -48,12 +48,34 @@ module Galaaz
|
|
|
48
48
|
File.expand_path('../..', __dir__)
|
|
49
49
|
end
|
|
50
50
|
|
|
51
|
+
def gem_version
|
|
52
|
+
spec = Gem.loaded_specs['galaaz']
|
|
53
|
+
return spec.version.to_s if spec
|
|
54
|
+
|
|
55
|
+
begin
|
|
56
|
+
return Gem::Specification.find_by_name('galaaz').version.to_s
|
|
57
|
+
rescue LoadError, Gem::LoadError, NameError
|
|
58
|
+
# fall through to version.rb
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
version_rb = File.join(root, 'version.rb')
|
|
62
|
+
if File.file?(version_rb)
|
|
63
|
+
load version_rb
|
|
64
|
+
return $version.to_s if defined?($version) && $version
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
'unknown'
|
|
68
|
+
end
|
|
69
|
+
|
|
51
70
|
def run(argv)
|
|
52
71
|
cmd = argv[0]
|
|
53
72
|
case cmd
|
|
54
73
|
when nil, '-h', '--help', 'help'
|
|
55
74
|
print_help
|
|
56
75
|
0
|
|
76
|
+
when '-v', '--version', 'version'
|
|
77
|
+
puts "galaaz #{gem_version}"
|
|
78
|
+
0
|
|
57
79
|
when 'setup'
|
|
58
80
|
cmd_setup
|
|
59
81
|
when 'blogs'
|
|
@@ -82,18 +104,21 @@ module Galaaz
|
|
|
82
104
|
def print_help
|
|
83
105
|
puts <<~HELP
|
|
84
106
|
Usage: galaaz <command> [args]
|
|
107
|
+
galaaz --version
|
|
85
108
|
|
|
86
109
|
Commands:
|
|
87
110
|
setup Build the NewBridge gatekeeper; ensure Rcpp
|
|
88
111
|
blogs init [DIR] Copy blog sources (default: ~/galaaz-blogs)
|
|
89
112
|
and sty/galaaz.sty for PDF headers
|
|
90
113
|
Options: --force
|
|
114
|
+
blogs sync [DIR] Refresh sty + logo includes without wiping blogs
|
|
91
115
|
doctor Report Ruby, R, gatekeeper, Rcpp, sty, profiles
|
|
92
116
|
add PROFILE Install an add-on (idempotent)
|
|
93
117
|
Profiles: #{PROFILES.join(', ')}
|
|
94
118
|
omarchy [install] Install Omarchy menu overlay (bundled in gem)
|
|
95
119
|
Options: --from-git [--ref REF]
|
|
96
120
|
omarchy status Show whether overlay helpers are installed
|
|
121
|
+
--version, -v Print installed gem version (#{gem_version})
|
|
97
122
|
|
|
98
123
|
Legacy: any other argument is passed to rake in the Galaaz root
|
|
99
124
|
(e.g. galaaz master_list:scatter_plot).
|
|
@@ -316,7 +341,7 @@ module Galaaz
|
|
|
316
341
|
system('fc-cache', '-f', fonts)
|
|
317
342
|
system('fc-cache', '-f', user_fonts)
|
|
318
343
|
end
|
|
319
|
-
warn 'galaaz omarchy:
|
|
344
|
+
warn 'galaaz omarchy: logout/reboot required for Qt to reload brand fonts (killall omarchy-shell is often not enough)' \
|
|
320
345
|
if ENV['OMARCHY_PATH'] || File.directory?(File.expand_path('~/.config/omarchy'))
|
|
321
346
|
end
|
|
322
347
|
|
|
@@ -327,11 +352,14 @@ module Galaaz
|
|
|
327
352
|
case sub
|
|
328
353
|
when 'init'
|
|
329
354
|
blogs_init(argv[1..])
|
|
355
|
+
when 'sync'
|
|
356
|
+
blogs_sync(argv[1..])
|
|
330
357
|
when nil, '-h', '--help'
|
|
331
358
|
puts 'Usage: galaaz blogs init [DIR] [--force]'
|
|
359
|
+
puts ' galaaz blogs sync [DIR] # refresh sty + logo includes (no wipe)'
|
|
332
360
|
0
|
|
333
361
|
else
|
|
334
|
-
raise CliError, "unknown blogs subcommand: #{sub.inspect} (try: init)"
|
|
362
|
+
raise CliError, "unknown blogs subcommand: #{sub.inspect} (try: init|sync)"
|
|
335
363
|
end
|
|
336
364
|
end
|
|
337
365
|
|
|
@@ -344,7 +372,7 @@ module Galaaz
|
|
|
344
372
|
if File.exist?(dest)
|
|
345
373
|
entries = Dir.children(dest).reject { |n| n.start_with?('.') }
|
|
346
374
|
if !entries.empty? && !force
|
|
347
|
-
raise CliError, "#{dest} exists and is not empty (use --force to replace)"
|
|
375
|
+
raise CliError, "#{dest} exists and is not empty (use --force to replace, or: galaaz blogs sync)"
|
|
348
376
|
end
|
|
349
377
|
FileUtils.rm_rf(dest) if force
|
|
350
378
|
end
|
|
@@ -359,16 +387,28 @@ module Galaaz
|
|
|
359
387
|
end
|
|
360
388
|
|
|
361
389
|
File.write(File.join(dest, BLOGS_MARKER), "galaaz blogs init\n")
|
|
362
|
-
|
|
390
|
+
ensure_blog_knit_assets!(dest)
|
|
363
391
|
puts "galaaz blogs init: #{dest}"
|
|
364
392
|
puts "You can now knit with gknit (after: galaaz add knit)"
|
|
365
393
|
0
|
|
366
394
|
end
|
|
367
395
|
|
|
396
|
+
# Refresh sty + per-blog logo includes without wiping ~/galaaz-blogs.
|
|
397
|
+
# Needed after gem upgrades that ship new branding assets (pandoc error 99
|
|
398
|
+
# when _logo_before_body.html / lockup PNG / sty were missing from an older init).
|
|
399
|
+
def blogs_sync(argv)
|
|
400
|
+
dest = File.expand_path(argv[0] || detect_blogs_dir || DEFAULT_BLOGS_DIR)
|
|
401
|
+
abort_unless(File.directory?(dest), "blogs dir missing: #{dest} (run: galaaz blogs init)")
|
|
402
|
+
n = ensure_blog_knit_assets!(dest)
|
|
403
|
+
puts "galaaz blogs sync: #{dest} (#{n} brand files refreshed)"
|
|
404
|
+
0
|
|
405
|
+
end
|
|
406
|
+
|
|
368
407
|
# ---- doctor ----
|
|
369
408
|
|
|
370
409
|
def cmd_doctor
|
|
371
410
|
puts "galaaz doctor"
|
|
411
|
+
puts " version: #{gem_version}"
|
|
372
412
|
puts " root: #{root}"
|
|
373
413
|
print_ruby_engines
|
|
374
414
|
|
|
@@ -551,6 +591,11 @@ module Galaaz
|
|
|
551
591
|
end
|
|
552
592
|
mark_profile!('knit')
|
|
553
593
|
puts 'galaaz add knit: OK'
|
|
594
|
+
blogs = detect_blogs_dir
|
|
595
|
+
if blogs
|
|
596
|
+
ensure_blog_knit_assets!(blogs)
|
|
597
|
+
puts 'galaaz add knit: refreshed blog brand assets (sty + logos)'
|
|
598
|
+
end
|
|
554
599
|
puts 'Example knits (after blogs init → ~/galaaz-blogs):'
|
|
555
600
|
puts ' gknit ~/galaaz-blogs/oh_my/oh_my.Rmd'
|
|
556
601
|
puts ' gknit ~/galaaz-blogs/galaaz_ggplot/galaaz_ggplot.Rmd'
|
|
@@ -917,6 +962,35 @@ module Galaaz
|
|
|
917
962
|
dest
|
|
918
963
|
end
|
|
919
964
|
|
|
965
|
+
# Copy/overwrite brand includes required by blog YAML (pandoc before_body + PDF splash).
|
|
966
|
+
# Returns number of files written.
|
|
967
|
+
def ensure_blog_knit_assets!(blogs_dest)
|
|
968
|
+
blogs_dest = File.expand_path(blogs_dest)
|
|
969
|
+
install_galaaz_sty_for_blogs!(blogs_dest)
|
|
970
|
+
written = 0
|
|
971
|
+
BLOG_NAMES.each do |name|
|
|
972
|
+
src_blog = File.join(root, 'blogs', name)
|
|
973
|
+
dest_blog = File.join(blogs_dest, name)
|
|
974
|
+
next unless File.directory?(src_blog) && File.directory?(dest_blog)
|
|
975
|
+
|
|
976
|
+
logo_html = '_logo_before_body.html'
|
|
977
|
+
src_html = File.join(src_blog, logo_html)
|
|
978
|
+
if File.file?(src_html)
|
|
979
|
+
FileUtils.cp(src_html, File.join(dest_blog, logo_html))
|
|
980
|
+
written += 1
|
|
981
|
+
end
|
|
982
|
+
|
|
983
|
+
lockup = File.join('images', 'galaaz-lockup-stacked.png')
|
|
984
|
+
src_png = File.join(src_blog, lockup)
|
|
985
|
+
if File.file?(src_png)
|
|
986
|
+
FileUtils.mkdir_p(File.join(dest_blog, 'images'))
|
|
987
|
+
FileUtils.cp(src_png, File.join(dest_blog, lockup))
|
|
988
|
+
written += 1
|
|
989
|
+
end
|
|
990
|
+
end
|
|
991
|
+
written
|
|
992
|
+
end
|
|
993
|
+
|
|
920
994
|
# TinyTeX installs to ~/.TinyTeX and often ~/bin; Omarchy PATH prefers ~/.local/bin.
|
|
921
995
|
def ensure_pdflatex_on_path!
|
|
922
996
|
return if command_present?('pdflatex')
|
data/script/omarchy/README.md
CHANGED
|
@@ -6,16 +6,15 @@ or a real Omarchy install. Works **with or without** an upstream Omarchy PR.
|
|
|
6
6
|
## Recommended: `galaaz omarchy` (gem-bundled)
|
|
7
7
|
|
|
8
8
|
```bash
|
|
9
|
-
gem install galaaz
|
|
10
|
-
galaaz
|
|
11
|
-
galaaz omarchy # A: copy overlay from this gem
|
|
9
|
+
gem install galaaz # choose version yourself (stable or .pre.N)
|
|
10
|
+
galaaz omarchy install # menu overlay + helpers (no second gem install)
|
|
12
11
|
# optional, newer overlay than the gem:
|
|
13
12
|
# galaaz omarchy install --from-git
|
|
14
|
-
# galaaz omarchy install --from-git --ref galaaz2_0
|
|
15
13
|
galaaz omarchy status
|
|
16
14
|
```
|
|
17
15
|
|
|
18
|
-
Then Super+Space → Install → Development → **Galaaz
|
|
16
|
+
Then Super+Space → Install → Development → **Galaaz** → **Galaaz (core)**
|
|
17
|
+
(core configures R/gatekeeper/blogs using the **already-installed** gem).
|
|
19
18
|
|
|
20
19
|
**Important:** `gem install galaaz` alone does **not** add an Omarchy menu until you run
|
|
21
20
|
`galaaz omarchy` (or an upstream catalog row exists).
|
|
@@ -24,7 +23,7 @@ Then Super+Space → Install → Development → **Galaaz**.
|
|
|
24
23
|
|
|
25
24
|
| File | Role |
|
|
26
25
|
|------|------|
|
|
27
|
-
| `install-galaaz.sh` | Core
|
|
26
|
+
| `install-galaaz.sh` | Core configure (R/setup/blogs); uses installed gem; log `~/.local/share/galaaz/install-core.log` |
|
|
28
27
|
| `galaaz-guide.sh` | Guide / docs / knit-demo helper (`omarchy-galaaz-guide`) |
|
|
29
28
|
| `galaaz-add.sh` | Add-on wrapper (`omarchy-galaaz-add`) — pandoc without Arch Haskell stack |
|
|
30
29
|
| `galaaz-gknit.sh` | Safe HTML gknit helper |
|
|
@@ -67,10 +66,12 @@ chmod +x ~/.local/bin/omarchy-*
|
|
|
67
66
|
## TryOmarchy steps
|
|
68
67
|
|
|
69
68
|
1. Install → Development → Ruby on Rails (mise Ruby).
|
|
70
|
-
2. `gem install galaaz && galaaz
|
|
71
|
-
3. Super+Space →
|
|
69
|
+
2. `gem install galaaz && galaaz omarchy install`
|
|
70
|
+
3. Super+Space → Install → Development → **Galaaz** → **Galaaz (core)**.
|
|
72
71
|
|
|
73
|
-
|
|
72
|
+
Core configures **setup + blogs + doctor** using the gem you already installed
|
|
73
|
+
(it does **not** run `gem install` again). It fails if the gatekeeper `.so` is
|
|
74
|
+
missing — “gem installed” alone is not success.
|
|
74
75
|
|
|
75
76
|
4. After core finishes, the same submenu shows Knit / Arrow / TeX / Bio / Examples / Ledger.
|
|
76
77
|
|
|
Binary file
|
|
Binary file
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
# Omarchy-shaped core installer for Galaaz (R-on-Rails).
|
|
3
|
-
# omarchy:summary=
|
|
3
|
+
# omarchy:summary=Configure Galaaz (R-on-Rails)
|
|
4
4
|
# omarchy:name=galaaz
|
|
5
5
|
#
|
|
6
|
+
# Prerequisite (do this yourself first — this script does NOT gem install):
|
|
7
|
+
# gem install galaaz # or: gem install galaaz -v x.y.z / .pre.N
|
|
8
|
+
# galaaz omarchy install # menu overlay + helpers
|
|
9
|
+
# Then: Super+Space → Install → Development → Galaaz → Galaaz (core)
|
|
10
|
+
#
|
|
6
11
|
# Debug log (always written, even if TUI tee fails):
|
|
7
12
|
# ~/.local/share/galaaz/install-core.log
|
|
8
13
|
set -euo pipefail
|
|
9
14
|
|
|
10
|
-
# Optional pin: GALAAZ_GEM_VERSION=2.1.2 omarchy-install-galaaz
|
|
11
|
-
# Default: latest from RubyGems (Omarchy/Rails shape).
|
|
12
|
-
GALAAZ_GEM_VERSION="${GALAAZ_GEM_VERSION:-}"
|
|
13
15
|
LOG_DIR="${HOME}/.local/share/galaaz"
|
|
14
16
|
LOG="${LOG_DIR}/install-core.log"
|
|
15
17
|
mkdir -p "${LOG_DIR}"
|
|
@@ -45,13 +47,13 @@ on_err() {
|
|
|
45
47
|
}
|
|
46
48
|
trap on_err ERR
|
|
47
49
|
|
|
48
|
-
log "=== galaaz core
|
|
50
|
+
log "=== galaaz core configure $(date -Iseconds) ==="
|
|
49
51
|
log "log file: ${LOG}"
|
|
50
52
|
log "script: ${BASH_SOURCE[0]}"
|
|
51
53
|
log "pwd: $(pwd)"
|
|
52
54
|
log "user: $(id -un) home=${HOME}"
|
|
53
55
|
log "PATH: ${PATH}"
|
|
54
|
-
log "
|
|
56
|
+
log "(uses already-installed galaaz gem — does not gem install)"
|
|
55
57
|
log ""
|
|
56
58
|
|
|
57
59
|
pkg_add() {
|
|
@@ -167,35 +169,21 @@ WRAP
|
|
|
167
169
|
log "wrapper: ${HOME}/.local/bin/galaaz"
|
|
168
170
|
}
|
|
169
171
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
LATEST="$(curl -fsSL https://rubygems.org/api/v1/versions/galaaz/latest.json 2>/dev/null \
|
|
180
|
-
| sed -n 's/.*"version":"\([^"]*\)".*/\1/p' || true)"
|
|
181
|
-
if [[ -n "${LATEST}" ]]; then
|
|
182
|
-
log "==> gem install galaaz ${LATEST} (latest on RubyGems)"
|
|
183
|
-
else
|
|
184
|
-
log "==> gem install galaaz (latest on RubyGems)"
|
|
185
|
-
fi
|
|
186
|
-
set +e
|
|
187
|
-
run_ruby gem install galaaz --no-document --source https://rubygems.org 2>&1 | tee -a "${LOG}"
|
|
188
|
-
st=${PIPESTATUS[0]}
|
|
189
|
-
set -e
|
|
190
|
-
[[ ${st} -eq 0 ]] || exit "${st}"
|
|
172
|
+
# Gem must already be installed (user: gem install galaaz [ -v … ]).
|
|
173
|
+
# Do NOT gem install/uninstall here — that pulled stable latest over prereleases.
|
|
174
|
+
log "==> require installed galaaz gem"
|
|
175
|
+
if ! ROOT="$(gem_root 2>/dev/null)" || [[ -z "${ROOT}" || ! -d "${ROOT}" ]]; then
|
|
176
|
+
log "ERROR: galaaz gem not found under this Ruby."
|
|
177
|
+
log "Install first, then re-run core configure:"
|
|
178
|
+
log " gem install galaaz # or gem install galaaz -v <version>"
|
|
179
|
+
log " galaaz omarchy install"
|
|
180
|
+
exit 1
|
|
191
181
|
fi
|
|
192
|
-
|
|
193
182
|
INSTALLED="$(run_ruby ruby -e "puts Gem::Specification.find_by_name('galaaz').version")"
|
|
194
|
-
log "
|
|
183
|
+
log "using galaaz ${INSTALLED}"
|
|
184
|
+
log "gem root: ${ROOT}"
|
|
195
185
|
|
|
196
|
-
ROOT="$(gem_root)"
|
|
197
186
|
BRIDGE="${ROOT}/ext/new_bridge"
|
|
198
|
-
log "gem root: ${ROOT}"
|
|
199
187
|
log "bridge: ${BRIDGE}"
|
|
200
188
|
ls -la "${BRIDGE}" >>"${LOG}" 2>&1 || true
|
|
201
189
|
if [[ ! -f "${BRIDGE}/Makefile" ]]; then
|
|
@@ -254,8 +242,14 @@ log "gatekeeper OK: ${SO}"
|
|
|
254
242
|
log "==> galaaz setup (CLI)"
|
|
255
243
|
galaaz_cli setup >>"${LOG}" 2>&1 || log "WARN: galaaz setup non-zero (so exists; continuing)"
|
|
256
244
|
|
|
257
|
-
log "==> galaaz blogs init"
|
|
258
|
-
|
|
245
|
+
log "==> galaaz blogs init/sync"
|
|
246
|
+
# Fresh machine: init. Upgrade / re-run: sync brand assets without wiping blogs
|
|
247
|
+
# (older gems omitted _logo_before_body.html → pandoc error 99).
|
|
248
|
+
if [[ -f "${HOME}/galaaz-blogs/.galaaz-blogs" ]]; then
|
|
249
|
+
galaaz_cli blogs sync "${HOME}/galaaz-blogs" >>"${LOG}" 2>&1 || log "WARN: blogs sync non-zero"
|
|
250
|
+
else
|
|
251
|
+
galaaz_cli blogs init "${HOME}/galaaz-blogs" >>"${LOG}" 2>&1 || log "WARN: blogs init non-zero"
|
|
252
|
+
fi
|
|
259
253
|
|
|
260
254
|
install_wrapper
|
|
261
255
|
|
|
@@ -327,7 +321,7 @@ mkdir -p "${HOME}/.config/galaaz/profiles"
|
|
|
327
321
|
date -Iseconds >"${HOME}/.config/galaaz/profiles/core"
|
|
328
322
|
|
|
329
323
|
log ""
|
|
330
|
-
log "Core
|
|
324
|
+
log "Core configure complete."
|
|
331
325
|
log "Next: Super+Space → Install → Development → Galaaz → Guide (what's next)"
|
|
332
326
|
log "Docs: https://rbotafogo.github.io/galaaz/"
|
|
333
327
|
log "FULL LOG: ${LOG}"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"icon": "\uE90E",
|
|
22
22
|
"iconFont": "omarchy",
|
|
23
23
|
"label": "Galaaz (core)",
|
|
24
|
-
"description": "
|
|
24
|
+
"description": "setup + blogs (gem already installed)",
|
|
25
25
|
"action": "omarchy-launch-tui omarchy-install-galaaz",
|
|
26
26
|
"disabled": "test -f ~/.config/galaaz/profiles/core"
|
|
27
27
|
},
|
data/version.rb
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
$gem_name = "galaaz"
|
|
2
|
-
$version="2.1.10.pre.
|
|
2
|
+
$version="2.1.10.pre.6"
|