Hi there. Sorry for the late reply, but I do try not to start a new thread if not necessary.
It truly is to find a needle in a haystack w/ that huge thread, and all of those one-size fits all scripts. I like that @rdswift setup a repo at GitHub. I was going to put my query there as it seems the way to go when sharing code stuffs, but…
In addition to the thoughtful tutorials for scripting/ tags & file naming already provided, what I’d like to see, (and maybe this is something we could do at @rdswift 's GitHub repo?) is a much more broken-down recommended list of snippets. In essence, I suppose that’s what we have in the Picard File Naming Script Editor => Documentation (which conveniently opens in a panel in the editor), as we can see things like $left(text,number)
and $rreplace(text,pattern,replace)
, which for someone who knows a bit about string manipulation scripting / regex, etc., it may seem it goes-without-saying.
About once a year, I find myself trying to remember because I lose my notes in some Windows system migration, incarceration, or any number of life’s annoyances, and it’s not the activity I prefer to spend time on when it comes to consuming the media. Albeit, it is the sort of activity I prefer I do at some point, so i might better enjoy all that juicy jazzy juke-joint jezebelle-jangle! Ha!
My goal (or “A Resource Named Desire”):
Setup a repo w/ simple, categorically identifiable snippets based on common examples
E.g.
– Artist Stuff
– Common Misnomers:
– Fix “The Artist_Name”, when artist is “Artist Name” [
if(%artist_name% HAS “The Artist” && %real_artist_name% ! HAS "The ") { remove prefix “The” }
] obviously an example, made up script.
– Fix “Jimmy Hendrix” to “Jimi Hendrix”
– some other script that fixes that situation
– Directory Structure
– Organize by Artist
– Start the file rename script with /your/path/to/media_files/%artist%/
where %artist% becomes a folder
– AlphaNumeric Nodes
– Make a directlry like /path/A/Abba
/path/B/Boston
/path/C/Coheed
etc.
– and the scripting to accomplish it correctly.
My point being. I look at enough code all day long. I personally don’t care to do it when I’m trying to listen to music. So, I really don’t care who came up w/ a one-size fits-all script, and whether it can replace and reformat the tag to suit some Standards compliance likely to be deprecated by some Giant like Spotify or whatever in a few months. I just don’t care anymore. All the AI does it for you. What’s the point in wasting the time on it.
BUT. I do want to have my personal folders alpha numerical like that. For me, that works. This old dog knows a few tricks, but all I really want is the bone.
Allegedly Picard is based on the fb2k script engine, whatever that means. But, my fb2k script,
$if($stricmp($left(%artist%,4),The ),$substr(%artist%,5,5)'/'$substr(%artist%,5,244)', '$substr(%artist%,1,4)'/',$left(%artist%,1)'/'%artist%'/')$if(%album%,$if($or($stricmp(%album artist%,Various Artists),$stricmp(%album artist%,Various)),%album% '(Various Artists)'$if($isgreater($num(%disc%,2),0,'disc number true','disc number false'),'[disc '%disc%']/','/'),%album% $if($isgreater($num(%disc%,2),0,'disc number true','disc number false'),'[disc '%disc%']/','/')),'[UNKNWON ALBUM]/')$if(%artist%,%artist%,$if(%band%,%band%,'[UNKNOWN ARTIST]'))$if(%album%,' - '%album% $if($or($stricmp(%album artist%,'Various Artists'),$stricmp(%album artist%,'Various')),' (Various Artists)',)$if($isgreater($num(%disc%,2),0,'disc number true','disc number false'),' [disc '%disc%']',),' - [UNKNOWN ALBUM]')$if(%tracknumber%,' - '$num(%tracknumber%,2),' - 00')$if(%title%,' - '%title%,' - [UNKNOWN TITLE]')
doesn’t work in Picard, because some of the functions (strcmp, i think?) aren’t recognized.
So, I’m trying to recreate that for Picard (well, it truly needs changing as well; an upgrade for those deprecated [unknown] and brackets that someone doesnt like in my submitted edits. haha!).
I want my result to be:
/path
/[FILE_TYPE_EXTENSION]
/[FIRST_ALPHA-NUM_CHAR]
/[Artist]
/then_whatever_i_want_for_filename.pattern
How easy it is to please me!
Cheers, brothers and sisters!