MobileSheets Forums

Full Version: Programmatically building the Song objects
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi I'm looking for a way to edit and compose manually/programmatically the song objects.
I'd like to write some script to combine automatically into a single song different related element.
For now the Batch Import is not able to detect that elements are related and should be grouped together (as suggested in this post).
So I'd like to do this myself with a script.
Is there any documentation to start from ?
Thanks,
Unfortunately, no, there really isn't any documentation for the way the database is set up, although most fields are self-explanatory. I've mentioned some of the details on the forums before, but if you want to manually create songs in the database, you are going to have to update quite a few tables at once. Get familiar with the database structure and I can answer specific questions once you've looked through all the tables.

Mike
Thanks. I'll be starting slowly :-)
The database is SQLite 3. If you know SQL and have tools to work with a SQL database, it should be doable.
(09-03-2022, 08:49 AM)mwiseman Wrote: [ -> ]The database is SQLite 3. If you know SQL and have tools to work with a SQL database, it should be doable.
That's nice. SQL hasn't to much secret for me.
Maybe you can take a look at https://github.com/sciurius/MSPro-Tools, where some of this is already implemented.
(09-05-2022, 04:20 PM)sciurius Wrote: [ -> ]Maybe you can take a look at https://github.com/sciurius/MSPro-Tools, where some of this is already implemented.

Great tools and starting point. I haven't been using Perl for ages, but it shouldn't be too difficult to understand the code.
The question I had is how to access the database. Do you mount a drive from you PC to the tablet ? Or do you copy the database to the PC, updates it and push it back to the tablet ?
I would copy the database to the PC, alter it, then copy it back and overwrite the existing file on the tablet.

Mike
and don't forget to keep a copies of the database so  you have something to revert to!

Geoff