From 01d50354e57aed4630f2503746189d013850d9bb Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Wed, 13 Jul 2022 22:15:40 -0300 Subject: [PATCH] rm bin/generate-chapters-length it was a one-off script.. with "bindata/chapters-length.json" in the repository we don't need it anymore. --- bin/generate-chapters-length | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100755 bin/generate-chapters-length diff --git a/bin/generate-chapters-length b/bin/generate-chapters-length deleted file mode 100755 index 17f596e..0000000 --- a/bin/generate-chapters-length +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby - -## -# This script generates bindata/chapters-length.json - a JSON file -# that maps each chapter in The Qur'an to the number of verses -# a chapter contains. - -require "json" -src = File.join("src", "json", "ar", "%{chapter}.json") -result = {} -1.upto(114) do - path = format(src, chapter: _1) - result[_1] = JSON.parse(File.read(path)).size -end -File.write File.join("bindata", "chapters-length.json"), - JSON.pretty_generate(result)