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

Author Topic: Converting from another program - Bulk re-formatting  (Read 2842 times)

Darug

  • Senior Member
  • ****
  • Posts: 51
  • Karma: +0/-0
Converting from another program - Bulk re-formatting
« on: April 09, 2023, 06:37:21 pm »
I have been using Linkesoft Songbook for the last year which has been great albeit a little basic. I had an issue with Onedrive , and now despite uninstalling etc, my Macbook won't load.
I have started migrating my Entire Songlist (nearly 1500 songs), however our band play @ 150 songs. I have been painfully converting each song.

Linkesoft Songbook uses Hex code for colours, so I would use one colour code for verses, one for choruses, one for notes etc. EG

{soh #FFc0cb}Intro{eoh}
{soh #FFFF00}Verse{eoh}
{soh #93c47d}Pre-Chorus{eoh}
{soh #00f0ff}Chorus{eoh}
{soh #FFA500}Instrumental{eoh}
{soh #E5E5E5}Bridge{eoh}
{soh #2AA5A5}Outro{eoh}
{soh #FF195D}Important Note{eoh}

Is there a bulk way to remove this code from my documents some how? Even, if I have to reupload most of these documents again?
It looks quite messy.
I also have a Windows PC as well?

Darug

  • Senior Member
  • ****
  • Posts: 51
  • Karma: +0/-0
Re: Converting from another program - Bulk re-formatting
« Reply #1 on: April 09, 2023, 10:13:44 pm »
I asked the quesion on Chat GPT, and this was one of the responses that appeared to work.

Atom: Atom is a free and open-source text editor that supports searching and replacing text across multiple files using a package called "Find and Replace". To use this package, open Atom and go to the "Packages" menu, then select "Settings View" and click on "Install Packages". Search for "Find and Replace" and click "Install". Once installed, go to the "Find" menu and select "Find in Project". In the "Find in Project" dialog box, enter the text to be replaced in the "Find" field and the replacement text in the "Replace" field. Then, select the directory containing the txt files and specify the file type as "*.txt". Click "Find" to preview the search results, then click "Replace All" to perform the replacement.

These are just a few examples of programs that can replace text in a group of txt files. There are many other text editors and utilities that offer similar functionality.






arlo

  • Administrator
  • Senior Member
  • *****
  • Posts: 5858
  • Karma: +146/-3
Re: Converting from another program - Bulk re-formatting
« Reply #2 on: April 10, 2023, 10:07:17 am »
If you use a text editor that does regular expression search and replace, you could remove all those curly-bracketed directives at once with a search phrase like this: \{.*?\}

Or if you want to keep the colors, you could change them to HTML tags by searching for: \{soh #(\w+)\}(.*?)\{eoh\}

and replacing with: <span style="\1">\2</span>

Then paste into the source code box on the song edit page of the BandHelper website.

However, BandHelper only uses a dozen predefined colors, so you would also need to individually replace each color value used in your files with one of the BandHelper colors.
« Last Edit: April 10, 2023, 10:07:40 am by arlo »

Darug

  • Senior Member
  • ****
  • Posts: 51
  • Karma: +0/-0
Re: Converting from another program - Bulk re-formatting
« Reply #3 on: April 10, 2023, 08:54:37 pm »
,
However, BandHelper only uses a dozen predefined colors, so you would also need to individually replace each color value used in your files with one of the BandHelper colors.

Hi Arlo, 12 is plenty (I was only using 8 as per the post), not too mention the addition of Bold, italics etc makes it easier. I realised, I'm going to have go through again, and do a bulk change on the songs originally from Onsong.

One issue with doing a bulk import the developers could look at is the ability to import txt files, that have a pro or chopro extension? My workaround was to copy these files onto a USB disk, and do a bulk rename of extension on my windows PC.


arlo

  • Administrator
  • Senior Member
  • *****
  • Posts: 5858
  • Karma: +146/-3
Re: Converting from another program - Bulk re-formatting
« Reply #4 on: April 10, 2023, 11:09:38 pm »
BandHelper can import ChordPro files with any of these extensions: .chordpro, .chopro, .cho, .pro.

Darug

  • Senior Member
  • ****
  • Posts: 51
  • Karma: +0/-0
Re: Converting from another program - Bulk re-formatting
« Reply #5 on: April 11, 2023, 01:25:35 am »
I think it didn't recognise the ones in my zip files, but I noticed there were ea heap of text files as well.

I've isolated 175 of them, and they are all txt. I'll try again.
:)

arlo

  • Administrator
  • Senior Member
  • *****
  • Posts: 5858
  • Karma: +146/-3
Re: Converting from another program - Bulk re-formatting
« Reply #6 on: April 11, 2023, 09:44:15 am »
Does your zip file contain any subfolders? The import process will only take files from the top level, not subfolders.

 

anything