s/arab_path/src_path/g
This commit is contained in:
parent
f8c33d9e7c
commit
2909ac5a53
3 changed files with 6 additions and 6 deletions
|
@ -22,7 +22,7 @@ path = "/%{chapter_num}/%{verse_num}"
|
|||
dest_path = File.join(
|
||||
__dir__, "..", "src", "json", "en", "%{chapter_num}.json"
|
||||
)
|
||||
arab_path = File.join(
|
||||
src_path = File.join(
|
||||
__dir__, "..", "src", "json", "ar", "%{chapter_num}.json"
|
||||
)
|
||||
chapter_count = 114
|
||||
|
@ -48,7 +48,7 @@ end
|
|||
final_dest = format(dest_path, chapter_num:)
|
||||
rows = []
|
||||
|
||||
verses = JSON.parse File.read(format(arab_path, chapter_num:))
|
||||
verses = JSON.parse File.read(format(src_path, chapter_num:))
|
||||
verses.each do |verse_num, _|
|
||||
case res = http.request(get_request(path, chapter_num, verse_num))
|
||||
when Net::HTTPOK
|
||||
|
|
|
@ -54,7 +54,7 @@ ch_names = %w[
|
|||
base_uri = "al-quran.cc"
|
||||
path = "/quran-translation/farsi/%{ch_name}/%{verse_num}.html"
|
||||
cool_off = 5
|
||||
arab_path = File.join(
|
||||
src_path = File.join(
|
||||
__dir__, "..", "src", "json", "ar", "%{chapter_num}.json"
|
||||
)
|
||||
dest_path = File.join(
|
||||
|
@ -86,7 +86,7 @@ end
|
|||
##
|
||||
# main()
|
||||
1.upto(114) do |chapter_num|
|
||||
verses = JSON.parse File.read(format(arab_path, chapter_num:))
|
||||
verses = JSON.parse File.read(format(src_path, chapter_num:))
|
||||
rows = []
|
||||
ch_name = ch_names[chapter_num - 1]
|
||||
final_dest = format(dest_path, chapter_num:)
|
||||
|
|
|
@ -54,7 +54,7 @@ ch_names = %w[
|
|||
base_uri = "al-quran.cc"
|
||||
path = "/quran-translation/portuguese/%{ch_name}/%{verse_num}.html"
|
||||
cool_off = 5
|
||||
arab_path = File.join(
|
||||
src_path = File.join(
|
||||
__dir__, "..", "src", "json", "ar", "%{chapter_num}.json"
|
||||
)
|
||||
dest_path = File.join(
|
||||
|
@ -86,7 +86,7 @@ end
|
|||
##
|
||||
# main()
|
||||
1.upto(114) do |chapter_num|
|
||||
verses = JSON.parse File.read(format(arab_path, chapter_num:))
|
||||
verses = JSON.parse File.read(format(src_path, chapter_num:))
|
||||
rows = []
|
||||
ch_name = ch_names[chapter_num - 1]
|
||||
final_dest = format(dest_path, chapter_num:)
|
||||
|
|
Loading…
Reference in a new issue