`\. ,/'
|\\____//|
)/_ `' _\(
,'/-`__'-\`\
/. (_><_) ,\
` )/`--'\(`' lyncs
` '
Lyncs (Lua + Syncs) is a terminal interface for moving music from a Linux system to a Snowsky Echo Mini DAP. It handles FAT32 filename constraints, shows what's missing, and copies files with progress feedback.
Scans your music directory, detects connected SD cards, and displays a side-by-side comparison. You can transfer individual artists or everything at once. Filenames are automatically made FAT32-compliant.
- Lua 5.1 or newer
- LuaFileSystem (lfs) - install with
luarocks install luafilesystem - Standard Linux tools: find, rsync, lsblk, stty, xdg-user-dir
# Get the script
git clone https://github.com/dotmavriq/lyncs.git
cd lyncs
# Make it executable
chmod +x src/lyncs.lua
# Run it
./src/lyncs.luaFor system-wide access:
sudo cp src/lyncs.lua /usr/local/bin/lyncsThe script asks for your music directory. Default is ~/Music or your XDG music folder. This path saves to ~/.config/lyncs/source_path.
Two-column display:
- Left: Artists on your computer with album counts and sizes
- Right: Same artists on the SD card (shows [OK] or MISSING)
↑/↓ork/j- Move selectionT- Transfer selected artistF- Sync all artistsW- Wipe SD card (requires DELETE then WIPE ALL confirmation)P- Manually set SD card pathR- Rescan both sidesC- Reset config and exitQ- Quit
Checks:
/proc/mountsfor mounted media/run/media/$USER/and/media/$USER/lsblkoutput for connected FAT32 volumes
Finds MP3, FLAC, WAV files in your music directory. Groups by artist, counts albums, shows total size.
Replaces illegal characters with underscores:
<>:"\|?*→_
Example: Band: Name? becomes Band_ Name_
- Creates helper bash script in
/tmp/ - Runs script with source and target paths
- Shows spinner and percentage during copy
- Updates SD card file list when done
Stores one line in ~/.config/lyncs/source_path - your music directory path.
To change it: delete the file and restart.
- Card not mounted? Check
lsblk - Use
Pto set path manually - Might need
sudofor some mount points
- Check
/tmp/lyncs_rsync_status.log - Ensure enough space on SD card
- FAT32 has 4GB file size limit
- FAT32 doesn't allow certain characters
- Check sanitized names in the log
- Original files remain untouched on your computer
- Need LuaFileSystem:
luarocks install luafilesystem - Or install system package:
lua-filesystem(Debian/Ubuntu)
One Lua file, 698 lines. Functions are in the lyncs table.
init()- Main loop, handles inputdraw_ui()- Terminal displayscan_dir()- File discoverytransfer_with_sanitize()- Copy with FAT32 fixesdetect_sd()- Find removable storage
lfsfor directory scanning (falls back tofindcommand)- Standard shell utilities
MIT. Do what you want with it.
Built because the Snowsky Echo Mini sorts by "Added Date" on FAT32, and manual copying is tedious. This does the job.