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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +35 -1
  3. data/lib/wahy/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 665ed20de1fda09d4a4e86b984f0da8b7f17447383ab0e8d57624b8326912513
4
- data.tar.gz: d3cb429e690f296c81a746c4616eed472947f872d6f0def1ca05eaf9f04b7994
3
+ metadata.gz: a464603f9dc3bd456c8e2abb036f8960180022f4780b55456d08bc902d509cc2
4
+ data.tar.gz: dc613b0c8d233033c7a4c99e16d9a1834975d74fe85c9e7118bfd1f5edaf6c57
5
5
  SHA512:
6
- metadata.gz: a732cc0e89bd2a228d62a778740e1afdacec092ebf84d9da74ddb226a093408d48118b61ee33487a683c1a351d1eeea5140fb044775483ed10cbf80d6bbd4264
7
- data.tar.gz: e683adf860b008fcfda72740adf5a227303bbdc272f75c17840df171be63d4d188a79e697fef969104540c754a766489125a652cf2f5b5fe6b6b81b8709501f6
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
- Save output to a file:
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wahy
4
- VERSION = "2.0.6"
4
+ VERSION = "2.0.7"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wahy
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - cptangry