diff options
Diffstat (limited to '_plugins/linter.rb')
-rw-r--r-- | _plugins/linter.rb | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/_plugins/linter.rb b/_plugins/linter.rb index ac1c6ed..d0329cc 100644 --- a/_plugins/linter.rb +++ b/_plugins/linter.rb @@ -2,11 +2,12 @@ require 'set' IGNORED_PAGES = Set['sitemap.xml'] LANGS = Set['en', 'pt', 'fr', 'eo'] # jp zh es de -TRACKERS = '-a udp://tracker.coppersurfer.tk:6969/announce -a udp://tracker.ccc.de:80/announce -a udp://tracker.publicbt.com:80 -a udp://tracker.istole.it:80 -a http://tracker.openbittorrent.com:80/announce -a http://tracker.ipv6tracker.org:80/announce' module Jekyll class Linter < Generator safe true + priority :high + @@known_ids = Set[] def insert_id(name, document) @@ -116,20 +117,6 @@ module Jekyll raise "Missing FLAC file '#{flac}'" end - file = "#{date}-#{slug}.ogg" - ogg = "resources/podcasts/#{date}-#{slug}.ogg" - unless File.exist? ogg then - puts "Missing '#{ogg}' file, generating..." - puts `ffmpeg -i #{flac} -ar 48000 -vn -c:a libvorbis -b:a 320k #{ogg}` - site.static_files << Jekyll::StaticFile.new(site, site.source, '', ogg) - end - - torrent = "#{ogg}.torrent" - unless File.exist? torrent then - webseed = "#{site.config['url']}/#{ogg}" - puts "Missing '#{torrent}' file, generating..." - puts `mktorrent #{TRACKERS} -f -v -d -c '#{document.content}' -n #{file} -w #{webseed} -o #{torrent} #{ogg}` - end end if name == 'screencasts' then @@ -137,14 +124,6 @@ module Jekyll unless File.exist? mkv then raise "Missing MKV file '#{mkv}'" end - - torrent = "#{mkv}.torrent" - unless File.exist? torrent then - webseed = "#{site.config['url']}/#{mkv}" - file = "#{date}-#{slug}.mkv" - puts "Missing '#{torrent}' file, generating..." - puts `mktorrent #{TRACKERS} -f -v -d -c '#{document.content}' -n #{file} -w #{webseed} -o #{torrent} #{mkv}` - end end end |