From 2909ac5a53753d2802ead8f01c5f701c70446008 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Tue, 12 Jul 2022 16:16:08 -0300 Subject: [PATCH] s/arab_path/src_path/g --- bin/pull-english | 4 ++-- bin/pull-farsi | 4 ++-- bin/pull-portuguese | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/pull-english b/bin/pull-english index 43d9f2c..1db0c21 100755 --- a/bin/pull-english +++ b/bin/pull-english @@ -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 diff --git a/bin/pull-farsi b/bin/pull-farsi index a6a0299..e483318 100755 --- a/bin/pull-farsi +++ b/bin/pull-farsi @@ -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:) diff --git a/bin/pull-portuguese b/bin/pull-portuguese index 349559b..bdff71b 100755 --- a/bin/pull-portuguese +++ b/bin/pull-portuguese @@ -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:)