wahy 2.0.6 → 2.0.8
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/README.md +30 -1
- data/lib/wahy/cli.rb +8 -0
- data/lib/wahy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cc9f6660bac40237411a61edd6fc80b2cd5cf90b887caee89ee6bbc2a1ad5504
|
|
4
|
+
data.tar.gz: d5ffad70c68baaefda4192d283aab1ecdfa9982dd865c7de91ecdfb73393e148
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 432470df56002faf3dabc7f1182b27f1454ca3a028423213eb1833a7446d61e6317716e25e2d3e782b9bae034fda36f3c3fa9130de430eabd8e04c81b25162ce
|
|
7
|
+
data.tar.gz: 2900ef4a3dbfe0708ec52b809cd897fd3ed8733403e0572e333fb337feea6db5d5b9a0eddeb1470ad4132161f8bdcc5ab4b2d5f4dfbf6a0cd7e5b6db74e87519
|
data/README.md
CHANGED
|
@@ -52,6 +52,7 @@ You can use the wahy command directly in your terminal. By default, it displays
|
|
|
52
52
|
| `-l` | `--lang` | Language selection (`tur` or `eng`) | `eng` |
|
|
53
53
|
| `-s` | `--scripture` | Chapter name or number (1-114) | `1` |
|
|
54
54
|
| `-a` | `--ayah` | Specific verse number or 'all' | `all` |
|
|
55
|
+
| - | `--list-chapters` | List all chapters in a clean table format | - |
|
|
55
56
|
| `-h` | `--help` | Show help menu | - |
|
|
56
57
|
|
|
57
58
|
Examples
|
|
@@ -77,7 +78,35 @@ wahy -l tur -s <chapter_number> -a <verse_number>
|
|
|
77
78
|
wahy -s <chapter_mame_or_number> -a <verse_number>
|
|
78
79
|
```
|
|
79
80
|
|
|
80
|
-
|
|
81
|
+
List all chapters in Turkish:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# List all chapters in English (default)
|
|
85
|
+
wahy --list-chapters
|
|
86
|
+
|
|
87
|
+
# List all chapters in Turkish
|
|
88
|
+
wahy --list-chapters -l tur
|
|
89
|
+
```
|
|
90
|
+
## Listing Chapters (`--list-chapters`)
|
|
91
|
+
|
|
92
|
+
The `--list-chapters` feature acts as an interactive built-in index for the Quranic data files. It provides users with a clean, well-aligned terminal table showing the exact `ID` and `Chapter Name` mappings for the selected language.
|
|
93
|
+
|
|
94
|
+
### Example Output:
|
|
95
|
+
```text
|
|
96
|
+
==================================================
|
|
97
|
+
QURAN CHAPTERS (TURKISH)
|
|
98
|
+
==================================================
|
|
99
|
+
ID | CHAPTER NAME
|
|
100
|
+
--------------------------------------------------
|
|
101
|
+
1 | Fatiha
|
|
102
|
+
2 | Bakara
|
|
103
|
+
3 | Âl-i İmrân
|
|
104
|
+
...
|
|
105
|
+
114 | Nas
|
|
106
|
+
==================================================
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Save output to a file:
|
|
81
110
|
|
|
82
111
|
```bash
|
|
83
112
|
wahy -s <chapter_name_or_number> -a <verse_number> > output.txt
|
data/lib/wahy/cli.rb
CHANGED
|
@@ -4,6 +4,8 @@ require 'colorize'
|
|
|
4
4
|
|
|
5
5
|
module Wahy
|
|
6
6
|
class CLI
|
|
7
|
+
|
|
8
|
+
|
|
7
9
|
def self.start(args)
|
|
8
10
|
options = {
|
|
9
11
|
lang: 'eng',
|
|
@@ -32,6 +34,12 @@ module Wahy
|
|
|
32
34
|
options[:list_chapters] = true
|
|
33
35
|
end
|
|
34
36
|
|
|
37
|
+
# Yeni: Versiyon numarasını gösterir
|
|
38
|
+
opts.on("-v", "--version", "Prints the current version") do
|
|
39
|
+
puts "wahy version #{Wahy::VERSION}"
|
|
40
|
+
exit
|
|
41
|
+
end
|
|
42
|
+
|
|
35
43
|
opts.on("-h", "--help", "Prints this help menu") do
|
|
36
44
|
puts opts
|
|
37
45
|
exit
|
data/lib/wahy/version.rb
CHANGED