summaryrefslogtreecommitdiff
path: root/new/bin
diff options
context:
space:
mode:
authormms <git@sapka.me>2025-01-05 22:34:55 +0100
committermms <git@sapka.me>2025-01-05 22:34:55 +0100
commitbfd8209ad0d80b5027bea8a1a095dadc8bffdc61 (patch)
tree1d4ec6d63dd3b4a1f788ec340a0fba3cd48b3dea /new/bin
parent628fcf941c322dd0ed24a643c58394392484740e (diff)
feat(new): splash page in progress
Diffstat (limited to 'new/bin')
l---------new/bin/.#server.rb1
-rw-r--r--new/bin/builder.rb35
2 files changed, 35 insertions, 1 deletions
diff --git a/new/bin/.#server.rb b/new/bin/.#server.rb
deleted file mode 120000
index e9c1dc67..00000000
--- a/new/bin/.#server.rb
+++ /dev/null
@@ -1 +0,0 @@
-mms@voyager.local.45942:1734682989 \ No newline at end of file
diff --git a/new/bin/builder.rb b/new/bin/builder.rb
new file mode 100644
index 00000000..47195b27
--- /dev/null
+++ b/new/bin/builder.rb
@@ -0,0 +1,35 @@
+require 'optparse'
+
+require_relative "../lib/crys"
+require_relative "mixins/splash.rb"
+
+Options = Struct.new(:filepath)
+@options = Options.new
+
+OptionParser.new do |opts|
+ opts.banner = 'Usage: builder.rb [options]'
+
+ opts.on('-fPATH', '--file=PATH', 'File path') do |n|
+ @options[:filepath] = n
+ end
+end.parse!
+
+
+module Crys
+ class BuilderRunner
+
+ def initialize(file_path:, image_dir:, output_dir:, builder_class:)
+ @file_path = file_path
+ @output_dir = output_dir
+ @builder_class = builder_class
+ @image_dir = image_dir
+ end
+
+ def run
+ builder_class.new(file_path: file_path, output_dir: output_dir, image_dir: image_dir).build
+ end
+
+ private
+ attr_reader :builder_class, :file_path, :output_dir, :image_dir
+ end
+end