Mobi Channel Report

From AwasuWiki
Revision as of 08:00, 14 January 2011 by Kevotheclone (talk | contribs) (Really Simple Publishing: Reformatted opening HTML element to better fit the page)
Jump to: navigation, search

The Mobipocket eBook publishing format is supported by a wide variety of hardware as well as several software-based readers, such as: Calibre, Mobipocket Reader Desktop, and Kindle for PC.

One advantage of publishing your Channel Report to a Mobipocket format is that the people who are recipients of your Channel Report can bookmark and annotate their .MOBI files.

Publishing a Mobipocket eBook from Awasu is relatively easy.

In this example we're going to use Amazon.com free-to-use "KindleGen" program, which can be downloaded here.

Really Simple Publishing

Creating a Mobipocket eBook can be as simple as creating a Channel report that outputs an HTML file and then processing the HTML file with the KindleGen program.

While the Channel Report template (below) produces a fully functional Mobipocket eBook with a table of contents, your eBook experience can be further enhanced with the addition of a cover page and an index, unfortunately cover pages and indexes are beyond the scope of this wiki page.

<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
      xmlns:idx="www.mobipocket.com"
      xmlns:mbp="www.mobipocket.com">
  <head>
    <title>{%REPORT-NAME%}</title>
    <style>
        {%INCLUDE% /includes/mobi-ebook.css}
    </style>

  </head>
  <body>

<!-- Cover page -->
    <div class="cover-page">
      <p><a id="start_reading"></a></p>
      <h1>{%REPORT-NAME%}</h1>
      {%?REPORT-DESCRIPTION%}
        <p>{%REPORT-DESCRIPTION%}</p>
      {%ENDIF%}
      <p>Published: {%REPORT-TIME%}</p>
    </div>
    <mbp:pagebreak />

<!-- Table of contents -->
    <div class="table-of-contents">
      <h1 class="toc-heading">Table of Contents</h1>
      <ul>
{%REPEAT% Channels-IfGroupingItems}
        <li class="channelName">
          <a href="{%CHANNEL-METADATA% homeUrl encode=sgml chars=<&\"}">{%CHANNEL-METADATA% name}</a>
        </li>
        <ul>
  {%REPEAT% FeedItems}
          <li class="item">
            <a href="#{%ITEM-METADATA% awasuID}">{%ITEM-METADATA% name!}</a>
          </li>
  {%/REPEAT%}
        </ul>
{%/REPEAT%}
      </ul>
    </div>
    <mbp:pagebreak />

<!-- Channel Report data -->

{%REPEAT% Channels-IfGroupingItems}
    <h3 class="channelName">
      <a href="{%CHANNEL-METADATA% homeUrl encode=sgml chars=<&\"}">{%CHANNEL-METADATA% name}</a>
    </h3>

    <h4 class="channelDescription">{%CHANNEL-METADATA% description}</h4>
    {%?CHANNEL-METADATA% author}
      By: {%CHANNEL-METADATA% author}
    {%ENDIF%}
    <mbp:pagebreak />

  {%REPEAT% FeedItems }

    <div class="item">
      <h5 id="{%ITEM-METADATA% awasuID}">
        <a href="{%ITEM-METADATA% url encode=sgml chars=<&\"}">{%ITEM-METADATA% name!}</a>
      </h5>
      <p class="itemDescription">{%ITEM-METADATA% description}</p>
      <mbp:pagebreak />
    </div>
  {%/REPEAT%}

{%/REPEAT%}

  </body>
</html>

Post-processing command

The Mobi Channel Report (above) will produce an HTML file with a few custom HTML elements that provide page-break capability in the final eBook. This post-processing command will compile the HTML file into a .MOBI file, retaining the same base file name as the HTML file.

Be sure to specify the full path to the kindlegen.exe program.

Full_Path_To_KindleGen\kindlegen.exe {%REPORT-FILENAME%}

Mobipocket reference info