• 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Batch import metadata from directories: multi-valued fields?
#1
Hi, is it possible to have multi-valued fields (that is, a list of multiple values for a field) when doing batch import from directories? I saw the CSV file format could use | as a separator, but that is not a legal character in Windows filenames.
Reply
#2
At the moment, no, that is not currently supported. A character such as semi-colon would have to be used as the delimiter if I was going to support that. It would be helpful to hear from more users if this would be useful for them.

Mike
Reply
#3
(09-10-2024, 06:05 PM)Zubersoft Wrote: At the moment, no, that is not currently supported.

Thanks letting me know.

As an alternative, I've tried making symlinks to the same file with different paths, but that either ends up with separate song entries, or just ignores all but the first path (depending on whether "Ignore Duplicate Songs" is checked).

So it looks like at the moment there is no way to convert an existing tagged song collection programatically?
Reply
#4
Not if you need to assign multiple values to a single metadata field through folder names. You'd have to use a different approach.

Mike
Reply
#5
(11-05-2024, 06:48 AM)Zubersoft Wrote: You'd have to use a different approach.

As far as I can tell, the other import methods only work on a single file at a time, so they are unworkable for large collections.

Hmm, maybe editing the database directly, like this perl script? https://github.com/sciurius/MSPro-Tools
Reply
#6
If you are comfortable running SQLite queries against the database, then yes, you can certainly do that.

Mike
Reply
#7
What does "an existing tagged song collection" mean? Where are the tags now that you want to be converted into MobileSheets meta data? Maybe it's convenient to import your collection just once and maintain it completely in MobileSheets? The multi-select and database handling features of MobileSheets are pretty good.
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#8
(11-05-2024, 07:20 PM)itsme Wrote: What does "an existing tagged song collection" mean? Where are the tags now that you want to be converted into MobileSheets meta data? Maybe it's convenient to import your collection just once and maintain it completely in MobileSheets? The multi-select and database handling features of MobileSheets are pretty good.

Basically, I have a large heap of pdf files (several hundred) I downloaded from IMSLP, and I had the bright idea to write a little script to get tags from there based on the IMSLP number in the file name. Now my challenge is how to convert these tags into MobileSheets meta data.

The batch import method almost works except for this multiple tag value part. The multi values are pieces with more than one catalogue system (I put this as "album" for MobileSheets) and pieces with different possible instrumentation (I put this under "collection" for MobileSheets). I'll have to take a look at how many multi values I have to figure out if it's worth wrangling the database files, vs just entering them by hand.
Reply
#9
It's still not fully clear for me where the meta info is stored before import. A text file with a list that maps the IMSLP numbers / file names to the tags? Did you try CSV import? Currently CSV import is limited to one CSV file per PDF, so you need to organise something like a batch import of CSV files or wait for an extension of CSV import that Mike has thought about,
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#10
(11-11-2024, 09:10 AM)itsme Wrote: A text file with a list that maps the IMSLP numbers / file names to the tags?
Yes, that's what I'm generating currently. For the batch import, I translate to a series of mkdir and mklink commands that produces the needed file/path names for tagging.

Quote:Did you try CSV import? Currently CSV import is limited to one CSV file per PDF, so you need to organise something like a batch import of CSV files

How would I organize a batch import of CSV files? I thought CSV is limited to one PDF, so it's useless for me.
Reply
#11
Batch importing csv files is not currently supported, and CSVs are currently limited to one PDF. Those are both things I'm going to address at some point soon.

Mike
Reply
#12
@npostavs: you might try writing your meta data into the PDFs. MobileSheets can populate its database with metadata from imported PDFs. This also works during batch import. Adding meta data fields to PDFs should be possible with a script and it would add additional value to the PDFs even for using them outside of MobileSheets.
I have no experience with this method and not the time to investigate it further, but you should be able to find helpful info in the forum. Good starting points might be https://www.zubersoft.com/mobilesheets/f...-8020.html and https://www.zubersoft.com/mobilesheets/f...10853.html
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#13
(11-11-2024, 04:33 PM)itsme Wrote: Adding meta data fields to PDFs should be possible with a script and it would add additional value to the PDFs even for using them outside of MobileSheets.

This is an interesting idea, but I think it would have same problem with multi-value tags.

One thing I found looking at the threads you linked, is that the solution for this might be to have multiple non-equal copies of the pdf for each set of tag values. If I understand correctly, this would get MobileSheets to merge the value sets together instead of ignoring duplicate files as in my current method. I guess adding some PDF metadata would be a good way to get a non-equal pdf file that looks the same for a human reader.
Reply
#14
I assume multi value tags should be possible in PDFs, try separating the values with | as it is the case in CSVs.
As said, I never use tags in PDFs, you need to search the forum, ask other users or experiment yourself.
For investigating something I recommend a separate database (Settings - Switch Library)

In case you edit the tags in MobileSheets you can have several songs with diffferent sets of tags that use the same PDF:
call "Copy Song" and select "Use Original File"
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply




Users browsing this thread:
2 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.