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.
This commit is contained in:
0x1eef 2022-07-13 22:15:40 -03:00
parent 0fae84cde2
commit 01d50354e5

View file

@ -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)