Posts: 153
Threads: 18
Joined: Oct 2023
Reputation:
4
Are ABC files supposed to follow the same import rules as PDFs?
I.E. if you have "Let Mobile Sheets Manage My Storage" turned OFF should the import of ABC files ignore this setting?
My test environment consists of a directory called "Test" that lives under the default "Files" directory, and a library called "Test" that contains a collection called "Test Collection". I use this for testing things like csv imports etc..
So, I was just playing around trying to learn more about ABC files, how they are formatted and investigating whether MS can transpose them (which I haven't figured out yet).
Anyhow, I would copy an ABC file to the storage location I wanted it in, do an import and check that all was fine, delete the song, including associated files, edit my source and copy it back over for a new import, check it out... rinse and repeat. One time I forgot the deletion and got an alert about overwriting the file - HUH? It should be using the file I'd just copied over AFAIK.
So I looked around and lo and behold there's a new directory with the songs name on it. Deleted the song taking care to tell it to delete the file and voila, the directory is now gone.
I thought this was odd, so I looked further and discovered that the option, although greyed out, to create directories for songs was checked, so I enabled MS file management which enabled the check box, remove the check, and disabled management again. Tried a new import and now the file is going into the Files directory where everything else is. Deleted song and file, reverted everything to a greyed check box and it went back to creating directories even though I reckon it shouldn't be as I've disabled MS storage management.
Tested a PDF and it still works as expected with no directories or copies being created. I haven't investigated Chordpro stuff yet so I don't know what it's doing, and I've got very little idea of how to use ABC yet too. It's all a big learning curve at the moment.
Oh yeah, is there a way to transpose ABC displayed songs within MS?
Thanks
You're only paranoid if you're wrong
I'm using an Onyx Boox Tab X, and play low brass: mainly 'Bone and Tuba
Posts: 13,366
Threads: 302
Joined: Apr 2012
Reputation:
235
10-19-2024, 03:31 AM
(This post was last modified: 10-19-2024, 03:36 AM by Zubersoft.)
Yes, the same code is used for processing imported files regardless of their file type (at least in terms of handling the copying of files). So .abc files are handled in the same way as a .pdf file. I can't really speak to what you were seeing, as I don't have every piece of information I would need to draw a conclusion. The only time MobileSheets will force a copy of a file is if it resides in a "cache" folder (which can happen when importing files through other apps).
You said you imported from the "Files" directory. I don't know which directory you are referring to. Do you mean /storage/emulated/0/Android/data/com.zubersoft.mobilesheetspro/files, or some other folder named Files?
As far as transposing ABC, this was discussed in this forum post: https://www.zubersoft.com/mobilesheets/f...l#pid51491
You have to use %%transpose 1, for example. I haven't decided yet how I want to handle transposing of abc files in MobileSheets, as I don't currently have a place in the database to store the transposition information, and I don't want to have to allocate all the same data as I would for a text/chord pro file just for the one or two fields I would need. I may set up a new table for this when I'm making other database changes so I can support transposing ABC files in MobileSheets itself (which will probably just dynamically insert the transpose statement into the ABC file contents).
Mike
Posts: 45
Threads: 6
Joined: Jan 2024
Reputation:
0
actually, no, they Do NOT follow the same rules.
i did this on a Boox 10.3:
- do not let msp manage my files
- create a minimum db consisting of an abc and a pdf residing in the same directory (not 100% sure, might have been in disjoint places under the same root). I believe I imported the pdf via bookmarks.
- clear the library
afterwards, the pdf is gone, but the abc is still there.
Posts: 153
Threads: 18
Joined: Oct 2023
Reputation:
4
10-19-2024, 07:55 AM
(This post was last modified: 10-19-2024, 08:02 AM by Lawrie.)
(10-19-2024, 03:31 AM)Zubersoft Wrote: Yes, the same code is used for processing imported files regardless of their file type (at least in terms of handling the copying of files). So .abc files are handled in the same way as a .pdf file. I can't really speak to what you were seeing, as I don't have every piece of information I would need to draw a conclusion. The only time MobileSheets will force a copy of a file is if it resides in a "cache" folder (which can happen when importing files through other apps).
You said you imported from the "Files" directory. I don't know which directory you are referring to. Do you mean /storage/emulated/0/Android/data/com.zubersoft.mobilesheetspro/files, or some other folder named Files?
As far as transposing ABC, this was discussed in this forum post: https://www.zubersoft.com/mobilesheets/f...l#pid51491
You have to use %%transpose 1, for example. I haven't decided yet how I want to handle transposing of abc files in MobileSheets, as I don't currently have a place in the database to store the transposition information, and I don't want to have to allocate all the same data as I would for a text/chord pro file just for the one or two fields I would need. I may set up a new table for this when I'm making other database changes so I can support transposing ABC files in MobileSheets itself (which will probably just dynamically insert the transpose statement into the ABC file contents).
Mike
Hi Mike,
sorry, it was getting late...
Yes, the "Files" directory is the one you mentioned:
/storage/emulated/0/Android/data/com.zubersoft.mobilesheetspro/files
Actually, Windows reports this location as:
This PC\Tab X\Internal shared storage\Android\data\com.zubersoft.mobilesheetspro\files
but I am assuming that the /storage/emulated/0 part is being hidden but for clarity I'll use it instead of the This PC\Tab X\Internal shared storage\ section for this description.
The file explorer in My Boox TabX reports the folder as:
/storage/Android/data/com.zubersoft.mobilesheetspro/files - Note the missing: emulated/0/
The "Test" directory is:
/storage/emulated/0/Android/data/com.zubersoft.mobilesheetspro/files/Test
The library is also called "Test" with a database named "test.db" in the /storage/emulated/0/Android/data/com.zubersoft.mobilesheetspro/files directory
The /storage/emulated/0/Android/data/com.zubersoft.mobilesheetspro/files/Test directory contains several files which were copied there using Windows file explorer - the same way I copy over PDFs - but we'll use Test.abc as an example.
- Starting conditions: The Test library is empty except for a collection called "Test collection"
- In Settings | Storage "Let Mobile Sheets Manage My Files" is UNchecked however "Create Subdirectories For Songs", while greyed out, is checked.*
- Import "Test.abc" from /storage/emulated/0/Android/data/com.zubersoft.mobilesheetspro/files/Test into the collection
- Duplicate file behaviour is set to "Ignore Duplicate Files"
- New song appears in the library associated with "Test collection".
- I now have a directory called: /storage/emulated/0/Android/data/com.zubersoft.mobilesheetspro/files/Test that contains a copy of "Test.abc"
- When I delete the song /storage/emulated/0/Android/data/com.zubersoft.mobilesheetspro/files/Test disappears as one would expect.
If I repeat the above with Storage settings manipulated to remove the greyed out check in "Create Subdirectories For Songs" then "Test.abc" is copied into /storage/emulated/0/Android/data/com.zubersoft.mobilesheetspro/files/
This is not how PDF imports behave. To be certain, I checked a PDF import in case V3.9.3 had an accidental change to the behaviour I am used to.
I will investigate the transposition stuff shortly - I'm still playing really as I've never used ABC files before.
* These are my default settings and behave correctly for PDFs
You're only paranoid if you're wrong
I'm using an Onyx Boox Tab X, and play low brass: mainly 'Bone and Tuba
Posts: 13,366
Threads: 302
Joined: Apr 2012
Reputation:
235
10-19-2024, 11:10 AM
(This post was last modified: 10-19-2024, 11:10 AM by Zubersoft.)
RAc - That's actually somewhat of a bug. MobileSheets should not delete files if Settings->Storage->Let MobileSheets Manage my Files is unchecked, so I will fix that.
Lawrie - This is happening because of some of the processing that has to be done with abc files, because I currently can't just use them as is. If the file is encoded with something other than UTF-8 (or the character set detection returns something other than UTF-8), or it has a BOM, then I have to copy the file into the cache dir and import it from there, causing it to be imported into the storage location instead of being used from its original location. I'm going to modify the code to also allow ISO-8859-1 because I think the detector sometimes incorrectly returns that encoding when the file is actually UTF-8, because if there are no unicode characters, then either encoding would effectively be the same. So this change may resolve this issue for you with the next update.
Mike
Posts: 153
Threads: 18
Joined: Oct 2023
Reputation:
4
Thanks Mike.
You're only paranoid if you're wrong
I'm using an Onyx Boox Tab X, and play low brass: mainly 'Bone and Tuba
|