dingdone 1.0.0__py3-none-any.whl
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.
- dingdone/__init__.py +1 -0
- dingdone/__main__.py +4 -0
- dingdone/default_sound.mp3 +0 -0
- dingdone/main.py +35 -0
- dingdone-1.0.0.dist-info/METADATA +50 -0
- dingdone-1.0.0.dist-info/RECORD +9 -0
- dingdone-1.0.0.dist-info/WHEEL +4 -0
- dingdone-1.0.0.dist-info/entry_points.txt +4 -0
- dingdone-1.0.0.dist-info/licenses/LICENSE +21 -0
dingdone/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.1"
|
dingdone/__main__.py
ADDED
|
Binary file
|
dingdone/main.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import subprocess
|
|
2
|
+
import argparse
|
|
3
|
+
import os
|
|
4
|
+
import threading
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def main():
|
|
9
|
+
arg = argparse.ArgumentParser(description="get a sound notification when your process is done,try `dingdone -h` for more information")
|
|
10
|
+
arg.add_argument("-p","--process",help="your command",required=True)
|
|
11
|
+
arg.add_argument("-s","--sound-address",default=os.path.join(os.path.dirname(__file__),"default_sound.mp3"),help="play your sound/music file, write the file address")
|
|
12
|
+
arg.add_argument("-l","--loop",action="store_true",help="when you use this flag ,the sound will not stop until you press Enter or any key")
|
|
13
|
+
args = arg.parse_args()
|
|
14
|
+
p = subprocess.Popen(args.process,shell=True,stderr=subprocess.STDOUT,stdout=subprocess.PIPE,text=True)
|
|
15
|
+
|
|
16
|
+
for i in p.stdout :
|
|
17
|
+
print(i,end='')
|
|
18
|
+
|
|
19
|
+
p.wait()
|
|
20
|
+
stop = False
|
|
21
|
+
import playsound as pl
|
|
22
|
+
if args.loop :
|
|
23
|
+
def key():
|
|
24
|
+
nonlocal stop
|
|
25
|
+
input()
|
|
26
|
+
stop = True
|
|
27
|
+
t = threading.Thread(target=key)
|
|
28
|
+
t.daemon = True
|
|
29
|
+
t.start()
|
|
30
|
+
while not stop:
|
|
31
|
+
pl.playsound(args.sound_address)
|
|
32
|
+
else :
|
|
33
|
+
pl.playsound(args.sound_address)
|
|
34
|
+
if __name__ == "__main__":
|
|
35
|
+
main()
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dingdone
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Get a sound notification when your long command finishes
|
|
5
|
+
Project-URL: Homepage, https://github.com/ar7sha/dingdone
|
|
6
|
+
Project-URL: Bug Reports, https://github.com/ar7sha/dingdone/issues
|
|
7
|
+
Author-email: arsha <ar7sh11@proton.me>
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Python: >=3
|
|
10
|
+
Requires-Dist: playsound==1.2.2
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
|
|
13
|
+
# Dingdone
|
|
14
|
+
|
|
15
|
+
Get a sound notification when your long-running task finishes.
|
|
16
|
+
|
|
17
|
+
Dingdone is a lightweight Python CLI tool that plays a sound when a command completes.
|
|
18
|
+
You can use a custom sound or the default beep.loop stops after current playback finishes
|
|
19
|
+
|
|
20
|
+
## Features
|
|
21
|
+
- Run any command and get sound when it's done
|
|
22
|
+
- Use custom sound files
|
|
23
|
+
- Optional looping until user stops it
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
`dingdone -p "sleep 3" -s "music.mp3"`
|
|
27
|
+
|
|
28
|
+
Plays music.mp3 after the command finishes.
|
|
29
|
+
|
|
30
|
+
`dingdone -p "sleep 2" -s "music.mp3" -l`
|
|
31
|
+
|
|
32
|
+
Plays the sound in a loop until you press Enter.
|
|
33
|
+
|
|
34
|
+
`dingdone -p "sleep 1"`
|
|
35
|
+
|
|
36
|
+
Uses the default beep sound.
|
|
37
|
+
|
|
38
|
+
## CLI
|
|
39
|
+
You can run it using:
|
|
40
|
+
- `dingdone`
|
|
41
|
+
- `ddone`
|
|
42
|
+
- `ding`(my favorite)
|
|
43
|
+
- `python -m dingdone`
|
|
44
|
+
|
|
45
|
+
## Help
|
|
46
|
+
If anything is unclear, feel free to ask or run:
|
|
47
|
+
|
|
48
|
+
`dingdone -h`
|
|
49
|
+
|
|
50
|
+
I’m open to feedback, ideas, and questions 🙂
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
dingdone/__init__.py,sha256=ry5O5SW74ugwOUMKSV2_LbWjYa8B0IEvUm7S-lHPA2c,23
|
|
2
|
+
dingdone/__main__.py,sha256=qxegHigY-epM4DzvyKFP1nesN4vzlD-XS987l7M71Dc,74
|
|
3
|
+
dingdone/default_sound.mp3,sha256=LJl56YX-kPr_XLQbYjdB_gKzb0KvmwxQK68K0IRmq5I,165120
|
|
4
|
+
dingdone/main.py,sha256=k6n_mj9rEeXMtxtGuX32F_ixHwa-cECHI352LszhI_M,1232
|
|
5
|
+
dingdone-1.0.0.dist-info/METADATA,sha256=-6V0VJQFhIBG41IH6aZ03MpdmF1O80fNcVxzSBN3_1o,1241
|
|
6
|
+
dingdone-1.0.0.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
|
|
7
|
+
dingdone-1.0.0.dist-info/entry_points.txt,sha256=hQXsgfPpdm1VYszxagBPaSumpmdlXgX0YzBudHtyIvo,101
|
|
8
|
+
dingdone-1.0.0.dist-info/licenses/LICENSE,sha256=ndX5niBF6e2w5Nz3jGImwVnLyMmBg7rMaQ-SgNwDUF4,1083
|
|
9
|
+
dingdone-1.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 arsha
|
|
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.
|