This pull request adds a feature that allows the user to customize the filename of the pasted image with the help of some predefined variables:
Variable
Description
Example
${addonName}
Name of the add-on
ImagePaste
${yearLong}
Year with the century
2021, 2022, …
${yearShort}
Year without the century
21, 22, …
${monthNumber}
Month as a zero-padded decimal number
01, 02, …, 12
${monthNameLong}
Full month name
January, February, …, December
${monthNameShort}
Abbreviated month name
Jan, Feb, …, Dec
${day}
Day of the month as a zero-padded decimal number
01, 02, …, 31
${weekdayNumber}
Weekday as a decimal number
0, 1, …, 6
${weekdayNameLong}
Full weekday name
Sunday, Monday, …, Saturday
${weekdayNameShort}
Abbreviated weekday name
Sun, Mon, …, Sat
${hour24}
Hour (24-hour clock) as a zero-padded decimal number
00, 01, …, 23
${hour12}
Hour (12-hour clock) as a zero-padded decimal number
01, 02, …, 12
${minute}
Minute as a zero-padded decimal number
00, 01, …, 59
${second}
Second as a zero-padded decimal number
00, 01, …, 59
${index}
Order of the image
1, 2, …
${index:N}
N-digits image order number with zero padding
${index:2} gives 01, 02, …
The add-on preferences introduces a new section where the user enters the custom name:
There are some filename restrictions depending on each operating system. If the input filenames are not valid, the field will warn by turning red and the new image name will fall back to default name ${addonName}-${yearShort}${monthNumber}${day}-${hour24}${minute}${second}:
Further comments
Fix the PowerShell script doesn't take raw strings (cfc2847bc6e0755c4a5db5d56b97d9b9de27a4b5).
Fix the pasted_images dictionary still keeps undone images after saving (from #17) (5888fc241e75d71b3cc805f58f049315e344495d).
Proposed changes
This pull request adds a feature that allows the user to customize the filename of the pasted image with the help of some predefined variables:
${addonName}
${yearLong}
${yearShort}
${monthNumber}
${monthNameLong}
${monthNameShort}
${day}
${weekdayNumber}
${weekdayNameLong}
${weekdayNameShort}
${hour24}
${hour12}
${minute}
${second}
${index}
${index:N}
${index:2}
gives 01, 02, …The add-on preferences introduces a new section where the user enters the custom name:
There are some filename restrictions depending on each operating system. If the input filenames are not valid, the field will warn by turning red and the new image name will fall back to default name
${addonName}-${yearShort}${monthNumber}${day}-${hour24}${minute}${second}
:Further comments
pasted_images
dictionary still keeps undone images after saving (from #17) (5888fc241e75d71b3cc805f58f049315e344495d).