From 827710107dbc9a01ff27a14e9eac0c65ef6017dd Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Thu, 6 Oct 2022 08:36:43 -0300 Subject: [PATCH] bin/json: pull-chapters-data -> pull-chapter-metadata --- README.md | 14 +++++++------- .../{pull-chapters-data => pull-chapter-metadata} | 8 ++++---- .../{chapters-data.json => chapter-metadata.json} | 0 3 files changed, 11 insertions(+), 11 deletions(-) rename bin/json/{pull-chapters-data => pull-chapter-metadata} (86%) rename src/json/{chapters-data.json => chapter-metadata.json} (100%) diff --git a/README.md b/README.md index 11e213a..1e39ed9 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ in English, Farsi, and Portuguese. The contents are made available in JSON, and This section covers the JSON files. Click [here](#srcsql-directory) to jump to the SQL section. -* The [src/json/chapters-data.json](src/json/chapters-data.json) file contains information +* The [src/json/chapter-metadata.json](src/json/chapter-metadata.json) file contains information about each chapter in The Qur'an. * The [src/json/ar/](src/json/ar/) directory contains The Qur'an in its original Arabic. @@ -26,12 +26,12 @@ section. #### Chapters -* [src/json/chapters-data.json](/src/json/chapters-data.json) +* [src/json/chapter-metadata.json](/src/json/chapter-metadata.json) -The [chapters-data.json](/src/json/chapters-data.json) file was obtained from https://quran.com, +The [chapter-metadata.json](/src/json/chapter-metadata.json) file was obtained from https://quran.com, and modified slightly. -The [chapters-data.json](/src/json/chapters-data.json) file contains information about each +The [chapter-metadata.json](/src/json/chapter-metadata.json) file contains information about each chapter in The Qur'an. It is structured as an array of objects, with each object describing a given chapter. The following example demonstrates how Al-Fatihah is described as an object. The "codepoints" property is a sequence of unicode codepoints can be mapped back to an Arabic word: @@ -329,9 +329,6 @@ contents of the [src/](src/) directory: * JSON scripts - * [bin/json/pull-chapters-data](bin/json/pull-chapters-data)
- The script is responsible for generating [src/json/chapters-data.json](src/json/chapters-data.json). - * [bin/json/pull-arabic](bin/json/pull-arabic)
This script is responsible for populating [src/json/ar/](src/json/ar/). @@ -344,6 +341,9 @@ contents of the [src/](src/) directory: * [bin/json/pull-portuguese](bin/json/pull-portuguese)
This script is responsible for populating [src/json/pt/](src/json/pt/). + * [bin/json/pull-chapter-metadata](bin/json/pull-chapter-metadata)
+ The script is responsible for generating [src/json/chapter-metadata.json](src/json/chapter-metadata.json). + * SQL scripts * [bin/sql/create-sql-seed-file](bin/sql/create-sql-seed-file)
diff --git a/bin/json/pull-chapters-data b/bin/json/pull-chapter-metadata similarity index 86% rename from bin/json/pull-chapters-data rename to bin/json/pull-chapter-metadata index ebb754d..5e53313 100755 --- a/bin/json/pull-chapters-data +++ b/bin/json/pull-chapter-metadata @@ -4,11 +4,11 @@ ## # This script requests information about the chapters of # The Qur'an from the website https://quran.com, and writes -# the result to src/json/chapters-data.json. +# the result to src/json/chapter-metadata.json. ## # Set process name - primarily for the "ps" command -Process.setproctitle("quran-pull (pull-chapters-data)") +Process.setproctitle("quran-pull (pull-chapter-metadata)") ## # Dependencies @@ -21,7 +21,7 @@ require "paint" ## # Configuration variables. base_uri = "quran.com" -dest = File.join('src', 'json', 'chapters-data.json') +dest = File.join('src', 'json', 'chapter-metadata.json') ## # Share a single Net::HTTP instance. @@ -60,4 +60,4 @@ end ## # Write result File.write(dest, JSON.pretty_generate(parsed)) -print Paint["OK: ", :green, :bold], dest, "\n" +print Paint["OK ", :green, :bold], dest, "\n" diff --git a/src/json/chapters-data.json b/src/json/chapter-metadata.json similarity index 100% rename from src/json/chapters-data.json rename to src/json/chapter-metadata.json