quran-audio 0.4.2 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f31510aaf2b2ac45001870411b82eb1e1ff7c8103cdbebb4f9b92268906b4cfb
4
- data.tar.gz: 6c54cbdf7ed5493fcb9cc0cf0e84305adae279c2433d5f1e6204ac9ba9af9b38
3
+ metadata.gz: 414475a5a90ca8a992503c0e74e6bcf86637197341e4f985da5a35ae936cb0ca
4
+ data.tar.gz: 3cc838db72186dde0abfa7774dd7ecc8680e426508ff9a8c2fb9e0278acb24de
5
5
  SHA512:
6
- metadata.gz: c2a714b375cab47aea59c2f03132e291b4f8b617a271e75aeb15b7ee9c07b0835734a35ca3ef99d988604531d4c91a68fdad0aecbebaa184c857a0c0ff123d3a
7
- data.tar.gz: a25e352aa4d91b529e9943e07d4a58ed49f4a9c6f40ad56249f60c9a3bc038b929fef304dba2f9da0357bc8a01b7aab7abc32f18498f9150e0fa5c101311e6c8
6
+ metadata.gz: 2d8ffb9000e74aee38d50f4fac14e746f6375bd1696c69e3e55086b0aa838336fcf2411499d158dafc1b0bf5645030aff4dfd2f3c1e7776ea4c9fcb8ea6ead61
7
+ data.tar.gz: f2846ade28aa6a3388ad5d5a2830278e1b84e947e2ad6ac490bbc76d382ff4e138f21d92b8c519f3ae9a1722c397d26f05a229ebbfdbe58c6672a137bd328c23
data/LICENSE CHANGED
File without changes
data/README.md CHANGED
@@ -11,38 +11,38 @@ 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. Each recitation is
20
- organized per this directory structure:
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
24
- * **~/.local/share/quran-audio/mp3/alajmi/** <br>
25
- Contains recitations by Ahmad bin Ali Al-Ajmi
26
41
  * **~/.local/share/quran-audio/mp3/yassin/** <br>
27
42
  Contains recitations by Sahl Yassin
28
43
  * **~/.local/share/quran-audio/mp3/rifai/** <br>
29
44
  Contains recitations by Hani ar-Rifai
30
45
 
31
- ## Examples
32
-
33
- The following examples demonstrate how to use the quran-audio
34
- command-line utility to download particular recitations, and
35
- list available recitations as well:
36
-
37
- ##
38
- # Download recitations
39
- user@localhost$ quran-audio pull -r alafasy
40
- user@localhost$ quran-audio pull -r rifai
41
-
42
- ##
43
- # List available recitations
44
- user@localhost$ quran-audio ls
45
-
46
46
  ## Install
47
47
 
48
48
  quran-audio is available via rubygems.org
@@ -54,7 +54,6 @@ quran-audio is available via rubygems.org
54
54
  **Recitations**
55
55
 
56
56
  * Mishari bin Rashed Alafasy
57
- * Ahmad bin Ali Al-Ajmi
58
57
  * Sahl Yassin
59
58
  * Hani ar-Rifai
60
59
 
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
File without changes
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Quran::Audio
3
+ module QuranAudio
4
4
  class Command::Ls < Command
5
5
  ##
6
6
  # @return [void]
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Quran::Audio
3
+ module QuranAudio
4
4
  class Command::Pull < Command
5
5
  require "forwardable"
6
6
  extend Forwardable
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Quran::Audio
3
+ module QuranAudio
4
4
  ##
5
- # The {Quran::Audio::Command Quran::Audio::Command} class
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 Quran::Audio
3
+ module QuranAudio
4
4
  ##
5
- # {Quran::Audio::MP3 Quran::Audio::MP3} represents
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
@@ -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
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- require "quran/audio"
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
- Quran::Audio::Command::Ls.new(options).perform
12
+ QuranAudio::Command::Ls.new(options).perform
13
13
  end
14
14
 
15
15
  ##
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- require "quran/audio"
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
- Quran::Audio::Command::Pull.new(options).perform
17
+ QuranAudio::Command::Pull.new(options).perform
18
18
  end
19
19
 
20
20
  ##
@@ -1 +1 @@
1
- v0.4.2
1
+ v0.5.1
File without changes
@@ -9,16 +9,6 @@
9
9
  "path": "/alafasy/",
10
10
  "destdir": "%{sharedir}/mp3/alafasy/"
11
11
  },
12
- "alajmi": {
13
- "id": "alajmi",
14
- "name": "Ahmad bin Ali Al-Ajmi",
15
- "origin": "Saudi Arabia",
16
- "available_bitrates": [128],
17
- "default_bitrate": 128,
18
- "host": "al-quran-audio.reflectslight.io",
19
- "path": "/alajmi/",
20
- "destdir": "%{sharedir}/mp3/alajmi/"
21
- },
22
12
  "yassin": {
23
13
  "id": "yassin",
24
14
  "name": "Sahl Yassin",
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.4.2
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: 2024-11-21 00:00:00.000000000 Z
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/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
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
@@ -165,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
164
  - !ruby/object:Gem::Version
166
165
  version: '0'
167
166
  requirements: []
168
- rubygems_version: 3.5.21
167
+ rubygems_version: 3.5.23
169
168
  signing_key:
170
169
  specification_version: 4
171
170
  summary: Download recitations of The Noble Quran
data/lib/quran/audio.rb DELETED
@@ -1,23 +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 "ryo/json"
14
- require "fileutils"
15
- require "io/console"
16
- require "io/line"
17
- require "erb"
18
- require "paint"
19
- require "net/http"
20
- require_relative "audio/command"
21
- require_relative "audio/mp3"
22
- end
23
- end
@@ -1,4 +0,0 @@
1
- * vNEXT
2
-
3
- ** Add new reciter: Nabil Al-Rifai
4
- At the recommendation of a friend