From ee7c4c9560ee9f5853f6e81e4e627069a42f9539 Mon Sep 17 00:00:00 2001 From: Nathan Upchurch Date: Tue, 13 May 2025 09:46:43 -0400 Subject: [PATCH] Upload files to "/" --- poaster.rb | 16 ++++++++++++++++ poasterConfig.json | 25 +++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 poaster.rb create mode 100644 poasterConfig.json diff --git a/poaster.rb b/poaster.rb new file mode 100644 index 0000000..f03594e --- /dev/null +++ b/poaster.rb @@ -0,0 +1,16 @@ +require 'json' + +config_file = File.read('./poasterConfig.json') +config_data = JSON.parse(config_file) + +post_type_radiolist_prefix = %Q[kdialog --title "Poaster" --radiolist "Select a post type:"] + +def build_radiolist_command(prefix_string, config_data) + command_string = prefix_string + config_data['postTypes'].each_with_index do |type, i| + command_string += %Q[ #{i+1} "#{type['name']}" off] + end + return command_string +end + +`#{build_radiolist_command(post_type_radiolist_prefix, config_data)}` diff --git a/poasterConfig.json b/poasterConfig.json new file mode 100644 index 0000000..841d1a0 --- /dev/null +++ b/poasterConfig.json @@ -0,0 +1,25 @@ +{ + "buildCommand": "npx @11ty/eleventy", + "postTypes": [ + { + "name": "Now Burning", + "contentEnabled": true, + "frontMatter": [ + { + "name": "Title", + "allowEmpty": false, + "inputType": "text" + }, + { + "name": "Date", + "allowEmpty": false, + "inputType": "date" + } + ], + "titlePrefix": "Now Burning: ", + "titleSuffix": "" + } + ], + "uploadCommand": "update-website", + "workingDirectory": "/home/n_u/Repos/nathanupchurch.com/" +}