diff --git a/.gitignore b/.gitignore index bdd352b..b7655b2 100644 --- a/.gitignore +++ b/.gitignore @@ -74,6 +74,7 @@ docs/_build/ #extra .cache +private/ #shell-script ./run_ui.sh \ No newline at end of file diff --git a/License b/License new file mode 100644 index 0000000..6ae4a90 --- /dev/null +++ b/License @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) [2025] [Rupam Golui] + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index d7aa2fc..b8cc294 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,112 @@ -# ethos +**

Ethos

** -cli music player (Coming Soon) +

+ Logo of Ethos +

-## Repository Structure +
+ +[![Python Version](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/) +[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE) +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Itz-Agasta/ethos/pulls) +[![Code Coverage](https://img.shields.io/codecov/c/github/Itz-Agasta/ethos)](https://codecov.io/gh/Itz-Agasta/ethos) +[![Downloads](https://img.shields.io/pypi/dm/ethos)](https://pypi.org/project/ethos/) +[![GitHub Issues](https://img.shields.io/github/issues/Itz-Agasta/ethos)](https://github.com/Itz-Agasta/ethos/issues) +[![GitHub Stars](https://img.shields.io/github/stars/Itz-Agasta/ethos)](https://github.com/Itz-Agasta/ethos/stargazers) +[![Last Commit](https://img.shields.io/github/last-commit/Itz-Agasta/ethos)](https://github.com/Itz-Agasta/ethos/commits/main) + +
+ +

+ A modern, resource-efficient CLI music player that seamlessly integrates local music libraries with online streaming services. Experience high-quality audio playback, Spotify playlist synchronization, and an intuitive terminal interface designed for both developers and music enthusiasts. +
+
+ View Demo + ยท + Report Bug + ยท + Request Feature + ยท + Send a Pull Request +

+

+ +## Table of Contents + +- [Table of Contents](#table-of-contents) +- [Features](#features) +- [Preview](#preview) +- [Technologies Used](#technologies-used) +- [Prerequisites](#prerequisites) +- [Quick Start](#quick-start) +- [Installation](#installation) + - [For Development:](#for-development) + - [For Distribution:](#for-distribution) +- [Usage:](#usage) + - [Basic Commands](#basic-commands) + - [Queue Management](#queue-management) + - [Keyboard Shortcuts](#keyboard-shortcuts) + - [Basic Workflow](#basic-workflow) +- [Troubleshooting](#troubleshooting) + - [Common Issues](#common-issues) +- [Repository Structure](#repository-structure) +- [Contributors](#contributors) +- [License](#license) + +## Features + +๐ŸŽต **Universal Accessibility** + +- High-quality terminal music playback accessible to both developers and general users +- Modern and feature-rich interface in your terminal +- Support for multiple audio formats (MP3, FLAC, WAV, AAC) + +๐Ÿ’ป **Resource Efficient** + +- Lightweight application with minimal system resource consumption +- Can be used in devices like Raspberry Pi +- Optimized for lower-end devices without compromising functionality + +๐Ÿ”„ **Unified Music Experience** + +- Seamlessly bridges local music libraries with online streaming services +- All your music needs handled from a single terminal interface +- Import and sync your Spotify playlists +- Offline playback for downloaded tracks + +โšก **Developer-Centric** + +- Terminal-native music solution that integrates with your development workflow +- Enhances productivity by keeping you in your preferred environment + +## Preview + +

+ Logo of Ethos +

+ +## Technologies Used + +- **Backend:** yt-dlp, python-vlc, spotify API, spotipy +- **Frontend:** Rich, Textual +- **Language:** Python + +## Prerequisites + +Make sure you have the following installed: + +- Python 3.8 or later +- pip (Python package installer) +- VLC media player + +## Quick Start ```bash -ethos/ -โ”œโ”€โ”€ .editorconfig -โ”œโ”€โ”€ .gitignore -โ”œโ”€โ”€ .github/ -โ”‚ โ”œโ”€โ”€ ISSUE_TEMPLATE/ -โ”‚ โ””โ”€โ”€ workflows/ -โ”œโ”€โ”€ docker/ -โ”‚ โ”œโ”€โ”€ dockerfile -โ”‚ โ”œโ”€โ”€ compose.yaml -โ”‚ โ””โ”€โ”€ readme.md -โ”œโ”€โ”€ ethos/ -โ”‚ โ”œโ”€โ”€ __init__.py -โ”‚ โ”œโ”€โ”€ main.py # entry point of the application. -โ”‚ โ”œโ”€โ”€ config.py # Manages configuration settings. -โ”‚ โ”œโ”€โ”€ player.py # Handles the core functionality of the music player. -โ”‚ โ”œโ”€โ”€ ui/ # Manages the tui interface. -โ”‚ โ”œโ”€โ”€ utils.py # Contains utility functions and other helper functions. -โ”‚ โ””โ”€โ”€ hotkeys.py # Defines hotkeys for controlling the music player. -โ”œโ”€โ”€ tests/ -โ”‚ โ”œโ”€โ”€ __init__.py -โ”‚ โ”œโ”€โ”€ test_cli.py -โ”‚ โ”œโ”€โ”€ test_config.py -โ”‚ โ”œโ”€โ”€ test_player.py -โ”‚ โ”œโ”€โ”€ test_ui.py -โ”‚ โ””โ”€โ”€ test_utils.py -โ”œโ”€โ”€ LICENSE -โ”œโ”€โ”€ README.md -โ”œโ”€โ”€ setup.py # Contains the setup script -โ””โ”€โ”€ requirements.txt +# Install Ethos +pip install ethos + +# Start playing music +ethos ``` ## Installation @@ -68,3 +141,116 @@ ethos/ ### For Distribution: Coming Soon + +## Usage: + +[![Watch the video](src/img/ethos_ui.jpg)](https://www.youtube.com/watch?v=E1AjSHxe5NU&feature=youtu.be) + +### Basic Commands + +```bash +/play # Search and play a track +/pause # Pause current playback +/resume # Resume playback +/volume <0-100> # Set volume level +``` + +### Queue Management + +```bash +/queue-add # Add a track to queue +/show-queue # Display current queue +/qp # Play track number from queue +``` + +### Keyboard Shortcuts + +| Shortcut | Action | +| -------------------- | ---------------- | +| `Ctrl+C` or `Ctrl+Q` | Quit application | +| `Ctrl+M` | Pause playback | +| `Ctrl+R` | Resume playback | +| `Ctrl+1` | Increase volume | +| `Ctrl+2` | Decrease volume | + +### Basic Workflow + +1. Search for a track: + + ```bash + /play never gonna give you up + ``` + +2. Select from search results by entering the track number (e.g. 1) + +3. Control playback: + +- Use `/pause` and `/resume` to control playback +- Adjust volume with `/volume 75` +- View all commands with `/help` + +## Troubleshooting + +### Common Issues + +| Issue | Solution | +| ------------------------- | ------------------------------------------------- | +| No audio output | Check system volume and VLC installation | +| Spotify integration fails | Verify `.env` configuration | +| Installation errors | Update pip: `python -m pip install --upgrade pip` | + +## Repository Structure + +```bash +ethos/ +โ”œโ”€โ”€ .env.example +โ”œโ”€โ”€ .gitignore +โ”œโ”€โ”€ .github/ +โ”‚ โ”œโ”€โ”€ ISSUE_TEMPLATE/ +โ”‚ โ””โ”€โ”€ workflows/ +โ”œโ”€โ”€ docker/ +โ”‚ โ”œโ”€โ”€ dockerfile +โ”‚ โ”œโ”€โ”€ compose.yaml +โ”‚ โ””โ”€โ”€ readme.md +โ”œโ”€โ”€ ethos/ +โ”‚ โ”œโ”€โ”€ __init__.py +โ”‚ โ”œโ”€โ”€ main.py # entry point of the application. +โ”‚ โ”œโ”€โ”€ config.py # Manages configuration settings. +โ”‚ โ”œโ”€โ”€ player.py # Handles the core functionality of the music player. +โ”‚ โ”œโ”€โ”€ utils.py # Contains utility functions and other helper functions. +โ”‚ โ”œโ”€โ”€ spotify_importer.py # User's Spotify playlist integration +โ”œโ”€โ”€ โ”œโ”€โ”€ tools/ # Helper tools and utilities +โ”‚ โ”‚ โ”œโ”€โ”€ __init__.py +โ”‚ โ”‚ โ”œโ”€โ”€ endless_playback.py +โ”‚ โ”‚ โ””โ”€โ”€ helper.py +โ”‚ โ”œโ”€โ”€ ui/ # Terminal UI components +โ”‚ โ”‚ โ”œโ”€โ”€ __init__.py +โ”‚ โ”‚ โ”œโ”€โ”€ rich_layout.py +โ”‚ โ”‚ โ”œโ”€โ”€ styles.tcss +โ”‚ โ”‚ โ”œโ”€โ”€ textual_app.py +โ”‚ โ”‚ โ””โ”€โ”€ ui.py +โ”œโ”€โ”€ tests/ # Test suite +โ”‚ โ”œโ”€โ”€ __init__.py +โ”‚ โ”œโ”€โ”€ conftest.py +โ”‚ โ””โ”€โ”€ test_player/ +โ”‚ โ”œโ”€โ”€ __init__.py +โ”‚ โ””โ”€โ”€ test_playback.py +โ”œโ”€โ”€ LICENSE +โ”œโ”€โ”€ README.md +โ”œโ”€โ”€ pyproject.toml # Project configuration and dependencies +โ”œโ”€โ”€ pytest.ini # PyTest configuration +โ”œโ”€โ”€ setup.py # Contains the setup script +โ””โ”€โ”€ requirements.txt +``` + +## Contributors + + + + + +## License + +This project is licensed under the [MIT License](https://github.com/Itz-Agasta/ethos/blob/main/License). See the LICENSE file for more details. + +Feel free to Send a [Pull Request](https://github.com/Itz-Agasta/ethos/pulls) if you have improvements or fixes. diff --git a/src/img/ethos_logo.jpg b/src/img/ethos_logo.jpg new file mode 100644 index 0000000..94a9306 Binary files /dev/null and b/src/img/ethos_logo.jpg differ diff --git a/src/img/ethos_ui.jpg b/src/img/ethos_ui.jpg new file mode 100644 index 0000000..5e3e73f Binary files /dev/null and b/src/img/ethos_ui.jpg differ