Templates¶
Templates allow you to save and reuse your renaming configurations. This is especially useful for maintaining consistent naming conventions across projects.
Understanding Templates¶
A template saves all your current settings, including:
- Prefix and suffix
- Find/replace patterns
- Regex option
- Numbering style and leading zeros count
- Case conversion option
- Date stamping settings
- Special character and whitespace options
Saving a Template¶
Steps¶
- Configure all your desired renaming options in the Main tab
- Switch to the Templates tab
- Click Save Current Settings
- Enter a descriptive name for your template
- Click OK
Naming Tips
Use descriptive names that indicate the purpose:
Project_Standard_NumberingClean_Import_LayersArchive_With_Date
Loading a Template¶
Steps¶
- Go to the Templates tab
- Select a template from the Saved Templates list
- Click Load Selected Template
- Switch back to the Main tab to see the applied settings
Note
Loading a template replaces all current settings with the saved configuration.
Deleting a Template¶
Steps¶
- Go to the Templates tab
- Select the template you want to remove
- Click Delete Template
- Confirm the deletion
Warning
Deleted templates cannot be recovered.
Quick Templates¶
The plugin includes three pre-configured quick templates for common use cases:
Date Prefix¶
Adds the current date as a prefix to layer names.
Settings Applied:
- Date stamp: Enabled
- Date format: YYYYMMDD
Example Result:
Clean Names¶
Cleans up messy layer names by removing special characters and extra whitespace.
Settings Applied:
- Remove special characters: Enabled
- Clean extra whitespace: Enabled
- Numbering: None
Example Result:
Project Standard¶
Applies a professional numbering scheme with clean whitespace.
Settings Applied:
- Numbering: Leading zeros (01, 02...)
- Clean extra whitespace: Enabled
Example Result:
Template Storage¶
Templates are stored in a JSON file located in the plugin directory:
Template File Format¶
{
"My Template": {
"prefix": "Project_",
"suffix": "",
"find_pattern": "",
"replace_pattern": "",
"use_regex": false,
"numbering_style": "leading_zero",
"leading_zeros_count": 0,
"uppercase": false,
"lowercase": false,
"title_case": false,
"capitalized": false,
"date_stamp": false,
"date_format": "YYYYMMDD",
"remove_special_chars": true,
"clean_whitespace": true
}
}
Template Workflows¶
Workflow 1: Standardizing Imported Data¶
Scenario: You frequently import data with inconsistent naming.
- Create a template with:
- Remove special characters: Enabled
- Clean whitespace: Enabled
- Case: Title Case
- Save as
Clean_Imports - Use whenever importing new data
Workflow 2: Project Archiving¶
Scenario: You need to archive project layers with dates.
- Create a template with:
- Date stamp: Enabled (YYYY-MM-DD format)
- Prefix:
Archive_ - Leading zeros numbering
- Save as
Archive_Project - Use when archiving completed projects
Workflow 3: Team Standards¶
Scenario: Your team has specific naming conventions.
- Create templates matching your team's standards
- Share the
presets.jsonfile with team members - Everyone uses the same naming conventions
Sharing Templates
Copy the presets.json file from your plugin directory and share it with colleagues. They can place it in their plugin directory to use the same templates.
Best Practices¶
Do¶
- Use descriptive template names
- Create templates for recurring tasks
- Test templates on a few layers before bulk application
- Back up your
presets.jsonfile
Don't¶
- Create too many similar templates
- Use generic names like "Template 1"
- Forget to update templates when conventions change
Troubleshooting¶
Template not saving¶
- Check if you have write permissions to the plugin directory
- Try running QGIS as administrator (Windows)
Template not loading correctly¶
- The template file may be corrupted
- Delete the problematic template and recreate it
Templates missing after update¶
- Plugin updates may reset the presets file
- Always back up your
presets.jsonbefore updating