summaryrefslogtreecommitdiff
path: root/social.rb
diff options
context:
space:
mode:
Diffstat (limited to 'social.rb')
-rwxr-xr-xsocial.rb18
1 files changed, 10 insertions, 8 deletions
diff --git a/social.rb b/social.rb
index 06d5649..97742bb 100755
--- a/social.rb
+++ b/social.rb
@@ -4,11 +4,13 @@ require 'json'
Dir.chdir ARGV[0]
content = ['public', '', '']
-content << File.read('README')
-content << ''
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 << ''
+# content << ''
bc = if File.exist?('bandcamp')
File.read('bandcamp').chomp
else
@@ -16,16 +18,16 @@ bc = if File.exist?('bandcamp')
end
content << "Bandcamp: #{bc}"
content << ''
-content << "#creativecommons \##{File.basename ARGV[0]}"
+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 /srv/media/music/2023-07-05_blurred_boundaries_of_perception/cover.jpeg`.chomp.sub(
+ '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
+# 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`