summaryrefslogtreecommitdiff
path: root/new/splash
diff options
context:
space:
mode:
authormms <git@sapka.me>2025-01-08 22:20:17 +0100
committermms <git@sapka.me>2025-01-08 22:20:17 +0100
commit3d13bedaaffdae466621788d808a6b71b9ed9f59 (patch)
tree5e941bb44ad7cd37252459bfe48d57778b76342a /new/splash
parent4004a55b0e324c35cbc7d58b831e49efd484ab93 (diff)
feat: batch-first
Diffstat (limited to 'new/splash')
l---------new/splash/bin/.#build.rb1
-rwxr-xr-xnew/splash/bin/build.rb18
-rw-r--r--new/splash/db/pages.yaml4
-rw-r--r--new/splash/lib/splash.rb1
-rw-r--r--new/splash/lib/splash/batch_builder.rb8
-rw-r--r--new/splash/pages/index.html.erb3
-rw-r--r--new/splash/pages/index.xml.rb1
7 files changed, 12 insertions, 24 deletions
diff --git a/new/splash/bin/.#build.rb b/new/splash/bin/.#build.rb
deleted file mode 120000
index 0f727030..00000000
--- a/new/splash/bin/.#build.rb
+++ /dev/null
@@ -1 +0,0 @@
-mms@voyager.local.6355:1735980208 \ No newline at end of file
diff --git a/new/splash/bin/build.rb b/new/splash/bin/build.rb
index 7f5ac93f..38b87f55 100755
--- a/new/splash/bin/build.rb
+++ b/new/splash/bin/build.rb
@@ -4,21 +4,19 @@
require_relative '../lib/splash'
require_relative '../../bin/builder'
-builder_class = Crys::Splash::Builder
-batch_builder_class = Crys::Splash::BatchBuilder
output_dir = "#{File.dirname(File.dirname(__FILE__))}/output"
image_dir = "#{File.dirname(File.dirname(File.expand_path(__FILE__)))}/assets/images"
-theme_dir = "#{File.dirname(File.dirname(__FILE__))}/theme"
pages_db = Crys::Splash::PagesDbManager
file_path = @options[:filepath]
+batch = file_path == :all
+
+builder = Crys::Splash::Builder.new(file_path: file_path, output_dir: output_dir, image_dir: image_dir)
+batch_builder = Crys::BatchBuilder.new(pages_db: pages_db, output_dir: output_dir, image_dir: image_dir,
+ builder_class: Crys::Splash::Builder)
Crys::BuilderRunner.new(
- file_path: file_path,
- output_dir: output_dir,
- builder_class: builder_class,
- image_dir: image_dir,
- batch_builder_class: batch_builder_class,
- theme_dir: theme_dir,
- pages_db: pages_db
+ builder: builder,
+ batch_builder: batch_builder,
+ batch: batch
).run
diff --git a/new/splash/db/pages.yaml b/new/splash/db/pages.yaml
index a0d51655..9d438881 100644
--- a/new/splash/db/pages.yaml
+++ b/new/splash/db/pages.yaml
@@ -3,10 +3,10 @@
d5d3594a0e43df11c58fad58073dc288:
:filename: index.html
:file_path: "/home/mms/ghq/michal.sapka.me/mms/site/new/splash/pages/index.html.erb"
- :last_update: 2025-01-08 21:08:36.876579930 +01:00
+ :last_update: 2025-01-08 22:18:17.593730099 +01:00
:in_rss: false
b6bd1d5c7d2d3ea1d0db3032235af0bf:
:filename: index.xml
:file_path: "/home/mms/ghq/michal.sapka.me/mms/site/new/splash/pages/index.xml.rb"
- :last_update: 2025-01-08 21:08:36.895155483 +01:00
+ :last_update: 2025-01-08 22:19:55.857164931 +01:00
:in_rss: false
diff --git a/new/splash/lib/splash.rb b/new/splash/lib/splash.rb
index 5a299566..cf354740 100644
--- a/new/splash/lib/splash.rb
+++ b/new/splash/lib/splash.rb
@@ -4,7 +4,6 @@ require_relative '../../lib/crys'
require_relative 'splash/server'
require_relative 'splash/builder'
-require_relative 'splash/batch_builder'
require_relative 'splash/pages_db_manager'
module Crys
diff --git a/new/splash/lib/splash/batch_builder.rb b/new/splash/lib/splash/batch_builder.rb
deleted file mode 100644
index 71f5594b..00000000
--- a/new/splash/lib/splash/batch_builder.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# frozen_string_literal: true
-
-module Crys
- module Splash
- class BatchBuilder < Crys::BatchBuilder
- end
- end
-end
diff --git a/new/splash/pages/index.html.erb b/new/splash/pages/index.html.erb
index a23c8ff8..5614cb73 100644
--- a/new/splash/pages/index.html.erb
+++ b/new/splash/pages/index.html.erb
@@ -1,6 +1,6 @@
<!DOCTYPE html>
-
<html lang="en">
+ TEST
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
@@ -22,7 +22,6 @@
background-image: url("<%= process_image(file: "background.png").relative_path %>");
color: #000;
}
-
a {
color: #000;
}
diff --git a/new/splash/pages/index.xml.rb b/new/splash/pages/index.xml.rb
index 01edf785..fe4f8b91 100644
--- a/new/splash/pages/index.xml.rb
+++ b/new/splash/pages/index.xml.rb
@@ -18,6 +18,7 @@ module Crys
'index.xml'
end
+
private
attr_reader :main_rss