• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Build Server for Library Edit/Sync
#1
Question 
Hey everyone,

firstly a big thanks to the developer, you really did amazing work with this application! I've been happily using it for about 2 years now, let me describe my existing infrastructure (of which there is no open-source code yet but might be in the future):

It started with a songbook I had created before getting a tablet. This songbook used LaTeX and a pretty horrible syntax in order to create rather beautiful lyrics with the chords above them.
When I bought a tablet and this app, I just wrote a script where instead of creating a big pdf of a few hundred songs it would export each song individually into a folder named after the artist for easy import into MobileSheetsPro. It would also leave out the huge margins needed for a printed book, scale the pages for tablet etc.
Then, on a long weekend, I found out about the chordpro format and MSPs ability to directly import and view these files, so I downloaded a huge collection of chopro files and added them to my library. 
I did, however, still like the more polished look of my LaTeX PDF files.
Naturally, I coded a Python script that would read in a chopro file and use some regex magic to convert it into a latex source file compatible with my build pipeline described earlier.
After that, I even went so far as to create a browser plugin that would allow me to directly download a chopro file from ultimate-guitar.com. (with partial support for ascii tablature!)

So that was my pipeline.
I want a new song?
1. Visit ultimate-guitar.com, find chords that seem to fit
2. Download a chopro file using my browser extension
3. Do some manual adjustments of where the chords actually belong (I want my sheets to be more exact than those on UG)
   
4. Run the Python script to convert this into a .tex file that's compatible with my songbook
   
5. Run a Python script that generates PDFs from all the changed, individual .tex files
   

Unfortunately, something broke when I moved to a new PC and I haven't found the time to dig through the (extremely messy) code yet, so at the moment it does not work and I'm not 100% sure I still have the browser extension code.

Now, instead of just fixing the code, documenting it for other people to use (which would be possible pretty much only for programmers, so not very user friendly) I am currently thinking about creating a (node.js based) application that has a web frontend and unites all those features by running the scripts in the correct order etc.
For this I would use my personal cloud server (although when I open-source this, it can also be run on a PC), but there is one very important thing missing in the pipeline: Getting those files into MobileSheetsPro.

So this is where my question comes in: Is it possible to edit the names of songs, artists and other metadata (crop? attached mp3 files? most important: collections?) manually in Google Drive, maybe add a few files and then sync all those changes back to MSP? I started uploading my library to Google Drive from my tablet about an hour ago and it has only reached 1%, so I can not yet see how the metadata are being stored.
If that is possible (and if not, please please please give me the option to do this), I would start by writing a webapp that connects to Google Drive with their API and allows to edit the library there. This would not only allow someone to edit their library without directly connecting a tablet and using the Windows tool but would then allow me to add the features described above back in, have this run on a server, and be able to add an ultimate-guitar link from everywhere (mobile browser?), which is then downloaded as chopro, compiled to PDF, added to Google Drive automatically and will then be downloaded the next time I sync my table to the cloud folder, but would also allow other people to have multiple tablets connected to one Google Drive folder, which can then be edited with this tool.

Please tell me there is nothing stopping me from realizing this except my own programming skills Big Grin
Reply
#2
Hello Taxel,

All of the data for MobileSheets is stored in a SQLite database. On Android, you normally can't access the file as it's in the private application data directory. If you go to Settings->Storage and enable "Expose Database", the database will be copied to the storage location so long as the storage location is on the internal storage. If an SD card is used for the storage location, the database is copied to /storage/emulated/0/Android/data/com.zubersoft.mobilesheetspro/files. On Windows 10, the database file (mobilesheets.db) is stored in the default storage location which is C:\Users\<your username>\AppData\Local\Packages\41730Zubersoft.MobileSheets_ys1c8ct2g6ypr\LocalState. 

If you want to edit song names, artists, other metadata, you would have to use SQL queries to modify the database and then copy that SQLite database file back to the tablet. If you want to add files, you'd have to add all the new entries to the database to create songs for those files, and then copy the files to the tablet (or use a file synchronization application to automatically pull down files into a specified directory). So to implement the kinds of features you've described, you'll have to start by getting familiar with all of the database tables and fields that are used (along with the relationship between them). It's mostly straightforward if you just look at the table names.

Mike
Reply
#3
You might want to take a look at Sciurius' tools
https://github.com/sciurius/MSPro-Tools
https://github.com/ChordPro/chordpro/wiki
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 2004
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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