wahy 2.0.6 → 2.0.7
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 +35 -1
- 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: a464603f9dc3bd456c8e2abb036f8960180022f4780b55456d08bc902d509cc2
|
|
4
|
+
data.tar.gz: dc613b0c8d233033c7a4c99e16d9a1834975d74fe85c9e7118bfd1f5edaf6c57
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bcd24fc1ed36354b8a39936f2eb46e0f80b6a87d8f0ee8a2104e864880d44aba011ce6482cb53fef8cc4d600140e52146f21f765ad5958cbe18c59ba10c4ffd9
|
|
7
|
+
data.tar.gz: 8b830196da3e6fb84894355832b156f28f760c5ffad428c722979ec8d80a07a547b636aa10d821261740e0bd0ed2c00408afa889151a887f224390a42ba39187
|
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,40 @@ 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
|
+
### Key Benefits:
|
|
95
|
+
1. **Dynamic Language Switch:** Specifying `-l 'tur'` or `-l 'eng'` alongside `--list-chapters` automatically switches the content of the index table to that specific translation file.
|
|
96
|
+
2. **Short-Circuit Execution:** When this flag is triggered, the program instantly renders the table and exits securely, avoiding any unnecessary XML traversing or verse filtering overhead.
|
|
97
|
+
3. **Formatted UI Output:** Utilizing explicit string formatting rules ensures that all tabular column lines down the terminal remain perfectly aligned regardless of varying chapter name lengths.
|
|
98
|
+
|
|
99
|
+
### Example Output:
|
|
100
|
+
```text
|
|
101
|
+
==================================================
|
|
102
|
+
QURAN CHAPTERS (TURKISH)
|
|
103
|
+
==================================================
|
|
104
|
+
ID | CHAPTER NAME
|
|
105
|
+
--------------------------------------------------
|
|
106
|
+
1 | Fatiha
|
|
107
|
+
2 | Bakara
|
|
108
|
+
3 | Âl-i İmrân
|
|
109
|
+
...
|
|
110
|
+
114 | Nas
|
|
111
|
+
==================================================
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Save output to a file:
|
|
81
115
|
|
|
82
116
|
```bash
|
|
83
117
|
wahy -s <chapter_name_or_number> -a <verse_number> > output.txt
|
data/lib/wahy/version.rb
CHANGED