quran-json/bin/json/pull-portuguese

26 lines
679 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 Portuguese 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/pt/1/.json", "src/json/pt/2.json", etc.
##
# Set process title - primarily for the "ps" command.
Process.setproctitle("quran-pull (pull-portuguese)")
##
# Spawn bin/json/private/al-quran
Process.wait Process.spawn(
"./bin/json/private/al-quran", "pt", "portuguese"
)
##
# Spawn bin/json/insert-chapter-metadata
Process.wait Process.spawn(
"./bin/json/insert-chapter-metadata", "pt"
)