Before posting, please read: When to use this forum, when to submit a help ticket

Cannot import chordpro files

Started by drthunderbutt, January 23, 2025, 06:44:22 PM

Previous topic - Next topic

drthunderbutt

When I try to add a .pro file to create a new Document I get the following notification:

"The document is not one of our supported file types (pdf,txt,jpg,jpeg,mov,mp4,m4v,3gp). (626)"

I have been able to import chorpro data into Songs by packing it in a zip file and doing a batch import. However, if the Song already exists, sometimes the import will fail to drop the data into the existing Song and will instead make a new Song that I then have to reconcile against my existing one.

I would prefer to upload my .pro files as Documents in the same way one does PDF's. Then I could just attach any .pro as a Document from within each Song (or from Reportoire->Documents). Doing a large batch (or, worse, putting a single .pro file into a .zip just to get BH to not reject it) is not ideal for me.

So basically, I would like to upload .pro files, one at a time as needed, and attach them to Songs just like a PDF. Is this possible?

arlo

If you change the file extension to .txt, you can attach the file to a song the same way you would with a PDF or JPG. Note that BandHelper will only render bracketed chords; it won't process other ChordPro directives. Also, you won't be able to edit the file contents within BandHelper. So it's usually preferable to import ChordPro files and then you can edit them directly in the website or app.

drthunderbutt

That's too bad. Visual Studio Code has a ChordPro extension with syntax highlighting, auto-complete and other niceties. It won't work for .txt files though, only one of the ChordPro file extensions. Are there any future plans to support importing .pro files natively?

arlo

#3
No, BandHelper can import ChordPro files, but keeping data in ChordPro format would be too limiting. BandHelper uses a relational database and WYSIWYG formatting tools while ChordPro uses file-based storage and text-based markup.

If you have a ChordPro-based editing app that you like, you can see if it exports to PDF format and then attach the PDF files to your songs. Since you'd have to go back to the original app to edit those files either way, that will give the same results as attaching and rendering a ChordPro file.

drthunderbutt

But if I used PDF's, wouldn't I lose on-the-fly transposition though?

Tangential, but I'm just curious - are you saving the pdf/binary files into the relational DB as a BLOB record or is it just a varchar-esque text field that is a flat address to a file on the file system?

arlo

That's right, you can't transpose chords in a PDF file. You would need to go back to the original source and update the chords there, then export a new PDF.

The database contains links to attached files, not the file data itself.