BasicToolsT 0.0.1__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.
- basictoolst-0.0.1/LICENSE +21 -0
- basictoolst-0.0.1/PKG-INFO +26 -0
- basictoolst-0.0.1/README.md +10 -0
- basictoolst-0.0.1/__init__.py +1 -0
- basictoolst-0.0.1/basictools.py +18 -0
- basictoolst-0.0.1/pyproject.toml +28 -0
- basictoolst-0.0.1/requirements.txt +2 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ghoul
|
|
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,26 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: BasicToolsT
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: A small example package
|
|
5
|
+
Project-URL: Homepage, https://github.com/CursedGhoul/BasicToolsT
|
|
6
|
+
Project-URL: Issues, https://github.com/CursedGhoul/BasicToolsT/issues
|
|
7
|
+
Author-email: CursedGhoul <noemail@email.com>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Requires-Python: >=3.9
|
|
13
|
+
Requires-Dist: sounddevice
|
|
14
|
+
Requires-Dist: soundfile
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
testing packages
|
|
18
|
+
|
|
19
|
+
## How To Use
|
|
20
|
+
|
|
21
|
+
1. Place your file and basictools.py in the same folder
|
|
22
|
+
2. import from the basictools.py file
|
|
23
|
+
|
|
24
|
+
ex: from basictools.py import title2
|
|
25
|
+
|
|
26
|
+
if you use pyinstaller to bundle your scripts just pyinstaller your main file and pyinstaller automatically handles dependencies
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
testing packages
|
|
2
|
+
|
|
3
|
+
## How To Use
|
|
4
|
+
|
|
5
|
+
1. Place your file and basictools.py in the same folder
|
|
6
|
+
2. import from the basictools.py file
|
|
7
|
+
|
|
8
|
+
ex: from basictools.py import title2
|
|
9
|
+
|
|
10
|
+
if you use pyinstaller to bundle your scripts just pyinstaller your main file and pyinstaller automatically handles dependencies
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import sounddevice as sd
|
|
2
|
+
import soundfile as sf
|
|
3
|
+
|
|
4
|
+
def title2(text):
|
|
5
|
+
"""Returns a superior title case from default title()"""
|
|
6
|
+
return ' '.join(word.capitalize() for word in text.split(' '))
|
|
7
|
+
|
|
8
|
+
def play_sound(path, stop_terminal=False,debug_statements=False):
|
|
9
|
+
data, fs = sf.read(path, dtype="float32")
|
|
10
|
+
if debug_statements == True:
|
|
11
|
+
print(f"playing {path}")
|
|
12
|
+
sd.play(data, fs)
|
|
13
|
+
if stop_terminal == True:
|
|
14
|
+
if input("Press ENTER to stop the sound: \n") == (""):
|
|
15
|
+
sd.stop()
|
|
16
|
+
sd.wait()
|
|
17
|
+
if debug_statements == True:
|
|
18
|
+
print("playing finished")
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "BasicToolsT"
|
|
3
|
+
version = "0.0.1"
|
|
4
|
+
authors = [
|
|
5
|
+
{ name="CursedGhoul", email="noemail@email.com" },
|
|
6
|
+
]
|
|
7
|
+
description = "A small example package"
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
requires-python = ">=3.9"
|
|
10
|
+
classifiers = [
|
|
11
|
+
"Programming Language :: Python :: 3",
|
|
12
|
+
"Operating System :: OS Independent",
|
|
13
|
+
]
|
|
14
|
+
license = "MIT"
|
|
15
|
+
license-files = ["LICEN[CS]E*"]
|
|
16
|
+
dependencies = ["soundfile",
|
|
17
|
+
"sounddevice"]
|
|
18
|
+
|
|
19
|
+
[build-system]
|
|
20
|
+
requires = ["hatchling"]
|
|
21
|
+
build-backend = "hatchling.build"
|
|
22
|
+
|
|
23
|
+
[tool.hatch.build.targets.wheel]
|
|
24
|
+
packages = ["main"]
|
|
25
|
+
|
|
26
|
+
[project.urls]
|
|
27
|
+
Homepage = "https://github.com/CursedGhoul/BasicToolsT"
|
|
28
|
+
Issues = "https://github.com/CursedGhoul/BasicToolsT/issues"
|