Skip to content

WB2024/WBs-Picard-Filenaming-Script-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MusicBrainz Picard File Naming Script Generator

Python Version License Buy Me A Coffee

A simple, user-friendly Python CLI tool that generates MusicBrainz Picard file naming scripts through an interactive menu-driven interface.

No scripting knowledge required! Just answer a few simple questions, and get perfectly formatted Picard scripts ready to use.


What is this?

MusicBrainz Picard is a powerful music tagger that can automatically organize your music library. However, creating custom file naming scripts requires learning Picard's scripting language and can be complex and error-prone.

This tool solves that problem. It provides:

  • 🎯 Simple interactive menus - No coding required
  • πŸ“¦ 6 ready-to-use preset templates - Common configurations already built
  • πŸ”§ Full customization - Fine-tune every detail if you want
  • βœ… Guaranteed valid output - Generated scripts use only real Picard variables and proper syntax
  • πŸ‘€ Live preview - See examples before saving
  • πŸ’Ύ One-click export - Save and import directly into Picard

Creating Picard file naming scripts can be complex and time-consuming. This tool simplifies the process by letting you make simple selections and choices, then automatically generates the correct Picard scripting code for you.


Why Use This Generator?

✨ Save Time - Create complex scripts in minutes, not hours
πŸ›‘οΈ Error-Free - No syntax errors, all variables are real and validated
πŸ“š Learn by Example - See how Picard scripts work by examining the output
🎨 Flexible - From simple to advanced configurations
πŸ”„ Reusable - Save and share your configurations


Screenshots

Main Menu

Main Menu The interactive main menu offers quick access to presets, custom building, help, and more.

Preset Selection

Preset Templates Choose from 6 professionally designed presets, each with example output.

View All Presets

View Presets Compare all available presets at a glance with their formats and examples.

Custom Builder Wizard

Custom Builder Step 1 Step 1: Configure your folder structure preferences.

Custom Builder Step 2 Step 2: Customize album folder details and metadata.

Custom Builder Step 3 Step 3: Set up multi-disc album handling.

Custom Builder Step 4 Step 4: Define filename format and track numbering.

Custom Builder Step 5 Step 5: Configure special handling for Various Artists and soundtracks.

Generated Script Output

Generated File Preview the generated Picard script before saving.

Help & Documentation

Help Menu Built-in help provides guidance on Picard scripting concepts.


Installation

Prerequisites

  • Python 3.8 or higher
  • pip (Python package installer)
  • Git (optional, for cloning)

Steps

  1. Clone the repository

    git clone https://github.com/WB2024/WBs-Picard-Filenaming-Script-Generator.git
    cd WBs-Picard-Filenaming-Script-Generator

    Or download the ZIP file from GitHub and extract it.

  2. Install dependencies

    pip install -r requirements.txt

    This will install:

    • rich - For beautiful terminal output
    • questionary - For interactive menus
  3. Verify installation

    python picard_script_generator.py

    You should see the main menu appear.

Usage

Run the generator from the command line:

python picard_script_generator.py

Then follow the interactive prompts to build your script.

Quick Start Guide

Option 1: Use a Preset (Fastest)

  1. Run python picard_script_generator.py
  2. Select "πŸš€ Quick Start - Use a preset template"
  3. Choose a preset that matches your needs
  4. Preview the example output
  5. Choose "βœ“ Generate this script"
  6. Save the script
  7. Import into Picard

Option 2: Customize a Preset

  1. Run the generator
  2. Select "πŸš€ Quick Start - Use a preset template"
  3. Choose a starting preset
  4. Select "πŸ“ Customize this preset"
  5. Modify settings interactively
  6. Preview and save

Option 3: Build from Scratch

  1. Run the generator
  2. Select "πŸ”§ Custom Build - Configure everything step by step"
  3. Answer the wizard questions:
    • Folder structure (Artist? Album?)
    • Album details (Year? Label? Catalog?)
    • Multi-disc handling (Subfolders? Numbering?)
    • Filename format (Track numbers? Featured artists?)
    • Special handling (Various Artists? Soundtracks?)
  4. Preview and save

Example Output

Here's what your files might look like with different presets:

Simple Preset

Music/
β”œβ”€β”€ The Beatles/
β”‚   └── [1969] Abbey Road/
β”‚       β”œβ”€β”€ 01. Come Together.mp3
β”‚       β”œβ”€β”€ 02. Something.mp3
β”‚       └── 03. Maxwell's Silver Hammer.mp3
└── Pink Floyd/
    └── [1973] The Dark Side of the Moon/
        β”œβ”€β”€ 01. Speak to Me.mp3
        └── 02. Breathe.mp3

Organized Preset (with alphabetical grouping)

Music/
β”œβ”€β”€ B/
β”‚   └── Beatles, The/
β”‚       └── [1969] Abbey Road (Remaster)/
β”‚           └── Disc 1/
β”‚               β”œβ”€β”€ 01. Come Together.mp3
β”‚               └── 02. Something.mp3
└── P/
    └── Pink Floyd/
        └── [1973] The Dark Side of the Moon/
            └── Disc 1/
                └── 01. Speak to Me.mp3

Various Artists Albums

Music/
└── Various Artists/
    └── [2020] Now That's What I Call Music 75/
        β”œβ”€β”€ 01. Artist A - Track Title.mp3
        β”œβ”€β”€ 02. Artist B - Track Title.mp3
        └── 03. Artist C - Track Title.mp3

Generated Script

The generated script will be saved as my_picard_script.pts (or your custom name) in the same directory as the generator.

Importing into Picard

  1. Open MusicBrainz Picard
  2. Go to Options β†’ Options β†’ File Naming
  3. Click "Import" and select your generated .pts file
  4. Enable "Rename files when saving"
  5. Click OK

Your files will now be organized according to your custom naming scheme!

Available Presets

  • Simple - Artist/[Year] Album/01. Title
  • Organized - A/Artist/[Year] Album/Disc 1/01. Title
  • Detailed - A/Artist/[Year] Album [Label] {Cat#}/01. Title
  • Flat - Artist/[Year] Album/1-01. Title (no disc subfolders)
  • Minimal - Album/01. Artist - Title (no artist folders)
  • Audiophile - B/Beatles, The/[Year] Album [FLAC]/01. Title

Features

All generated scripts include:

  • βœ… Valid Picard TaggerScript syntax
  • βœ… Real MusicBrainz variables (verified, no made-up variables)
  • βœ… Proper fallback values for missing metadata
  • βœ… Windows/Linux/macOS compatible character handling
  • βœ… Multi-disc album support
  • βœ… Various Artists handling
  • βœ… Featured artists detection
  • βœ… Configurable track number padding
  • βœ… Optional year, label, catalog number, format display

Troubleshooting

Import Error: Missing packages

pip install --upgrade rich questionary

Script doesn't start

  • Ensure you're using Python 3.8 or higher: python --version
  • Try using python3 instead of python on some systems

Generated script has errors in Picard

  • The generator only uses valid Picard syntax and real variables
  • If issues occur, please report them on GitHub Issues

Support the Project

If you find this tool useful, consider supporting its development:

Buy Me A Coffee

Your support helps maintain and improve this project. Thank you! β˜•

Contributing

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest new features
  • Submit pull requests
  • Add new preset templates

License

MIT License

Releases

No releases published

Packages

 
 
 

Languages