Splasm Software Discussions

AppleScript: AutoChapterRename v0.3
Page 1 of 1

Author:  andi242 [ Wed Mar 09, 2011 2:59 pm ]
Post subject:  AppleScript: AutoChapterRename v0.3

Hi everybody,

there is one feature that is (imho) missing in Audiobook Builder.
It's about automatic, sequential renaming of chapters within ABB.
Until now I needed to mark a chapter, copy & paste the desired name and add a number to it.
(like "Chapter 1, Chapter 2, ... / Part 1, Part 2, whatever)
I spent several hours on google to find a existing solution, without success.

So I contacted Splasm support.
Randy got back to me and told me that this feature is on the list for future releases.
He also generated a script which provides this feature.

This is awesome support! Any other developer may have hinted to a future release without providing a solution.

I took Randy's code and wrapped some additions around it.
(I am really no good at apple scripting, it took a while to google ;) )

This is what I've done so far:
Basic Workflow:
-- 1. Is ABB running? If not, exit script.
-- 2. What kind of renaming would you like to do?
-- 2.1. prefix: your desired text is set as a prefix to the existing chapter names (e.g. "Chapter 1: <original text>")
-- 2.2. replace: the original text will be replaced (e.g. "Part 1")
-- 3. Check method of renaming and replace / append text (Randy's code)
-- 4. Exit

-- 0.1 initial script
-- 0.2 added check if "access for assistive devices" is enabled
-- 0.2 added switch to chapter view in ABB (forced by keystroke)
-- 0.3 number chapters 1-9 with leading zeros

if ABB chapter view is not active the script generates an error - fixed

It works on my Macbook Pro running 10.6.6, unfortunately I can't do any testing on other releases or machines (I'm no dev at all ;) )
I can't take credit for this, because the main functionality is written by Randy.

Feel free to use and download.

This is the source script :
File comment: source script
0.3 chapterizer scpt.zip [11.05 KiB]
Downloaded 1105 times

If you'd rather use a standalone executable try this :
(I'd prefer downloading and checking the source, but not all may know how to create an executable from this)
File comment: standalone app
0.3 chapterizer app.zip [35.57 KiB]
Downloaded 1078 times

I hope this works for all of you who need it ;)

Any feedback is much appreciated. :)

  • check if "access for assistive devices" is enabled (03/10/10)
  • making ABB chapter view active to catch an error (03/10/10)
  • number chapters 1-9 with leading zeros (03/11/10)

Author:  Randy K. [ Wed May 18, 2011 10:02 am ]
Post subject:  Re: AppleScript: AutoChapterRename v0.3

We have just introduced said functionality with some new twists in Audiobook Builder 1.5. Just select the chapters you want to rename, and go to the 'Audiobook' menu at the top of the screen and select the 'Rename...' option. This should bring up a new window with many options on how to auto-name your chapters.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group