-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
154 changed files
with
22,404 additions
and
202 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.vscode | ||
build | ||
__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Makefile | ||
|
||
.PHONY: build | ||
|
||
VERSION ?= v1.0.0 | ||
|
||
build: | ||
@echo "Building release version $(VERSION)..." | ||
rm -rf build app/__pycache__ | ||
mkdir -p build/App | ||
cp -r app build/App/Storii | ||
cd build && zip -r Storii-$(VERSION).zip App && cd .. | ||
rm -rf build/App | ||
@echo "Release build $(VERSION) done." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,99 @@ | ||
# storii | ||
# Storii | ||
|
||
## Presentation | ||
|
||
A children-friendly MP3 player for the Miyoo Mini (+). | ||
|
||
![storii](.github/docs/storii.gif) | ||
|
||
## Installation | ||
|
||
### Requirements | ||
|
||
You'll need to have [Onion OS](https://onionui.github.io/) installed on your SD Card. | ||
|
||
### Setup | ||
|
||
* Download the latest release of storii [here](https://github.com/pcorbel/storii/releases). | ||
* Extract the archive and copy the `App` directory to the root of your SD card. | ||
* Merge it if need be | ||
|
||
![install](.github/docs/install.gif) | ||
|
||
### Storiies | ||
|
||
* On your SD card, in the `/Media` directory, create a `Storiies` directory. | ||
* In `Storiies`, create a directory for each album you want to add. | ||
* In each album directory, add the tracks. | ||
* [Optional] You can add a cover image. The cover image must be named `cover.png`. | ||
|
||
```bash | ||
/Media/Storiies | ||
├── Album A | ||
│ ├── Track 1.mp3 | ||
│ ├── ... | ||
│ ├── Track 3.mp3 | ||
│ └── cover.png | ||
├── Album B | ||
│ ├── Track 1.mp3 | ||
│ ├── ... | ||
│ ├── Track 5.mp3 | ||
│ └── cover.png | ||
└── Album C | ||
│ ├── Track 1.mp3 | ||
│ ├── ... | ||
│ ├── Track 8.mp3 | ||
└── cover.png | ||
``` | ||
|
||
## Usage | ||
|
||
### Storiies menu | ||
|
||
![menu](.github/docs/menus/storiies.png) | ||
|
||
| Buttons | Action | | ||
|--------------|---------------------------| | ||
| `←/→` | Paginate through storiies | | ||
| `A` | Select current storii | | ||
|
||
### Chapters menu | ||
|
||
![menu](.github/docs/menus/chapters.png) | ||
|
||
| Buttons | Action | | ||
|--------------|---------------------------| | ||
| `←/→` | Paginate through chapters | | ||
| `A` | Select current chapter | | ||
| `B` | Go back to Storiies menu | | ||
|
||
### Player menu | ||
|
||
![menu](.github/docs/menus/player.png) | ||
|
||
| Buttons | Action | | ||
|--------------|----------------------------------| | ||
| `←/→` | Rewind / Fast-Forward 10 seconds | | ||
| `A` | Play / Pause | | ||
| `B` | Go back to Chapters menu | | ||
|
||
## Advanced | ||
|
||
### Konami Menu | ||
|
||
An hidden, parent-oriented, menu can be accessed by entering the Konami code: `↑ ↑ ↓ ↓ ← → ← → B A`. | ||
|
||
![konami menu](.github/docs/menus/konami.png) | ||
|
||
| Buttons | Action | | ||
|--------------|----------------------------------| | ||
| `↑/↓` | Navigate through menu options | | ||
| `←/→` | Adjust values for selected option| | ||
| `A` | Select current option | | ||
| `B` | Exit the Konami menu | | ||
|
||
#### Konami Menu Options | ||
|
||
1. **Set Timer**: Allows you to set a timer for how long the player will run. | ||
2. **Launch at Startup**: Toggle whether Storii should launch automatically when the Miyoo Mini (+) starts up. | ||
3. **Quit Storii**: Exits the Storii application and returns to the Onion OS menu. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"label": "Storii", | ||
"icon": "/mnt/SDCARD/Icons/Default/app/music.png", | ||
"launch": "launch.sh", | ||
"description": "A Storii Teller" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import os | ||
|
||
import pygame | ||
|
||
# Initialize Pygame and Mixer | ||
pygame.init() | ||
pygame.mixer.init() | ||
|
||
# Constants | ||
SCREEN_WIDTH = 640 | ||
SCREEN_HEIGHT = 480 | ||
FONT_SIZE = 30 | ||
CHEVRON_SIZE = (64, 64) | ||
COVER_SIZE = (256, 256) | ||
ICON_SIZE = (256, 256) | ||
PADDING = 20 | ||
PROGRESS_BAR_HEIGHT = 10 | ||
PROGRESS_BAR_PADDING = 40 | ||
PROGRESS_BAR_Y = SCREEN_HEIGHT - 50 | ||
APP_BAR_HEIGHT = 24 | ||
|
||
# Colors | ||
BLACK = pygame.Color(0, 0, 0) | ||
WHITE = pygame.Color(255, 255, 255) | ||
|
||
# Paths | ||
SCRIPT_PATH = os.path.abspath(__file__) | ||
SCRIPT_DIR = os.path.dirname(SCRIPT_PATH) | ||
FONT_PATH = os.path.join(SCRIPT_DIR, "res", "roboto-bold.ttf") | ||
CHEVRON_LEFT_PATH = os.path.join(SCRIPT_DIR, "res", "chevron-left.png") | ||
CHEVRON_RIGHT_PATH = os.path.join(SCRIPT_DIR, "res", "chevron-right.png") | ||
DEFAULT_IMG_PATH = os.path.join(SCRIPT_DIR, "res", "image.png") | ||
PLAY_ICON_PATH = os.path.join(SCRIPT_DIR, "res", "play.png") | ||
PAUSE_ICON_PATH = os.path.join(SCRIPT_DIR, "res", "pause.png") | ||
BATTERY_ICON_PATH = os.path.join(SCRIPT_DIR, "res", "battery.png") | ||
STORIIES_PATH = os.environ["STORIIES_PATH"] | ||
PWM_PATH = "/sys/devices/soc0/soc/1f003400.pwm/pwm/pwmchip0/pwm0/duty_cycle" | ||
BATTERY_PERC_PATH = "/tmp/percBat" | ||
STARTUP_PATH = "/mnt/SDCARD/.tmp_update/startup/launch-storii-startup.sh" | ||
|
||
# Konami Code | ||
KONAMI_CODE = [ | ||
pygame.K_UP, | ||
pygame.K_UP, | ||
pygame.K_DOWN, | ||
pygame.K_DOWN, | ||
pygame.K_LEFT, | ||
pygame.K_RIGHT, | ||
pygame.K_LEFT, | ||
pygame.K_RIGHT, | ||
pygame.K_LCTRL, | ||
pygame.K_SPACE, | ||
] |
Oops, something went wrong.