Update embedded cue sheet from genre field

Hi
I store my ripped CD's as single image flac files, separate flacs and separate mp3's
Within the image file is, amongst other things, an embedded cuesheet created from the initial rip

I have found it necessary to update some genres from the original rips, which is easy in the separate flac/mp3 files and also the genre field within the image file but..

Is it possible to write a script that will then update the genre in the embedded cuesheet (with quotes if necessary for two word genres) from the genre field and then resave the image file and then also automatically export the new cuesheet to an external .cue file in the same folder.

I need this to apply to all selected image files in mp3 (e.g. when I am changing a genre for all albums by a single artist). Obviously I can do it all manually but I have quite a lot of genres to tidy up!

thanks

here is a thread that deals with the generation (export) of cue sheets ...
perhaps it has something for you.
/t/11750/1

Open Mp3tag, load one big image flac file, ... or one of the track related flac files, ...
and have a look into the "Extended Tags" dialog.

Is there any tag-field, which contains text, which looks like a cuesheet?
If so, then replace the old content within this tag-field with the new content.
You can do this manually for all selected files at once, ...
with text from Clipboard ...
or with text from textfile using an action "Import text file".

If there is only the need to replace one text item, e. g. the genre specification, within this tag-field, ...
then apply a Mp3tag function "$replace" or an action "Replace" resp. "Replace with regular expression" against this tag-field.

DD.20160112.1908.CET