Using Jutoh to Automate Vendor-Specific Other Works Pages

Note: I haven’t had the chance to update this, but with the feature add of conditional tags, I’ve redone this process to use those instead of styles. It removes the chance of odd formatting slipping in and is a better design. If you’re looking to implement this, I’d suggest exploring conditional tags in the help files. Follow the below logic but wherever I talk about an “Only” style, use the conditional tags instead.

I did a presentation at BayCon 2015 that gave participants a quick overview of some of the tools available to authors and indie publishers. I’ve been meaning to set up an Indie Toolbox section on my blog ever since, but recently two people on one of my lists asked me how I use my formatting program of choice to perform an otherwise tedious task automatically. Or more specifically, how to have a single “other works” page that produces eBooks containing only the links for the selected vendor. It seemed like a good start to the new section as any.

However, since this is the first, I’ll say a few general words first.

Odds are I’ve mentioned this before a time or two, but my mother taught me at a young age “when in doubt, automate.” Basically, if you have to do a task more than once, take the time to write a batch file, script, or whatever that will do all the repetitious tasks for you. This gave her the reputation for amazing efficiency at numerous jobs because everyone else did the tedious tasks by hand each time.

Why is this relevant?

Well, my favorite formatting tool, bar none, is Jutoh. Julian Smart is a responsive programmer who gets bugs fixed promptly, especially when I give him a clear route to finding the problem. The interface is also pretty friendly, and the help files are—believe it or not—helpful.

But that’s not what really has me loving this program. While Jutoh is capable of producing cleanly coded ePubs, Mobis and various other formats (including ODT for PDF or print layout) straight out of the box, the more I learn about the capabilities, the more I’ve discovered ways to simplify and automate my release process.

Where formatting used to take up the most time, now it’s checking my output files which currently number 11, all but two customized per vendor. And the amount of time for a release or re-release is minimal depending on the changes I’ve made.

As far as the “other works” automation, I first learned about the key feature for my process as a way to add the “Smashwords Edition” requirement to the base file so I didn’t forget to add it for Smashwords without having the tag show up in any of the non-Smashwords versions. Jutoh has a feature where you can include and exclude text based on the paragraph style. While I use it in various places including the above, I have found it critical for managing the “other works” page as I will now demonstrate.

The “Only” styles allow you to tie specific text to specific compile configurations. You control which will be used for each configuration in the “Paragraphs to include” field and exclude all others using Only* in the “Paragraphs to exclude” field as shown in the image below.
Jutoh Project Properties-Only

Click to Enlarge.

Below, I list the specific steps. While there are quite a few to get started, most of them are one time only, and the others are not much different than what you have to do for each vendor if making the selections manually.

How to Create an Automated Vendor-Specific “Other Works” Page

Note: These instructions are for the Windows version. Please state any differences with the Mac version in the comments to help other Mac users.

One-Time Setup Steps

(You will still need to maintain the links and update the configuration with any changes.)

  1. Create a Jutoh file containing all your templates (referred to as AllTitles from now on). This is a convenience and you can even use it as the base template for your new titles from the start. For example, your bio, copyright, and Note to Readers pages can be included this way.
  2. In your AllTitles project file, open the Styles tab in Project Properties (Book->Project Properties in the menu).
  3. Create an “Only ” paragraph style for each vendor format you want to have. Use the style you would have used for the vendor links as the base so they all look the same. Finally, create an “Only ” style for a compile without any vendor links as it may be required. I call mine “Only nonspecific” and use it in the D2D and Smashwords compiles.
    TIP: If you are using the “Only ” formats for something else, add another word such as “Only BN Works” so you don’t end up changing the format in another section of your book.
  4. Open the Configurations tab in Project Properties (Book->Project Properties in the menu).
  5. Create a configuration for each vendor. Use the default ones as a base by clicking the green + sign and use the Base on existing configuration dropdown and select ePub, Mobi, etc.
    TIP: I also create a configuration for each type at that vendor as Mobi optimization is different than ePub, so for AllRomanceeBooks for example, I have an ePub, Mobi, and ODT for PDF configuration with the same Style settings.
  6. Modify the Paragraph to include field under Styles using a comma between styles and an * to do a wild card. Using the BN example above, “Only BN*” would include all paragraphs styled as either Only BN Works or Only BN.
    TIP: Export your styles and configurations when you’re done both for backup and to upload to new titles so you don’t have to manually create all these styles/configurations each time and you have consistency across releases. There’s a “save” button marked with a disk in the top right corner.
  7. Create a base document for your “other works” publications page.
  8. Add each vendor link for each title on a separate line and select the vendor style for that line.
    TIP: I originally had all the links for each vendor together, but I find it more effective to have all the links for each title in a block because you need to remove the title you are adding the master list to from the document. I exported my full document and added the style names in parentheses after each title as an example: Margaret McGaffey Fisk’s Other Works. Also note the vendor specific author page or search at the bottom. This means even my older titles provide easy access to my latest ones at the vendor of the reader’s choice. For each configuration, only one style of the set will be included.

For Each Book

  1. Confirm your Jutoh is set to allow multiple projects at one time (in the menu as View->Preferences and under the Settings section of the Projects tab).
    Jutoh Preferences-Multiple Projects
    Click to Enlarge.
  2. Open your book file as well as your AllTitles file.
  3. Import the latest versions of your styles and configuration files into your book file by clicking the open folder icon on each tab and selecting the latest saved file (make sure the book project file is selected when you go to Book->Project Properties).
    TIP: I’ve found sometimes I’ve had to delete the existing styles in the stylesheet if it has the same name because it doesn’t seem to update. The same is true with the configurations. This should only be necessary if you’re not seeing the changes (and may be because one of the checkboxes in the import process was set to preserve existing styles).
  4. Right-click your “other works” document in the AllTitles file and select copy.
  5. Select the document above where you want the “other works” to appear in your book file, right-click, and select Paste After This Document from the menu.
  6. Select the “other works” document in your book file and delete all links to the same title.
  7. Assuming you’ve set the configurations as directed and applied the styles correctly, when you compile each configuration, you will have vendor-specific eBooks.
    TIP: I would recommend confirming the ePub links using Sigil (so you don’t have to click them all) the first time you use this setup and whenever you make changes that might have disrupted the behavior.

I know it might seem complicated at first and might require you to touch areas of Jutoh where you’ve been using the defaults, but as a time saver and a way to confirm all your links are the same in all your books (so you can check once instead of risking errors each time whether typos or copy/paste issues) this is marvelous. Besides, it meets my mother’s criteria perfectly.

Any questions? Just post in the comments and I’ll try my best to answer.

This entry was posted in Indie Toolbox, Publishing, Tools and tagged . Bookmark the permalink.

Share Your Thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.