diff --git a/.gitignore b/.gitignore index bee8a64..2e12554 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ -__pycache__ +__pycache__/ +build/ +dist/ +*.egg-info/ +*.pyc diff --git a/README.md b/README.md index 8291f70..11c6676 100644 --- a/README.md +++ b/README.md @@ -43,11 +43,17 @@ Clone the repository and install: ```bash -git clone https://git.vmn.su/max/audio_splitter.git -cd audio_splitter +git clone https://github.com/yourusername/audio-splitter.git +cd audio-splitter pip install . ``` +Now the `audio_splitter` command is available globally: + +```bash +audio_splitter input.mp3 tracks.txt +``` + Or run directly without installation: ```bash @@ -75,7 +81,10 @@ Create a `tracks.txt` file with one track per line: ### 2. Run the splitter ```bash +# If not installed python -m audio_splitter.main my_album.mp3 tracks.txt +# If installed +audio_splitter my_album.mp3 tracks.txt ``` Output: @@ -258,7 +267,7 @@ Contributions are welcome! Please follow these steps: 4. Push to the branch (`git push origin feature/amazing-feature`) 5. Open a Pull Request -For bug reports or feature requests, please [open an issue](https://git.vmn.su/max/audio_splitter/issues). +For bug reports or feature requests, please [open an issue](https://github.com/yourusername/audio-splitter/issues). --- @@ -278,6 +287,4 @@ Distributed under the GPU GPL v3 or later. See [LICENSE](LICENSE) for more infor ## 📬 Contact **Maintainer:** [Maxim Vershinin](https://git.vmn.su/max) -**Project Link:** [https://git.vmn.su/max/audio_splitter](https://git.vmn.su/max/audio_splitter) - - +**Project Link:** [https://git.vmn.su/max/audio-splitter](https://git.vmn.su/max/audio-splitter) diff --git a/__init__.py b/audio_splitter/__init__.py similarity index 100% rename from __init__.py rename to audio_splitter/__init__.py diff --git a/constants.py b/audio_splitter/constants.py similarity index 100% rename from constants.py rename to audio_splitter/constants.py diff --git a/core.py b/audio_splitter/core.py similarity index 100% rename from core.py rename to audio_splitter/core.py diff --git a/ffmpeg.py b/audio_splitter/ffmpeg.py similarity index 100% rename from ffmpeg.py rename to audio_splitter/ffmpeg.py diff --git a/filename.py b/audio_splitter/filename.py similarity index 100% rename from filename.py rename to audio_splitter/filename.py diff --git a/formats.py b/audio_splitter/formats.py similarity index 100% rename from formats.py rename to audio_splitter/formats.py diff --git a/main.py b/audio_splitter/main.py similarity index 100% rename from main.py rename to audio_splitter/main.py diff --git a/metadata.py b/audio_splitter/metadata.py similarity index 100% rename from metadata.py rename to audio_splitter/metadata.py diff --git a/timestamp.py b/audio_splitter/timestamp.py similarity index 100% rename from timestamp.py rename to audio_splitter/timestamp.py diff --git a/tracklist.py b/audio_splitter/tracklist.py similarity index 100% rename from tracklist.py rename to audio_splitter/tracklist.py diff --git a/utils.py b/audio_splitter/utils.py similarity index 100% rename from utils.py rename to audio_splitter/utils.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..638dd9c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..6f8a15b --- /dev/null +++ b/setup.py @@ -0,0 +1,34 @@ +from setuptools import setup, find_packages + +with open("README.md", "r", encoding="utf-8") as f: + long_description = f.read() + +setup( + name="audio_splitter", + version="0.1.0", + author="Maxim Vershinin", + author_email="im@vmn.su", + description="Split audio files using a flexible tracklist", + long_description=long_description, + long_description_content_type="text/markdown", + url="https://git.vmn.su/max/audio_splitter", + packages=find_packages(), + python_requires=">=3.8", + license="GNU General Public License v3 (GPLv3)", + classifiers=[ + "Development Status :: 4 - Beta", + "Intended Audience :: End Users/Desktop", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + ], + entry_points={ + "console_scripts": [ + "audio_splitter = audio_splitter.main:main", + ], + }, +)