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).
Metadata
Release files for dfplayer-card-manager 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dfplayer-card-manager-0.2.1.tar.gz | 28.0 kB | With provenance | Details for dfplayer-card-manager-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dfplayer_card_manager-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for dfplayer_card_manager-0.2.1-py3-none-any.whl |
Total release size: 68.8 kB
Release files / dfplayer-card-manager-0.2.1.tar.gz
| Download URL | dfplayer-card-manager-0.2.1.tar.gz |
|---|---|
| Size | 28.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8571af20b48b01c8475b60603160f98bb1cbbf49745d99343686184c181e03c2
|
|
BLAKE2b-256 checksum How to use checksums |
9533a30bbbd8e6b324f23ce34bef060b20f71a140c420dbc805bc7e127cff160
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 5, 2025.
Transparency logRelease files / dfplayer_card_manager-0.2.1-py3-none-any.whl
| Download URL | dfplayer_card_manager-0.2.1-py3-none-any.whl |
|---|---|
| Size | 40.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4655f28cf239cbafa40d22e62f570b7b52b6c40046abf2a7dc7f77279de14828
|
|
BLAKE2b-256 checksum How to use checksums |
9ccd2a006ab4ba804e5d479d78c97890902c7a8ffc37b3367fdde2da2a331658
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 5, 2025.
Transparency logSecurity for dfplayer-card-manager 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for dfplayer-card-manager-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 5, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.