26 lines
662 B
Ruby
Executable file
26 lines
662 B
Ruby
Executable file
#!/usr/bin/env ruby
|
|
# frozen_string_literal: true
|
|
|
|
##
|
|
# This script requests each verse, in each chapter
|
|
# of The Qur'an - in the Farsi language. The content
|
|
# is requested from the https://al-quran.cc website.
|
|
#
|
|
# Each chapter is then saved in a JSON file, for example:
|
|
# "src/json/fa/1.json", "src/json/fa/2.json", etc.
|
|
|
|
##
|
|
# Set process name - primarily for the "ps" command.
|
|
Process.setproctitle("quran-pull (pull-farsi)")
|
|
|
|
##
|
|
# Spawn bin/json/private/al-quran
|
|
Process.wait Process.spawn(
|
|
"./bin/json/private/al-quran", "fa", "farsi"
|
|
)
|
|
|
|
##
|
|
# Spawn bin/json/insert-chapter-metadata
|
|
Process.wait Process.spawn(
|
|
"./bin/json/insert-chapter-metadata", "fa"
|
|
)
|