ayatulkursi 1.0.0__tar.gz

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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Ayatul Kursi Project Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,4 @@
1
+ include README.md
2
+ include LICENSE
3
+ include requirements.txt
4
+ recursive-include ayatulkursi/assets *
@@ -0,0 +1,463 @@
1
+ Metadata-Version: 2.4
2
+ Name: ayatulkursi
3
+ Version: 1.0.0
4
+ Summary: Production-ready Python CLI application for playing Ayatul Kursi audio in the background
5
+ Author-email: Your Name <your.email@example.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/yourusername/ayatulkursi
8
+ Project-URL: Documentation, https://github.com/yourusername/ayatulkursi#readme
9
+ Project-URL: Repository, https://github.com/yourusername/ayatulkursi.git
10
+ Project-URL: Issues, https://github.com/yourusername/ayatulkursi/issues
11
+ Keywords: ayatul-kursi,audio,player,cli,background
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: End Users/Desktop
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Natural Language :: English
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Multimedia :: Sound/Audio
23
+ Classifier: Topic :: Utilities
24
+ Requires-Python: >=3.10
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: pygame>=2.1.0
28
+ Requires-Dist: click>=8.1.0
29
+ Provides-Extra: dev
30
+ Requires-Dist: pytest>=7.0; extra == "dev"
31
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
32
+ Requires-Dist: black>=23.0; extra == "dev"
33
+ Requires-Dist: flake8>=6.0; extra == "dev"
34
+ Requires-Dist: mypy>=1.0; extra == "dev"
35
+ Requires-Dist: isort>=5.12; extra == "dev"
36
+ Dynamic: license-file
37
+
38
+ # Ayatul Kursi Background Player CLI
39
+
40
+ A production-ready Python CLI application that continuously plays Ayatul Kursi audio in the background with various playback modes and options.
41
+
42
+ ---
43
+
44
+ ## Features
45
+
46
+ - **🎵 Infinite Loop Playback**: Play Ayatul Kursi continuously forever
47
+ - **⏱️ Timed Playback**: Specify duration in minutes or hours
48
+ - **🤫 Whisper Mode**: Low-volume mode (10%) for background recitation
49
+ - **🔊 Volume Control**: Customize volume from 0.0 to 1.0
50
+ - **🖥️ Background Playback**: Runs in the background without blocking the terminal
51
+ - **🔄 Smooth Transitions**: Seamless looping between audio repetitions
52
+ - **🛑 Graceful Shutdown**: Clean exit with Ctrl+C
53
+ - **🌍 Cross-Platform**: Works on Windows, Linux, and macOS
54
+ - **📝 Detailed Logging**: Optional debug logging for troubleshooting
55
+ - **🎨 User-Friendly Output**: Clear messages and status information
56
+
57
+ ---
58
+
59
+ ## 📋 Requirements
60
+
61
+ - Python 3.10 or higher
62
+ - pygame (for audio playback)
63
+ - click (for CLI interface)
64
+
65
+ ---
66
+
67
+ ## 🚀 Installation
68
+
69
+ ### Method 1: Install from PyPI (Recommended - Coming Soon)
70
+
71
+ ```bash
72
+ pip install ayatulkursi
73
+ ```
74
+
75
+ ### Method 2: Install from Source
76
+
77
+ 1. Clone the repository:
78
+ ```bash
79
+ git clone https://github.com/yourusername/ayatulkursi.git
80
+ cd ayatulkursi
81
+ ```
82
+
83
+ 2. Install the package in development mode:
84
+ ```bash
85
+ pip install -r requirements.txt
86
+ pip install -e .
87
+ ```
88
+
89
+ 3. Verify installation:
90
+ ```bash
91
+ ayatulkursi --help
92
+ ```
93
+
94
+ ### Method 3: Local Setup
95
+
96
+ 1. Navigate to the project directory
97
+ 2. Install dependencies:
98
+ ```bash
99
+ pip install -r requirements.txt
100
+ ```
101
+
102
+ 3. Create symbolic link or alias for easy access:
103
+ ```bash
104
+ # On Windows
105
+ python -m ayatulkursi.cli --help
106
+
107
+ # Or add to PATH and run directly
108
+ ayatulkursi --help
109
+ ```
110
+
111
+ ---
112
+
113
+ ## 📖 Usage
114
+
115
+ ### Basic Usage
116
+
117
+ #### Infinite Playback (Default)
118
+ Play Ayatul Kursi continuously forever:
119
+ ```bash
120
+ ayatulkursi
121
+ ```
122
+
123
+ **Output:**
124
+ ```
125
+ ============================================================
126
+ 🎵 Ayatul Kursi - Background Audio Player
127
+ ============================================================
128
+
129
+ 📋 Mode: Normal Mode - Volume: 70% - Duration: Infinite
130
+ 🎵 Audio: /path/to/audio/ayatul-kursi-saad-al-ghamdi.mp3
131
+
132
+ 💡 Press Ctrl+C to stop playback
133
+
134
+ ✓ Playback started in background
135
+ ```
136
+
137
+ ---
138
+
139
+ #### Timed Playback
140
+
141
+ **Play for 30 minutes:**
142
+ ```bash
143
+ ayatulkursi --minutes 30
144
+ ```
145
+
146
+ **Play for 2 hours:**
147
+ ```bash
148
+ ayatulkursi --hours 2
149
+ ```
150
+
151
+ **Play for 1 hour and 30 minutes:**
152
+ ```bash
153
+ ayatulkursi --hours 1 --minutes 30
154
+ ```
155
+
156
+ **Output:**
157
+ ```
158
+ ============================================================
159
+ 🎵 Ayatul Kursi - Background Audio Player
160
+ ============================================================
161
+
162
+ 📋 Mode: Normal Mode - Volume: 70% - Duration: 30m
163
+ 🎵 Audio: /path/to/audio/ayatul-kursi-saad-al-ghamdi.mp3
164
+
165
+ 💡 Press Ctrl+C to stop playback
166
+
167
+ ✓ Playback started in background
168
+ ```
169
+
170
+ ---
171
+
172
+ ### Advanced Options
173
+
174
+ #### Whisper Mode
175
+ Low-volume mode perfect for continuous background recitation:
176
+
177
+ ```bash
178
+ # Infinite whisper mode
179
+ ayatulkursi --whisper
180
+
181
+ # Whisper mode for 8 hours
182
+ ayatulkursi --whisper --hours 8
183
+
184
+ # Whisper mode for 2 hours
185
+ ayatulkursi --whisper --hours 2
186
+ ```
187
+
188
+ **Output:**
189
+ ```
190
+ ============================================================
191
+ 🎵 Ayatul Kursi - Background Audio Player
192
+ ============================================================
193
+
194
+ 📋 Mode: Whisper Mode - Volume: 10% - Duration: 8h 0m
195
+ 🎵 Audio: /path/to/audio/ayatul-kursi-saad-al-ghamdi.mp3
196
+
197
+ 💡 Press Ctrl+C to stop playback
198
+
199
+ 🤫 Whisper mode activated - playing at low volume
200
+ ✓ Playback started in background
201
+ ```
202
+
203
+ ---
204
+
205
+ #### Custom Volume
206
+
207
+ Set volume between 0.0 (silent) and 1.0 (maximum):
208
+
209
+ ```bash
210
+ # Very low volume (30%)
211
+ ayatulkursi --volume 0.3
212
+
213
+ # Medium volume (50%)
214
+ ayatulkursi --volume 0.5
215
+
216
+ # High volume (90%)
217
+ ayatulkursi --volume 0.9
218
+
219
+ # With duration
220
+ ayatulkursi --volume 0.4 --hours 2
221
+ ```
222
+
223
+ **Output:**
224
+ ```
225
+ ============================================================
226
+ 🎵 Ayatul Kursi - Background Audio Player
227
+ ============================================================
228
+
229
+ 📋 Mode: Normal Mode - Volume: 30% - Duration: Infinite
230
+ 🎵 Audio: /path/to/audio/ayatul-kursi-saad-al-ghamdi.mp3
231
+
232
+ 💡 Press Ctrl+C to stop playback
233
+
234
+ ✓ Playback started in background
235
+ ```
236
+
237
+ ---
238
+
239
+ #### Custom Audio File
240
+
241
+ Use a different audio file:
242
+ ```bash
243
+ ayatulkursi --audio-file /path/to/custom/audio.mp3
244
+ ```
245
+
246
+ ---
247
+
248
+ #### Debug Mode
249
+
250
+ Enable detailed logging for troubleshooting:
251
+ ```bash
252
+ ayatulkursi --debug
253
+ ```
254
+
255
+ ---
256
+
257
+ ### Command-Line Options
258
+
259
+ ```
260
+ Options:
261
+ --minutes INTEGER Play for specified number of minutes
262
+ --hours INTEGER Play for specified number of hours
263
+ --whisper Enable whisper mode (volume 10%)
264
+ --volume FLOAT Set volume level (0.0-1.0), default is 0.7
265
+ --audio-file TEXT Path to audio file (uses default if not provided)
266
+ --debug Enable debug logging
267
+ --help Show this message and exit
268
+ ```
269
+
270
+ ---
271
+
272
+ ## 🎯 Use Cases
273
+
274
+ ### 1. Daily Recitation Routine
275
+ ```bash
276
+ # Play for 15 minutes in the morning
277
+ ayatulkursi --minutes 15
278
+ ```
279
+
280
+ ### 2. All-Day Background Recitation
281
+ ```bash
282
+ # Play continuously with whisper mode
283
+ ayatulkursi --whisper
284
+ ```
285
+
286
+ ### 3. Work/Study Sessions
287
+ ```bash
288
+ # Play quietly during work
289
+ ayatulkursi --volume 0.3 --whisper --hours 8
290
+ ```
291
+
292
+ ### 4. Night-Time Listening
293
+ ```bash
294
+ # Low volume for 6 hours before sleep
295
+ ayatulkursi --whisper --hours 6
296
+ ```
297
+
298
+ ### 5. Prayer Time Sessions
299
+ ```bash
300
+ # Dedicated recitation for 1 hour
301
+ ayatulkursi --hours 1 --volume 0.8
302
+ ```
303
+
304
+ ---
305
+
306
+ ## 🤫 Understanding Whisper Mode
307
+
308
+ Whisper Mode is a special feature designed for continuous, non-intrusive playback:
309
+
310
+ - **Volume**: Automatically set to 10% (very low)
311
+ - **Duration**: Can be infinite or limited (use `--hours` and `--minutes`)
312
+ - **Purpose**: Background recitation while working, studying, or relaxing
313
+ - **Example**: `ayatulkursi --whisper --hours 8`
314
+
315
+ ### Why Use Whisper Mode?
316
+
317
+ - ✅ Minimizes distraction while maintaining presence
318
+ - ✅ Ideal for work/study environments
319
+ - ✅ Comfortable for extended listening
320
+ - ✅ Respectful volume for shared spaces
321
+
322
+ ---
323
+
324
+ ## 🔧 Troubleshooting
325
+
326
+ ### Issue: "Audio file not found"
327
+ **Solution**: Ensure the audio file `ayatul-kursi-saad-al-ghamdi.mp3` is located in the `assets/` directory relative to the installation.
328
+
329
+ ```bash
330
+ # Check audio file location
331
+ ls ayatulkursi/assets/
332
+ # Should show: ayatul-kursi-saad-al-ghamdi.mp3
333
+ ```
334
+
335
+ ### Issue: "pygame not found" or "ModuleNotFoundError"
336
+ **Solution**: Install required dependencies:
337
+ ```bash
338
+ pip install -r requirements.txt
339
+ ```
340
+
341
+ ### Issue: Audio cuts off or has crackling
342
+ **Solution**:
343
+ - Try adjusting volume: `--volume 0.6`
344
+ - Check system audio settings
345
+ - Ensure no other applications are using audio
346
+ - Update pygame: `pip install --upgrade pygame`
347
+
348
+ ### Issue: Command not found after installation
349
+ **Solution**:
350
+ - Reinstall the package: `pip install -e .`
351
+ - Or run with Python module: `python -m ayatulkursi.cli`
352
+ - Ensure `~/.local/bin` is in your PATH (Linux/macOS)
353
+
354
+ ### Issue: Graceful shutdown not working
355
+ **Solution**:
356
+ - Press Ctrl+C (may need to press twice)
357
+ - On Windows, you can also close the terminal window
358
+ - Check if debug mode provides more information: `--debug`
359
+
360
+ ### Getting Help
361
+ Enable debug mode to see detailed logs:
362
+ ```bash
363
+ ayatulkursi --debug
364
+ ```
365
+
366
+ ---
367
+
368
+ ## 📦 Project Structure
369
+
370
+ ```
371
+ ayatulkursi/
372
+ ├── ayatulkursi/
373
+ │ ├── __init__.py # Package initialization
374
+ │ ├── cli.py # Command-line interface
375
+ │ ├── player.py # Audio player logic
376
+ │ └── config.py # Configuration management
377
+ ├── assets/
378
+ │ └── ayatul-kursi-saad-al-ghamdi.mp3 # Audio file
379
+ ├── README.md # This file
380
+ ├── requirements.txt # Python dependencies
381
+ ├── pyproject.toml # Project configuration
382
+ └── LICENSE # MIT License
383
+ ```
384
+
385
+ ---
386
+
387
+ ## 🛠️ Development
388
+
389
+ ### Setting up Development Environment
390
+
391
+ 1. Clone the repository:
392
+ ```bash
393
+ git clone https://github.com/yourusername/ayatulkursi.git
394
+ cd ayatulkursi
395
+ ```
396
+
397
+ 2. Install in development mode with dev dependencies:
398
+ ```bash
399
+ pip install -r requirements.txt
400
+ pip install -e ".[dev]"
401
+ ```
402
+
403
+ 3. Run tests:
404
+ ```bash
405
+ pytest
406
+ ```
407
+
408
+ 4. Run linting:
409
+ ```bash
410
+ black ayatulkursi/
411
+ flake8 ayatulkursi/
412
+ mypy ayatulkursi/
413
+ isort ayatulkursi/
414
+ ```
415
+
416
+ ### Code Style
417
+ - Uses Black for code formatting
418
+ - PEP 8 compliant
419
+ - Type hints throughout
420
+ - Comprehensive docstrings
421
+
422
+ ---
423
+
424
+ ## 📝 License
425
+
426
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
427
+
428
+ ---
429
+
430
+ ## 🙏 Acknowledgments
431
+
432
+ - Built with [pygame](https://www.pygame.org/) for audio playback
433
+ - CLI powered by [click](https://click.palletsprojects.com/)
434
+ - Ayatul Kursi recitation by Saad Al-Ghamdi
435
+
436
+ ---
437
+
438
+ ## 📞 Support & Feedback
439
+
440
+ - 🐛 Report bugs: [GitHub Issues](https://github.com/nawaz0x1/ayatulkursi/issues)
441
+ - 💡 Suggest features: [GitHub Discussions](https://github.com/nawaz0x1/ayatulkursi/discussions)
442
+ - 📧 Contact: nawazhaider60@example.com
443
+
444
+ ---
445
+
446
+ ## 🎓 Learn More
447
+
448
+ ### What is Ayatul Kursi?
449
+
450
+ Ayatul Kursi (Verse of the Throne) is the 255th verse of Surah Al-Baqarah (Chapter 2) in the Quran. It is considered one of the most powerful and important verses in Islam.
451
+
452
+ This application allows you to continuously listen to beautiful recitations of this verse in the background.
453
+
454
+ ### Recommended Listening Times
455
+
456
+ - **Morning**: 10-15 minutes after Fajr prayer
457
+ - **Throughout the day**: Use whisper mode while working
458
+ - **Before sleep**: 1-2 hours in whisper mode
459
+ - **During stress**: 30+ minutes at any comfortable volume
460
+
461
+ ---
462
+
463
+ **Made with ❤️ for spiritual wellness**