A package for managing SD cards that are meant to be used in DFROBOT DfPlayer Mini card readers.
Project description
DfPlayer (Mini) Card Manager
This package is intended to manage SD cards that are used in DFROBOTs DFPlayer SD card reader.
You may ask: Why not just copying my audio files to the SD card and instead use this package to do the job? Answer: The cards filesystem and file structure need to follow certain rules. Therefore this package offers
- several checks and cleanup methods to be conform with the rules
- configurable music repository to SD card syncing mechanisms
Features
- Perform file system checks (FAT type, allocation unit size, FAT sorting state)
- Delete undesireable files and folders from the SD card
- Apply FAT sorting to the SD card
- Sync audio files from a music repository (on any disk or filesystem) to the SD card
What is (currently) not covered?
- SD card formatting
- Audio types: WAV (-> only MP3 is supported)
Usage guide
The program can be run on Windows, Linux and Mac computers. All that is needed to use the DfPlayer Card Manager, is to have Python installed on your system. Then it is as easy as installing this package via pip:
pip install dfplayer-card-manager
General Usage Instruction
To run the DfPlayer Card Manager, use the following command structure:
Usage: dfplayer-card-manager [OPTIONS] COMMAND [ARGS]...
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --verbose -v INTEGER [default: 0] │
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or customize the installation. │
│ --help Show this message and exit. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ check │
│ sort │
│ clean │
│ sync │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Available Commands
Detailed Usage Instructions
check
The check command is intended to check the SD card for common errors and validate its structure. These checks are performed:
- Filesystem: Is the SD card FAT32 formatted?
- Filesystem: Is the allocation unit size correct (32 kbits expected)
- Filesystem: Is the FAT volume sorted?
- Structure: Do the root directory or the subdirectories contain any undesireable files and folders?
- Structure: Do the root directory or the subdirectory have any gaps in the numbered items available?
Usage:
dfplayer-card-manager check <sd_card_path>
Example:
dfplayer-card-manager check /media/SDCARD
Description:
<sd_card_path>: The path to the SD card. For example,/media/SDCARDorE:\.
sort
The sort command is intended to apply FAT sorting to the SD card to ensure files and folders are in the correct order.
Usage:
dfplayer-card-manager sort <sd_card_path>
Example:
dfplayer-card-manager sort /media/SDCARD
Description:
<sd_card_path>: The path to the SD card. For example,/media/SDCARDorD:\.
clean
The clean command is intended to remove unwanted entries from the SD card. It can be run in a dry run mode to preview changes.
Usage:
dfplayer-card-manager clean <sd_card_path> [--dry-run]
Example:
dfplayer-card-manager clean /media/SDCARD --dry-run
Description:
<sd_card_path>: The path to the SD card. For example,/media/SDCARDorD:\.--dry-run: Optional flag to preview the changes without actually removing any files.
sync
The sync command is intended to synchronize the content from a repository folder to SD card. It can be run in a dry run mode to preview changes. See CONFIG.md for more information on which folder and file structure for the music repository is expected by default and how you can change these settings.
Usage:
dfplayer-card-manager sync <sd_card_path> <repository_path> [--dry-run]
Example:
dfplayer-card-manager sync /media/SDCARD /home/user/music --dry-run
Description:
<sd_card_path>: The path to the SD card. For example,/media/SDCARDorD:\.<repository_path>: The path to the repository. For example,/home/user/musicorC:\Users\me\Music.--dry-run: Optional flag to preview the changes without actually synchronizing any files.
Projects that use DfPlayer Mini
- TonUINO -> A do it yourself musicbox (not only) for children (as a free alternative for Tonie boxes).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dfplayer-card-manager-0.1.1.tar.gz.
File metadata
- Download URL: dfplayer-card-manager-0.1.1.tar.gz
- Upload date:
- Size: 25.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
814aa60d2ab338fa4fffb4087464a7a450c610d82888f1128dc0ddcb9e6a6ae9
|
|
| MD5 |
61abfbe6fbfb7ddbea1668eae7f1747f
|
|
| BLAKE2b-256 |
7e1f47dacb0df6a4ed8030fd533d2d7e38c779073372c90c6fa533b15ec9527b
|
Provenance
The following attestation bundles were made for dfplayer-card-manager-0.1.1.tar.gz:
Publisher:
release_publishing.yml on stevenengland/dfplayer_card_manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dfplayer_card_manager-0.1.1.tar.gz -
Subject digest:
814aa60d2ab338fa4fffb4087464a7a450c610d82888f1128dc0ddcb9e6a6ae9 - Sigstore transparency entry: 161822973
- Sigstore integration time:
-
Permalink:
stevenengland/dfplayer_card_manager@d414751ede32cbc039d003b18b09e1f8aaf8e953 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/stevenengland
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release_publishing.yml@d414751ede32cbc039d003b18b09e1f8aaf8e953 -
Trigger Event:
push
-
Statement type:
File details
Details for the file dfplayer_card_manager-0.1.1-py3-none-any.whl.
File metadata
- Download URL: dfplayer_card_manager-0.1.1-py3-none-any.whl
- Upload date:
- Size: 36.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
741f7435ad9d4444441b3459852a6e319ab5a7dad256f802373ecbb81b80d627
|
|
| MD5 |
1fbf02d4c094e4724369d3f6bee30cf6
|
|
| BLAKE2b-256 |
972370a1d4c87d9fdd926814d5c18d6b2ffad6743b8b51588f0b3c3bd3f89cda
|
Provenance
The following attestation bundles were made for dfplayer_card_manager-0.1.1-py3-none-any.whl:
Publisher:
release_publishing.yml on stevenengland/dfplayer_card_manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dfplayer_card_manager-0.1.1-py3-none-any.whl -
Subject digest:
741f7435ad9d4444441b3459852a6e319ab5a7dad256f802373ecbb81b80d627 - Sigstore transparency entry: 161822975
- Sigstore integration time:
-
Permalink:
stevenengland/dfplayer_card_manager@d414751ede32cbc039d003b18b09e1f8aaf8e953 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/stevenengland
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release_publishing.yml@d414751ede32cbc039d003b18b09e1f8aaf8e953 -
Trigger Event:
push
-
Statement type: