diff options
author | pdp8 <pdp8@pdp8.info> | 2024-03-04 23:13:40 +0100 |
---|---|---|
committer | pdp8 <pdp8@pdp8.info> | 2024-03-04 23:13:40 +0100 |
commit | 0555b2cd77986d916968f1443e375fad005c8d43 (patch) | |
tree | 84112db3509f5d9b40fe41abd14fa6bc1c41303d /social.rb | |
parent | 6b40f3b54efabb740e825ba3d94b5695c2b98ede (diff) |
html.rb separated, Makefile for website generation
Diffstat (limited to 'social.rb')
-rwxr-xr-x | social.rb | 33 |
1 files changed, 0 insertions, 33 deletions
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` |