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.1.3.tar.gz (25.4 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.1.3-py3-none-any.whl (37.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for dfplayer-card-manager-0.1.3.tar.gz
Algorithm Hash digest
SHA256 4c1aa0a0ffe7dc67a4d54ba0cd1a8a02df775d97cd9e294a77fbcc32bcca3b0a
MD5 9e018e4b7e8b66603b5bb818e802cce7
BLAKE2b-256 ea818d5172142cf7d0e654903e12069430a98c85b99e42b5720e89773b9953a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for dfplayer-card-manager-0.1.3.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.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for dfplayer_card_manager-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 328793535ef58d7c6bd1e87e7f65176b7c873d56c9e5f1ec78071b1f2a50fc32
MD5 7a77c48c481efd195c414c75ac452767
BLAKE2b-256 dcc05410e7b0b3d149c3afebeb3738f98141b1b3e80b9101d0e553f3b9a979b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for dfplayer_card_manager-0.1.3-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