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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 665ed20de1fda09d4a4e86b984f0da8b7f17447383ab0e8d57624b8326912513
4
- data.tar.gz: d3cb429e690f296c81a746c4616eed472947f872d6f0def1ca05eaf9f04b7994
3
+ metadata.gz: cc9f6660bac40237411a61edd6fc80b2cd5cf90b887caee89ee6bbc2a1ad5504
4
+ data.tar.gz: d5ffad70c68baaefda4192d283aab1ecdfa9982dd865c7de91ecdfb73393e148
5
5
  SHA512:
6
- metadata.gz: a732cc0e89bd2a228d62a778740e1afdacec092ebf84d9da74ddb226a093408d48118b61ee33487a683c1a351d1eeea5140fb044775483ed10cbf80d6bbd4264
7
- data.tar.gz: e683adf860b008fcfda72740adf5a227303bbdc272f75c17840df171be63d4d188a79e697fef969104540c754a766489125a652cf2f5b5fe6b6b81b8709501f6
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
- 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
+ ### 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
@@ -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.8"
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.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - cptangry