I’ll be honest with you all - I am not very good with scripting and RegEx unfortunately.
I am trying to produce a smart rule:
I have a folder with pdfs called [author]-[year]-[title]
I highlight and annotate and summarize highlights to markdown
Here i wan’t the smart rule to kick in: Move the MD-file to a specific folder
Rename the MD-file to @[author][year] - annotations and highlights
Any one who have a quick idea how to produce this?
The RE might look like this
The replacement like
@[$1][$2] - annotations and highlights
Not tested, though
Does the name contain the square brackets or is it actually
No square brackets, ex.: Drotner-2000-Konvergens_og_divergens.pdf
Want MD file called: @Drotner2000 - annotations and highlights
So, my replacement RE should be
@$1$2 - annotations and highlights
The RE to split up the PDF’s title should remain the same.
@\1\2 - annotations and highlights if you want to use smart rules and
Scan Name & Change Name actions.
Tx - I didn’t check if it’s backslash or dollar for capturing group references. Should’ve
Thank you both of you!
I did this:
But the file was just named @\1\2 - I’m doing something wrong here!
Also, i just realised that some of the pdfs have more authors and in that case the pdf is called author-author-year-title - is there anyway to get around that? Otherwise it can be one of the manual edits I can do myself afterwards.
Scan Name action looks for a string currently according to your screenshot, selecting regular expression instead should fix this.
Thank you! Now it worked.