summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorUser Mms <mms@voyager.local>2024-10-29 15:30:06 +0100
committerUser Mms <mms@voyager.local>2024-10-29 15:30:06 +0100
commit7ed442dfa3b26483ff6cd1eeb871b40b6be97f52 (patch)
tree719c11b5cbd629b41e0681c343ba93eca0099269 /bin
parent05a2bce35431329610f3cbf092dd23cc526c8684 (diff)
feat: UF archive
Diffstat (limited to 'bin')
-rwxr-xr-xbin/uf_gen.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/bin/uf_gen.rb b/bin/uf_gen.rb
new file mode 100755
index 0000000..78c9ff7
--- /dev/null
+++ b/bin/uf_gen.rb
@@ -0,0 +1,22 @@
+#!/usr/bin/env ruby
+
+# This script will generate .json data file usesd to create pages
+# in hugo
+
+require 'date'
+require 'yaml'
+
+data = Dir["assets/mirror/userfriendly/*.gif"].map do |asset|
+ name = asset.scan(/\d+/).first
+ date = Date.parse(name)
+
+
+ {
+ date: date.to_s,
+ name: name
+ }.transform_keys(&:to_s)
+end
+
+ File.open("assets/mirror/userfriendly/data.yaml", "w") do |f|
+ f.write(data.to_yaml)
+ end