Multiple Find and Replace in Writer

I am the designated techie for our ukulele group but I am working way above my pay grade and need some help.

I need to replace song sheet chord names (e.g. Bm, D7, C, etc. ) with codes that convert these chord names to ukulele chord diagrams (using Chordette fonts installed on my Mac). Libra Office Find and Replace works fine with single instances. How can I do multiple replacements on the same document at the same time. Assuming this can be done can I then do same for multiple files (song sheets)?

An example of what I am currently doing: find instances of [Am] and replace with “a” in in font named GCEAchordA. (Note that the chord names are actually enclosed with square brackets-it’s not a coding embellishment).

LibreOffice does the single transformations flawlessly. I am able to do a F&R-one at a time-without any problem. There might be several iterations up to 6-8 chords on a single piece of music. I repeat this process for each chord name that needs conversion. Tedious but effective.

An example of what I want to do at the same time: Transform [Am] to code a, and [C7] to code J and [E7] to code H, etc.

If I can do the multiple replacements simultaneously the next step would be to do multiple files (song sheets) at the same time. Am looking at about 100 song sheets that need editing.

Any help would be appreciated.

Paul Fishman
Santa Rosa, CA

I think you can do it by a macro.
Please upload a small sample file here.

You may try alternative-dialog-find-replace-for-writer aka Altsearch. It offers much more than the inbuilt Find & Replace utility, and you can make batch commands with it. The interface is somewhat intimidating, and you may want to play with it on a copy of your files first to get comfortable with it.

1 Like

As I see it now that font is not free, therefore I can not make experiments with your sample file - what you have sent in a message for me.
Please upload your sample file here, maybe someone has that font legally.

This thread: Search/Replace text only when the parastyle is set to "Chord" via Macro <Solved> - #26 by KamilLanda
might be of use. I play guitar and bass, often needing to transpose or convert to NNs. A chord chart could be a separate document that any beginner can refer to.

Hi Tabor,

I have attached a spreadsheet showing Chordette keyboard codes that correspond to the ukulele chord names. You probably cannot search for the chord names that appear above the chord diagrams so I added a column with just the chord names. I assume that the diagrams with names are in PNG format and thus not searchable.

I added only a single column for experimental purposes. Any programmed method of substituting chord diagrams for chord names will require a look-up table in order locate the needed keyboard codes.

I am sending the spreadsheet in Mac format. If you cannot read it let me know and I can send it in one of the Mac export formats (PDF, Excel, CSV,TSV). If an Open Office format is best let me know how to make the conversion as I am new to Libre Office.

Hope this information is helpful.

Paul Fishman

(Attachment Chordette Ukulele Font Codes (1-4).numbers is missing)


This may work better:

Chordette Ukulele Font Codes (1-4).xlsx (12.2 KB)

Your .xlsx file have NOT contain the shapes of the Fonts, but the file contains the NAMES of the used Fonts only in the formatting properties. I have not either the “GCEAcchordA” font, nor the “Helvetica Neue” font on my PC, therefore your sample appeared with substituted Fonts:

The missing fonts are flagged with ITALIZED font name in the formatting box at the top of my attached image.
The ukulele chord shapes will not appeared on a PC what have not installed the same version of the used Fonts.
You can embed the fonts into an ODF type file - if the license of the specific Font allows it.

Hi Tabor,

Did you receive copies of Chordette Fonts I sent yesterday? They need to be installed on your computer. Fonts are in ttf format.

The spreadsheet apparently did not work because the fonts were not recognized. Was this because you could not install the on your PC?

Not sure how I put fonts into Libra Office format. Please advise and I will re-send.

Paul Fishman

Unfortunatelly, not. I have received only an .xlsx, and a .docx file