From 6b40f3b54efabb740e825ba3d94b5695c2b98ede Mon Sep 17 00:00:00 2001 From: pdp8 Date: Mon, 4 Mar 2024 13:42:04 +0100 Subject: disallow AI bots in robots.txt, mail.rb title, valid rss --- mail.rb | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'mail.rb') diff --git a/mail.rb b/mail.rb index 35d495d..1aac68c 100755 --- a/mail.rb +++ b/mail.rb @@ -8,18 +8,28 @@ mailfile = if ARGV[1] and ARGV[1] == 'publish' Dir.chdir ARGV[0] date, title = File.basename(ARGV[0]).split('_', 2) +nr_tracks = Dir['*.flac'].size +type = if nr_tracks == 1 + 'single' + elsif nr_tracks < 6 + 'ep' + elsif nr_tracks > 0 + 'lp' + end content = ["From: info@pdp8.info -Subject: [pdp8] #{title.gsub('_', ' ')} +Subject: [pdp8] #{title.gsub('_', ' ')} #{type} Content-Type: text/plain List-Unsubscribe: "] content << '' -content << File.read('README') +content << "the new pdp8 #{type} \"#{title.gsub('_', ' ')}\" is online:" +# content << File.read('README').chomp content << '' -content << "https://pdp8.info/music.html\##{date}" +content << "web: https://pdp8.info/music.html\##{date}" +content << "internet archive: https://archive.org/details/pdp8_#{title}" bc = if File.exist?('bandcamp') - File.read('bandcamp').chomp + "bandcamp: #{File.read('bandcamp').chomp}" else - "https://pdp8.bandcamp.com/album/#{title.gsub(' ', '-')}" + "bandcamp: https://pdp8.bandcamp.com/album/#{title.gsub('_', '-')}" end content << bc content << '' -- cgit v1.2.3