quran-audio 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +0 -0
- data/README.md +19 -17
- data/bundle/io-line.rb/lib/io/line/multiple.rb +0 -0
- data/bundle/io-line.rb/lib/io/line.rb +0 -0
- data/bundle/ryo.rb/lib/ryo/basic_object.rb +0 -0
- data/bundle/ryo.rb/lib/ryo/builder.rb +0 -0
- data/bundle/ryo.rb/lib/ryo/enumerable.rb +0 -0
- data/bundle/ryo.rb/lib/ryo/function.rb +0 -0
- data/bundle/ryo.rb/lib/ryo/json.rb +0 -0
- data/bundle/ryo.rb/lib/ryo/keywords.rb +0 -0
- data/bundle/ryo.rb/lib/ryo/memo.rb +0 -0
- data/bundle/ryo.rb/lib/ryo/object.rb +0 -0
- data/bundle/ryo.rb/lib/ryo/reflect.rb +0 -0
- data/bundle/ryo.rb/lib/ryo/utils.rb +0 -0
- data/bundle/ryo.rb/lib/ryo/version.rb +0 -0
- data/bundle/ryo.rb/lib/ryo/yaml.rb +0 -0
- data/bundle/ryo.rb/lib/ryo.rb +0 -0
- data/lib/{quran/audio → quran-audio}/command/ls.rb +1 -1
- data/lib/{quran/audio → quran-audio}/command/pull.rb +1 -1
- data/lib/{quran/audio → quran-audio}/command.rb +3 -3
- data/lib/{quran/audio → quran-audio}/mp3.rb +3 -3
- data/lib/quran-audio.rb +18 -0
- data/libexec/quran-audio/ls +2 -2
- data/libexec/quran-audio/pull +2 -2
- data/share/quran-audio/VERSION +1 -1
- data/share/quran-audio/erb/recitation.erb +0 -0
- data/share/quran-audio/json/recitations.json +0 -0
- data/share/quran-audio/json/sizeof.json +0 -0
- metadata +7 -8
- data/lib/quran/audio.rb +0 -22
- data/share/quran-audio/CHANGELOG +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 414475a5a90ca8a992503c0e74e6bcf86637197341e4f985da5a35ae936cb0ca
|
4
|
+
data.tar.gz: 3cc838db72186dde0abfa7774dd7ecc8680e426508ff9a8c2fb9e0278acb24de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d8ffb9000e74aee38d50f4fac14e746f6375bd1696c69e3e55086b0aa838336fcf2411499d158dafc1b0bf5645030aff4dfd2f3c1e7776ea4c9fcb8ea6ead61
|
7
|
+
data.tar.gz: f2846ade28aa6a3388ad5d5a2830278e1b84e947e2ad6ac490bbc76d382ff4e138f21d92b8c519f3ae9a1722c397d26f05a229ebbfdbe58c6672a137bd328c23
|
data/LICENSE
CHANGED
File without changes
|
data/README.md
CHANGED
@@ -11,13 +11,30 @@ The recitations are provided in the MP3 format with
|
|
11
11
|
one MP3 file per ayah and a *minimum* bitrate of
|
12
12
|
128kbps.
|
13
13
|
|
14
|
+
## CLI
|
15
|
+
|
16
|
+
#### Commands
|
17
|
+
|
18
|
+
* **quran-audio pull** <br>
|
19
|
+
The pull command downloads recitations. <br>
|
20
|
+
For example:
|
21
|
+
|
22
|
+
user@mecca$ quran-audio pull -r alafasy
|
23
|
+
|
24
|
+
* **quran-audio ls** <br>
|
25
|
+
The ls command lists the recitations available for download. <br>
|
26
|
+
For example:
|
27
|
+
|
28
|
+
user@medina$ quran-audio ls
|
29
|
+
|
14
30
|
## share/
|
15
31
|
|
16
32
|
The command-line utility attempts to download MP3 files
|
17
33
|
relative to the `~/.local/share/quran-audio/` directory.
|
18
34
|
A single, full recitation of The Noble Quran typically
|
19
|
-
ranges from 2.5GB to 2.8GB in size.
|
20
|
-
|
35
|
+
ranges from 2.5GB to 2.8GB in size.
|
36
|
+
|
37
|
+
The directory layout:
|
21
38
|
|
22
39
|
* **~/.local/share/quran-audio/mp3/alafasy/** <br>
|
23
40
|
Contains recitations by Mishari bin Rashed Alafasy
|
@@ -26,21 +43,6 @@ organized per this directory structure:
|
|
26
43
|
* **~/.local/share/quran-audio/mp3/rifai/** <br>
|
27
44
|
Contains recitations by Hani ar-Rifai
|
28
45
|
|
29
|
-
## Examples
|
30
|
-
|
31
|
-
The following examples demonstrate how to use the quran-audio
|
32
|
-
command-line utility to download particular recitations, and
|
33
|
-
list available recitations as well:
|
34
|
-
|
35
|
-
##
|
36
|
-
# Download recitations
|
37
|
-
user@localhost$ quran-audio pull -r alafasy
|
38
|
-
user@localhost$ quran-audio pull -r rifai
|
39
|
-
|
40
|
-
##
|
41
|
-
# List available recitations
|
42
|
-
user@localhost$ quran-audio ls
|
43
|
-
|
44
46
|
## Install
|
45
47
|
|
46
48
|
quran-audio is available via rubygems.org
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/bundle/ryo.rb/lib/ryo.rb
CHANGED
File without changes
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
module
|
3
|
+
module QuranAudio
|
4
4
|
##
|
5
|
-
# The {
|
5
|
+
# The {QuranAudio::Command QuranAudio::Command} class
|
6
6
|
# is the superclass of all commands.
|
7
7
|
class Command
|
8
8
|
require_relative "command/ls"
|
@@ -26,7 +26,7 @@ module Quran::Audio
|
|
26
26
|
@dir ||= Ryo.from({
|
27
27
|
localbase: File.join(Dir.home, ".local"),
|
28
28
|
share: Ryo.memo { File.join(localbase, "share", "quran-audio") },
|
29
|
-
root: File.realpath(File.join(__dir__, "..", ".."
|
29
|
+
root: File.realpath(File.join(__dir__, "..", "..")),
|
30
30
|
erb: Ryo.memo { File.join(root, "share", "quran-audio", "erb") },
|
31
31
|
json: Ryo.memo { File.join(root, "share", "quran-audio", "json") },
|
32
32
|
})
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
module
|
3
|
+
module QuranAudio
|
4
4
|
##
|
5
|
-
# {
|
5
|
+
# {QuranAudio::MP3 QuranAudio::MP3} represents
|
6
6
|
# an ayah of The Noble Quran in the MP3 format.
|
7
7
|
class MP3 < Struct.new(:recitation, :surah, :ayah, :bitrate, keyword_init: true)
|
8
8
|
def initialize(recitation:, **kw)
|
@@ -57,7 +57,7 @@ module Quran::Audio
|
|
57
57
|
|
58
58
|
def jsondir
|
59
59
|
@jsondir ||= File.realpath File.join(
|
60
|
-
__dir__, "..", "..",
|
60
|
+
__dir__, "..", "..",
|
61
61
|
"share", "quran-audio", "json"
|
62
62
|
)
|
63
63
|
end
|
data/lib/quran-audio.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
module QuranAudio
|
2
|
+
def self.setup_bundle!
|
3
|
+
bundle = File.realpath File.join(__dir__, "..", "bundle")
|
4
|
+
Dir[File.join(bundle, "*")].each { $:.unshift File.join(_1, "lib") }
|
5
|
+
end
|
6
|
+
setup_bundle!
|
7
|
+
|
8
|
+
require "json"
|
9
|
+
require "ryo"
|
10
|
+
require "fileutils"
|
11
|
+
require "io/console"
|
12
|
+
require "io/line"
|
13
|
+
require "erb"
|
14
|
+
require "paint"
|
15
|
+
require "net/http"
|
16
|
+
require_relative "quran-audio/command"
|
17
|
+
require_relative "quran-audio/mp3"
|
18
|
+
end
|
data/libexec/quran-audio/ls
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
require "quran
|
4
|
+
require "quran-audio"
|
5
5
|
require "optparse"
|
6
6
|
|
7
7
|
##
|
@@ -9,7 +9,7 @@ require "optparse"
|
|
9
9
|
def main(argv)
|
10
10
|
options = Ryo({})
|
11
11
|
option_parser.parse(argv, into: options)
|
12
|
-
|
12
|
+
QuranAudio::Command::Ls.new(options).perform
|
13
13
|
end
|
14
14
|
|
15
15
|
##
|
data/libexec/quran-audio/pull
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
require "quran
|
4
|
+
require "quran-audio"
|
5
5
|
require "optparse"
|
6
6
|
|
7
7
|
##
|
@@ -14,7 +14,7 @@ def main(argv)
|
|
14
14
|
delay: 0.5
|
15
15
|
})
|
16
16
|
option_parser.parse(argv, into: options)
|
17
|
-
|
17
|
+
QuranAudio::Command::Pull.new(options).perform
|
18
18
|
end
|
19
19
|
|
20
20
|
##
|
data/share/quran-audio/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
v0.5.
|
1
|
+
v0.5.1
|
File without changes
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quran-audio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- '0x1eef'
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: paint
|
@@ -134,14 +134,13 @@ files:
|
|
134
134
|
- bundle/ryo.rb/lib/ryo/utils.rb
|
135
135
|
- bundle/ryo.rb/lib/ryo/version.rb
|
136
136
|
- bundle/ryo.rb/lib/ryo/yaml.rb
|
137
|
-
- lib/quran
|
138
|
-
- lib/quran
|
139
|
-
- lib/quran
|
140
|
-
- lib/quran
|
141
|
-
- lib/quran
|
137
|
+
- lib/quran-audio.rb
|
138
|
+
- lib/quran-audio/command.rb
|
139
|
+
- lib/quran-audio/command/ls.rb
|
140
|
+
- lib/quran-audio/command/pull.rb
|
141
|
+
- lib/quran-audio/mp3.rb
|
142
142
|
- libexec/quran-audio/ls
|
143
143
|
- libexec/quran-audio/pull
|
144
|
-
- share/quran-audio/CHANGELOG
|
145
144
|
- share/quran-audio/VERSION
|
146
145
|
- share/quran-audio/erb/recitation.erb
|
147
146
|
- share/quran-audio/json/recitations.json
|
data/lib/quran/audio.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Quran
|
4
|
-
module Audio
|
5
|
-
def self.setup_bundle!
|
6
|
-
bundle = File.realpath File.join(__dir__, "..", "..", "bundle")
|
7
|
-
Dir[File.join(bundle, "*")].each { $:.unshift File.join(_1, "lib") }
|
8
|
-
end
|
9
|
-
setup_bundle!
|
10
|
-
|
11
|
-
require "json"
|
12
|
-
require "ryo"
|
13
|
-
require "fileutils"
|
14
|
-
require "io/console"
|
15
|
-
require "io/line"
|
16
|
-
require "erb"
|
17
|
-
require "paint"
|
18
|
-
require "net/http"
|
19
|
-
require_relative "audio/command"
|
20
|
-
require_relative "audio/mp3"
|
21
|
-
end
|
22
|
-
end
|
data/share/quran-audio/CHANGELOG
DELETED