From 0555b2cd77986d916968f1443e375fad005c8d43 Mon Sep 17 00:00:00 2001 From: pdp8 Date: Mon, 4 Mar 2024 23:13:40 +0100 Subject: html.rb separated, Makefile for website generation --- social.rb | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100755 social.rb (limited to 'social.rb') diff --git a/social.rb b/social.rb deleted file mode 100755 index 97742bb..0000000 --- a/social.rb +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env ruby -require 'uri' -require 'json' - -Dir.chdir ARGV[0] -content = ['public', '', ''] -date, title = File.basename(ARGV[0]).split('_', 2) -title.gsub!('_', ' ') -content << title + ' LP' -content << File.read('README') -# content << '' -content << "https://pdp8.info/music.html\##{date}" -# content << '' -bc = if File.exist?('bandcamp') - File.read('bandcamp').chomp - else - "https://pdp8.bandcamp.com/album/#{title.gsub(' ', '-')}" - end -content << "Bandcamp: #{bc}" -content << '' -content << '#creativecommons #electronic #music #techno' -content << '==' -content << File.join("https://media.pdp8.info/music/#{File.basename ARGV[0]}", - 'cover.jpeg') + "\t" + `exiv2 -K Xmp.dc.description -P v cover.jpeg`.chomp.sub( - /^lang=\S+ /, '' - ) - -# Dir['*mp3'].each do |mp3| -# content << File.join("https://media.pdp8.info/music/#{File.basename ARGV[0]}", "#{File.basename mp3}") -# end -File.open('/tmp/content.txt', 'w+') { |f| f.puts content.join("\n") } -system 'hx /tmp/content.txt' -puts `curl -sb cookies.txt --data-binary @/tmp/content.txt -X POST https://social.pdp8.info/create` -- cgit v1.2.3