Skip to main content

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/SDCARD or E:\.

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/SDCARD or D:\.

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/SDCARD or D:\.
  • --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/SDCARD or D:\.
  • <repository_path>: The path to the repository. For example, /home/user/music or C:\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

dfplayer-card-manager-0.2.1.tar.gz (28.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dfplayer_card_manager-0.2.1-py3-none-any.whl (40.8 kB view details)

Uploaded Python 3

File details

Details for the file dfplayer-card-manager-0.2.1.tar.gz.

File metadata

  • Download URL: dfplayer-card-manager-0.2.1.tar.gz
  • Upload date:
  • Size: 28.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for dfplayer-card-manager-0.2.1.tar.gz
Algorithm Hash digest
SHA256 8571af20b48b01c8475b60603160f98bb1cbbf49745d99343686184c181e03c2
MD5 9806ac5f96b30b8167a71bdfe8b18ad7
BLAKE2b-256 9533a30bbbd8e6b324f23ce34bef060b20f71a140c420dbc805bc7e127cff160

See more details on using hashes here.

Provenance

The following attestation bundles were made for dfplayer-card-manager-0.2.1.tar.gz:

Publisher: release_publishing.yml on stevenengland/dfplayer_card_manager

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dfplayer_card_manager-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for dfplayer_card_manager-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4655f28cf239cbafa40d22e62f570b7b52b6c40046abf2a7dc7f77279de14828
MD5 7632cbfdd2c5615ea0eaca09bf8988ca
BLAKE2b-256 9ccd2a006ab4ba804e5d479d78c97890902c7a8ffc37b3367fdde2da2a331658

See more details on using hashes here.

Provenance

The following attestation bundles were made for dfplayer_card_manager-0.2.1-py3-none-any.whl:

Publisher: release_publishing.yml on stevenengland/dfplayer_card_manager

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page