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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9afcb2f1ff85d1e27222269bdd55a3cf604f2fada23566cb72e03eb172f06305
4
- data.tar.gz: 899bb6008632bf7ecbe068d32518acd79208b70478ab2fa28daae1c90cfcafa6
3
+ metadata.gz: 414475a5a90ca8a992503c0e74e6bcf86637197341e4f985da5a35ae936cb0ca
4
+ data.tar.gz: 3cc838db72186dde0abfa7774dd7ecc8680e426508ff9a8c2fb9e0278acb24de
5
5
  SHA512:
6
- metadata.gz: 81dec8cb7c3f0f8011ab715bdc207dc7e3772b94b513848a4fa160ed3f10729cc4c0a78b682399cc951d901b6136e1ce828b4800a8a9909e930edaea690b32a3
7
- data.tar.gz: '091e9a98c34496bc9d19b96acfc90203f94937410e62b237da4905ebee2c886cc97587981cf2aa38a0b58c629916b620029fd9033ee6b67a060c941b3dda5028'
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. 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
@@ -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
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.5.0
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.0
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-20 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
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
@@ -1,4 +0,0 @@
1
- * vNEXT
2
-
3
- ** Add new reciter: Nabil Al-Rifai
4
- At the recommendation of a friend