MobileSheets Forums

Full Version: import songname through filter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello Everybody,

i got all my Files named in a specific pattern (and i dont want to change that).

My Pattern is ### - Title - Instrument.pdf.

So After Import my Song is titeled "001 - Stille Nacht - Piano" in MS.

Has anybody a nice suggestion if or how i can get on "Stille Nacht" as title and or "Piano" in an a additional Field?

Thanks in Advance, Thomas
There isn't an option at the moment to extract parts of a file's name in order to populate fields in MobileSheets. This is something I do want to support at some point, but for now, you'll have to manually set the titles of your songs. You can long press your song, tap edit song at the top of the screen to go to the song editor, go to the fields tab and then you can rename the song there.

Mike
I think you could do that by creating a csv file for each of your pdf files and making it look like this:

title;pages;custom
Stille Nacht;1;Piano

You can automate the creation of the csv files by writing a little script using bash and sed on your Linux computer or if you're using Windows you can probably do something equivalent (though I have no idea how, someone who knows something about Windows scripting would have to help you out there.)

The workflow of the script is:
Read filename to a variable;strip .pdf from the end of the variable; write csv file using the varaiable plus .csv, strip everything up to and including the first dash in the variable, replace space-dash-space with semicolon-1-semicolon; write the variable to the csv file.

Then you just import the csv file instead of the pdf file and that should get you where you want to go.
Thanks @Zubersoft and @FrankCox for your quick respond.