ePUB Watermarker: Suggestions Please!

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

ePUB Watermarker: Suggestions Please!

Unread postby Tim Green » Mon Aug 22, 2016 9:50 am

In a recent discussion with a customer it became clear that adding a personal "watermark" to ePub books is the best way to prevent casual piracy (and it's not even worth trying to prevent professional piracy). Basically all you need is a personalized copy of the book for each customer, with "Licensed to Customer Name" in the rights field in the ePub properties, and optionally also on one of the opening pages in the book itself. You can generate personalized copies with Help+Manual, but reconfiguring and recompiling every single one is time-consuming. My idea is to create a little command line utility that can do it for you, which you can then combine with digital signing.

This is still in the basic brainstorming phase. What I need to know is what functionality would make it most useful for you. At the moment I'm looking at the following basics:

  • Command-line only with standard exit codes for integration in batch files.
  • Parameters can be read for an individual book with command line switches or for multiple books from an external file.
  • Basic parameters are 1) License text to use ("Licensed to "); 2) Customer name 3) Optional ID of a topic where the license reference is to go in addition to the rights property 4) Source file 5) Output folder
Then there is the question of the output file name: If you're processing a list of orders in a file you'll want to be able to identify the output files that you're going to send. There are a couple of possible ways of doing this:

  • Add the customer name or a reference code to the output file name.
  • Create an output folder with the customer name in it.
  • Simply use the single-output version with the command line switches rather than a list from a file. Then processing passes directly on to your batch process, which takes the output file and does whatever is necessary (for example mailing it to the customer etc).
Then there's the question of the external file with the list of customer names. The options would be INI format or comma-separated. Personally I feel it would be easiest to have one set of comma-separated values on each line. That should also be the easiest to generate.
That's an outline of the basic ideas. Suggestions and wishes? 8)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Tim Green
Site Admin
 
Posts: 19412
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany

Re: ePUB Watermarker: Suggestions Please!

Unread postby julio » Fri Sep 09, 2016 12:42 pm

I would like to suggest a change in the way watermark options are loaded. I know that INI files are very simple and effective, but I would like to suggest using more modern data formats, such as XML or JSON.
For example, this is how config options would look like in JSON:
Code: Select all
{
  "config": {
    "inputfile":"C:\\Scratch\\NewEpub.epub",
    "outputfolder":"C:\\Scratch\\Output\\",
    "license":"Licensed to ",
    "log":"C:\\Scratch\\logfile.log",
    "topicid":"introduction",
    "modifier":0
  },
  "users": [{
    "name":"Joe Bloggs",
    "license":"",
    "outputfile":"Joe_Bloggs.epub",
    "modifier":0
    }, {
    "name":"Doris Day",
    "license":"",
    "outputfile":"",
    "modifier":1279
    }, {
    "name":"Jim Smith",
    "license":"",
    "outputfile":"",
    "modifier":0
    }, {
    "name":"Sergio Leone",
    "license":"",
    "outputfile":"",
    "modifier":0
    }, {
    "name":"Claudia Cardinale",
    "license":"",
    "outputfile":"",
    "modifier":0
    }
  ]
}


And this is how config options would look like in XML:
Code: Select all
<?xml version="1.0" encoding="utf-8" ?>
<root>
  <config>
    <inputfile>C:\Scratch\NewEpub.epub</inputfile>
    <outputfolder>C:\Scratch\Output\</outputfolder>
    <license>Licensed to</license>
    <log>C:\Scratch\logfile.log</log>
    <topicid>introduction</topicid>
    <modifier>0</modifier>
  </config>
  <users>
    <user>
      <name>Joe Bloggs</name>
      <license></license>
      <outputfile>Joe_Bloggs.epub</outputfile>
      <modifier>0</modifier>
    </user>
    <user>
      <name>Doris Day</name>
      <license></license>
      <outputfile></outputfile>
      <modifier>1279</modifier>
    </user>
    <user>
      <name>Jim Smith</name>
      <license></license>
      <outputfile></outputfile>
      <modifier>0</modifier>
    </user>
    <user>
      <name>Sergio Leone</name>
      <license></license>
      <outputfile></outputfile>
      <modifier>0</modifier>
    </user>
    <user>
      <name>Claudia Cardinale</name>
      <license></license>
      <outputfile></outputfile>
      <modifier>0</modifier>
    </user>
  </users>
</root>


Thanks.
User avatar
julio
 
Posts: 72
Joined: Wed May 28, 2008 12:06 am
Location: Porto Alegre, RS - Brasil

Re: ePUB Watermarker: Suggestions Please!

Unread postby Tim Green » Fri Sep 09, 2016 2:31 pm

Hi Julio,

I considered both JSON and XML but rejected them because that would massively reduce the number of people for whom this would be useful.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
Tim Green
Site Admin
 
Posts: 19412
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany


Return to Help & Manual 7 Forum

Who is online

Users browsing this forum: No registered users and 2 guests

cron