Old 03-07-2015, 07:17 AM   #1
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,586
Default Scripts (LUA): Text Items Formatting Actions (various)

Hi!

Context:
With the recent gorgious Heda's Notes Reader, and his Import/Export SRT subtitles action, it has become clear than we could push empty items actions a step further.
So here is for you, 16 new actions for formating text. It uses standard SRT markup, and it is compatible with the Note Reader (see Dsiclaimer for more details)!

Instructions:
Select items with notes (prefer dedicated to text items (aka empty items with notes; aka text items), but you can all kind of items, and perfom the action.
The great things:
  • if you apply one markup on an item which already has it, it will not add it, to avoid duplicate.
  • font color and background color are generated from visual item color. If you change the item color, just run the script again, it will update any existing markup.
  • The insert single line and multiple lines lorem ipsum text are meant for developpers who quickly need to test notes.

Note than the <background> properties is a custom properties, especially meant to be use with the Notes Reader. You have to delete it before SRT export. Of course, there is action for this.

Demo:
Note: some actions on this toolbar are standard REAPER actions. The list of my scripts is below.



Disclaimer:
  • The actual version oft the Heda's Notes Reader (0.7) doesn't allow multiple lines text items formatting, so the display may be wrong (some markups can appear in plain text). It is a work in progress, feel free to give him support on the Note Reader's thread!
  • If you downloaded work in progress versions of these scripts on my github - aka, before today, you can download these files again. They just have been updated!

Download:
You can download of the script folder on My REAPER Scripts / ExtremRaym.
Click and Download Buttons, and browse for Text Items and Item Notes/Formatting
  • X-Raym_Add background color markup to selected items notes.lua
  • X-Raym_Add bold markup to selected items notes.lua
  • X-Raym_Add font color markup to selected items notes.lua
  • X-Raym_Add italic markup to selected items notes.lua
  • X-Raym_Add musical notes to selected items notes.lua
  • X-Raym_Add underline markup to selected items notes.lua
  • X-Raym_Delete all HTML markup from selected items notes.lua
  • X-Raym_Delete background color markup from selected items notes.lua
  • X-Raym_Delete bold markup from selected items notes.lua
  • X-Raym_Delete font color markup from selected items notes.lua
  • X-Raym_Delete italic markup from selected items notes.lua
  • X-Raym_Delete musical notes from selected items notes.lua
  • X-Raym_Delete selected items notes.lua
  • X-Raym_Delete underline markup from selected items notes.lua
  • X-Raym_Insert multiple lines lorem ipsum to selected items notes.lua
  • X-Raym_Insert single line lorem ipsum to selected items notes.lua

Hope you will like it

Update (2015-03-25)
Despite they are not really note formating, I place in this post scripts related to item notes conversion.
  • X-Raym_Convert selected item notes to take name.lua
  • X-Raym_Convert selected takes name to item notes.lua
  • X-Raym_Swap selected item notes and take name.lua
  • X-Raym_Swap selected item notes and take name preserving break lines.lua

Demo


Update (2015-06-24)
  • X-Raym_Search and replace in selected items notes.lua
  • X-Raym_Add text at beginning of selected items notes.lua
  • X-Raym_Add text at end of selected items notes.lua
If you need custom field (such as track name, take name, item source meta or anything else) just tell me

It can be very useful for using SWS label processor on item notes !

Update (2015-06-25)
An item processor notes processor ? Yes !
  • X-Raym_Add text to selected items notes (Items Notes Processor).lua



Since the screenshot, the item processor is now capable or pure replacement.

Last edited by X-Raym; 10-07-2015 at 10:43 AM.
X-Raym is offline   Reply With Quote
Old 03-07-2015, 08:45 AM   #2
Jason Brian Merrill
Human being with feelings
 
Jason Brian Merrill's Avatar
 
Join Date: Jun 2006
Location: Northeastern PA, USA
Posts: 20,764
Default

this seems really great!

Is there a tutorial on setting up one of those toolbars somewhere?
__________________
Beliefs do not require respect. People do.
Jason Brian Merrill is online now   Reply With Quote
Old 03-07-2015, 09:35 AM   #3
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,586
Default

I just uploaded the link, so you will be abble to make a full folder download.

@Jason
You can create it just as regular toolbar actions.
Or you can try to import my toolbar menu. I just add it in the toolbar folders.
You may have to import the scripts first. This is unfortunately a manual process.

Tell me if it works anyway (note than you can edit the file as text if you need to change the toolbar number)
X-Raym is offline   Reply With Quote
Old 03-25-2015, 05:56 AM   #4
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,586
Default Item Notes Conversion

I just updated the first post with 4 new Item Notes to Text Names (and vice versa) type of action.
The last one (X-Raym_Swap selected item notes and take name preserving break lines.lua) can be used for having SWS label processor for item notes!
X-Raym is offline   Reply With Quote
Old 06-24-2015, 01:34 PM   #5
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,586
Default

New scripts (no screenshots, it's pretty basic):
  • X-Raym_Search and replace in selected items notes.lua
  • X-Raym_Add text at beginning of selected items notes.lua
  • X-Raym_Add text at end of selected items notes.lua

Pretty basic for the moment, but if you need something more advance with custom field (such as track name, take name, take meta etc...) just tell me.

I may eventualy write a custom file with command functions for all my scripts involving such process.

Note: Insert at beginning and end doesn't support breaklines for the moment. Still didn't find a way to do it, I may digg this if I need it at some point :P
X-Raym is offline   Reply With Quote
Old 06-25-2015, 03:03 PM   #6
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,586
Default

Work in progress:
  • X-Raym_Add text to selected items notes (Items Notes Processor).lua

Screenshot.

It matches syntax of the SWS label processor... but for item notes !
So you can set specific to items field, such as its track, its position in selection...

Tell me if you need something in particular
For the moment in can do /T /t /E /I

Pretty basic, but it was what I needed :P

Cheers !
X-Raym is offline   Reply With Quote
Old 07-29-2015, 07:17 AM   #7
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,586
Default

Update on almost all Text items scripts:

Code:
 * v1.x (2015-07-29)
    # Better Set notes
Execution time is multiplied by two or more, according to my measure :P
X-Raym is offline   Reply With Quote
Old 10-07-2015, 10:36 AM   #8
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,586
Default

Update and Notes Item Processor:

Code:
 * v1.1 (2015-10-07)
    + Replace
    + User config area
    + Shortcut (B for Before, A for After, R for Replace)
    # bug fixes
Should be fine better now :P
X-Raym is offline   Reply With Quote
Old 01-09-2016, 01:44 AM   #9
PaterFamilias
Human being with feelings
 
Join Date: Mar 2013
Posts: 39
Default Heda's Visual Editor

Hi
It would be possible to add editor feature to Heda's Note Reader to edit already formatted subtitles from Reader ? Making from it a visual editor ? All that tags looks for beginners a bit scary
PaterFamilias is offline   Reply With Quote
Old 01-09-2016, 03:50 AM   #10
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,586
Default

Hi !
I donlt really see what it will change, as markup will still be present on txt items, on that heda's note reader is already capable of displaying without markup. Having a toolbar with these actions give them already 'visual editor feel', yiu watch note reader for the render, toolbar for the edition, and text items for the source.
But if you want any feature on heda's note reader, you will have to contact heda !
This is really basic markup, no more complicatd that formatting on forums, so I can advice you to get used to it by practicing. You will not stay a beginner forever, don't worry
X-Raym is offline   Reply With Quote
Old 01-13-2016, 09:30 PM   #11
PaterFamilias
Human being with feelings
 
Join Date: Mar 2013
Posts: 39
Default

Quote:
Originally Posted by X-Raym View Post
Hi !
I donlt really see what it will change, as markup will still be present on txt items, on that heda's note reader is already capable of displaying without markup. Having a toolbar with these actions give them already 'visual editor feel', yiu watch note reader for the render, toolbar for the edition, and text items for the source.
But if you want any feature on heda's note reader, you will have to contact heda !
This is really basic markup, no more complicatd that formatting on forums, so I can advice you to get used to it by practicing. You will not stay a beginner forever, don't worry
Thank you! I will try.

One more thing. It is possible to change font face for item text contents and for reader ? Or for one of them ?
PaterFamilias is offline   Reply With Quote
Old 01-13-2016, 11:54 PM   #12
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,586
Default

@PaterFamilias
srt subtitles doesn't handle this so we do not implement this at item level,
You will have to edit the heda's notes reader manually,
It should be a variable with the font as value ask heda !

Cheers !
X-Raym is offline   Reply With Quote
Old 04-12-2016, 03:44 PM   #13
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,586
Default

Update : Add text to selected items notes (Items Notes Processor)

Code:
 * v1.2 (2016-04-12)
    + Added "Below" and Above keywords. "After" and "Before" now work without breaklines.
    + Argument for /E and /I (leading zeros and offset) like this /Eoffset_digits eg /E2_2 will output 03 for first selected item
Thanks for your support !
X-Raym is offline   Reply With Quote
Old 04-12-2016, 05:19 PM   #14
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,602
Default

nice! thanks!
__________________
subproject FRs click here
note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
musicbynumbers is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:30 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.