rm libexec/quran-pull
Remove leftover from The Great Rename
This commit is contained in:
parent
959c7fc57c
commit
c0c9511299
2 changed files with 0 additions and 59 deletions
|
@ -1,31 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
lib_dir = File.realpath File.join(__dir__, "..", "..", "lib", "quran-pull")
|
||||
require File.join(lib_dir, "pull")
|
||||
require "optparse"
|
||||
require "nokogiri"
|
||||
|
||||
def grep(res)
|
||||
html = Nokogiri::HTML(res.body)
|
||||
el = html.css("div[class^='TranslationText']").last
|
||||
el.text.gsub(/[0-9]/, "")
|
||||
end
|
||||
|
||||
##
|
||||
# main
|
||||
def main(argv)
|
||||
cmd = Pull.new(Pull.cli(argv))
|
||||
cmd.keepalive do
|
||||
1.upto(114) do |surah_no|
|
||||
rows = []
|
||||
1.upto(cmd.count[surah_no]) do |ayah_no|
|
||||
cmd.pull_ayah(surah_no, ayah_no) do |res|
|
||||
rows.concat([ayah_no, grep(res)])
|
||||
end
|
||||
cmd.line.rewind.print "Surah #{surah_no} [#{ayah_no}/#{cmd.count[surah_no]}]"
|
||||
end
|
||||
cmd.write(surah_no, rows)
|
||||
cmd.line.end
|
||||
end
|
||||
end
|
||||
end
|
||||
main(ARGV)
|
|
@ -1,28 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
lib_dir = File.realpath File.join(__dir__, "..", "..", "lib", "quran-pull")
|
||||
require File.join(lib_dir, "pull")
|
||||
require "optparse"
|
||||
require "nokogiri"
|
||||
|
||||
def grep(res)
|
||||
html = Nokogiri::HTML(res.body)
|
||||
html.css("table[dir='rtl'] tr td div:last-child").map { _1.text.strip }
|
||||
end
|
||||
|
||||
##
|
||||
# main
|
||||
def main(argv)
|
||||
cmd = Pull.new(Pull.cli(argv))
|
||||
cmd.keepalive do
|
||||
1.upto(114) do |surah_no|
|
||||
rows = []
|
||||
cmd.pull_surah(surah_no) do |res|
|
||||
rows.concat(grep(res).map.with_index(1) { [_2, _1] })
|
||||
end
|
||||
cmd.line.rewind.print "Surah #{surah_no} [#{surah_no}/114]"
|
||||
cmd.write(surah_no, rows)
|
||||
end
|
||||
cmd.line.end
|
||||
end
|
||||
end
|
||||
main(ARGV)
|
Loading…
Reference in a new issue