markdownr 0.7.1 → 0.8.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: 996c76f4e052368ee2592a32483bf157333e70f997a6cb81d750cf3780e7d3d5
4
- data.tar.gz: 475c596f8186dcf4612767ce758976c0d5f619df38c12379e83d0261132c522c
3
+ metadata.gz: d2cb82d0149fbfce233b73c5dac9743b941dab4242eb7a28431e4c796c89dc1b
4
+ data.tar.gz: eafe8d88da6cac6033d80f3aeae204c3f99b19d99ef09102389e0095112fd173
5
5
  SHA512:
6
- metadata.gz: 85cc70b9ace18249c953025f72635c1944fad94dbe3eae57340ab9a0215b5abe46e70110c6c08e10fc98d3e943145d72aeaf8a588c581b555fc58e36dad51408
7
- data.tar.gz: 99177826e2f55c5d71364adc4f7fabab3e79a5354598bc3404f3abdd929acc688ee989dc1b2877fd09003cd3846d2def6a14897c82afd85fdd08414c0e25a605
6
+ metadata.gz: 92eac0f8d752b3c4daf1fa484feb3ae56f2eef2c7b64e8b6e757a5377c5f17655acecae47466a7a5dcad53be1ef06f4e00c62e81afc9f776fdb8f963fb154a42
7
+ data.tar.gz: 80dd17b97f0f869381b79624b91a15b025514a9b5d58e65f1b1943a5dce6f7338ad9abbe2cc3436b268f072800adce4135624d94c5346afc970a7549b73a2d3d
@@ -1,4 +1,4 @@
1
- FROM ruby:3.4-slim
1
+ FROM ruby:3.4.5-slim
2
2
  RUN apt-get update && apt-get install -y build-essential && gem install markdownr
3
3
  WORKDIR /data
4
4
  CMD ["markdownr", "--behind-proxy", "-b", "0.0.0.0", "/data"]
data/bin/markdownr CHANGED
@@ -101,6 +101,21 @@ if File.exist?(config_path)
101
101
  existing = MarkdownServer::App.settings.plugin_dirs
102
102
  MarkdownServer::App.set :plugin_dirs, (yaml["plugin_dirs"] + existing).uniq
103
103
  end
104
+
105
+ # Load CSV database config (top-level key or legacy plugin key)
106
+ csv_db_paths = yaml&.dig("csv_databases") || yaml&.dig("plugins", "csv_browser", "databases")
107
+ if csv_db_paths.is_a?(Array) && !csv_db_paths.empty?
108
+ require_relative "../lib/markdown_server/csv_browser/config_loader"
109
+ loader = MarkdownServer::CsvBrowser::ConfigLoader.new(csv_db_paths, dir)
110
+ MarkdownServer::App.set :csv_browser_config, loader
111
+ end
112
+
113
+ # Load CSV add-on files (absolute paths keyed by add-on name)
114
+ csv_addons = yaml&.dig("csv_addons")
115
+ if csv_addons.is_a?(Hash) && !csv_addons.empty?
116
+ require_relative "../lib/markdown_server/csv_browser/addon_registry"
117
+ MarkdownServer::CsvBrowser::CsvAddonRegistry.load(csv_addons, dir)
118
+ end
104
119
  end
105
120
 
106
121
  MarkdownServer::App.load_plugins!
@@ -0,0 +1,39 @@
1
+ # Orchestrates local markdownr servers.
2
+ #
3
+ # Start: docker compose -f bin/markdownr-servers.yaml up -d --build
4
+ # Restart: docker compose -f bin/markdownr-servers.yaml restart
5
+ # Rebuild (after publishing a new markdownr gem):
6
+ # docker compose -f bin/markdownr-servers.yaml up -d --build --force-recreate
7
+ # Stop: docker compose -f bin/markdownr-servers.yaml down
8
+ #
9
+ x-markdownr: &markdownr
10
+ build:
11
+ context: .
12
+ dockerfile: Dockerfile.markdownr
13
+ restart: unless-stopped
14
+ command: ["markdownr", "--behind-proxy", "-b", "0.0.0.0", "/data"]
15
+
16
+ services:
17
+ lofts:
18
+ <<: *markdownr
19
+ container_name: markdownr-lofts
20
+ ports:
21
+ - "4444:4567"
22
+ volumes:
23
+ - ~/code/claude/lofts/projects:/data
24
+
25
+ bible-repo:
26
+ <<: *markdownr
27
+ container_name: markdownr-bible-repo
28
+ ports:
29
+ - "4569:4567"
30
+ volumes:
31
+ - ~/code/claude/bible/bible-repo:/data
32
+
33
+ scripture:
34
+ <<: *markdownr
35
+ container_name: markdownr-scripture
36
+ ports:
37
+ - "4568:4567"
38
+ volumes:
39
+ - ~/code/claude/bible/scripture/resource/books/bible:/data