Mobi Channel Report

From AwasuWiki
Revision as of 07:35, 23 September 2010 by Kevotheclone (talk | contribs) (First Draft)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Draft content, not ready for publication!

The Mobipocket eBook publishing format is support by a wide variety of hardware as well as several software-based readers.

Publishing an Mobipocket eBook from Awasu is relatively easy.

In these examples 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 precessing 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 eBbook 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/ebook.css}
    </style>

    <style type="text/css">
    h1, h3
    {
      font-family: Tahoma, Verdana, Arial, sans-serif;
      font-weight: bold;
      margin-bottom: 10%;
      margin-top: 40%;
    }

    .toc-heading
    {
      margin-top: 0%;
      text-align: center;
    }

    li.channelName
    {
      margin-top: 10%;
    }
    div.item
    {
      margin-bottom: 20px;
      padding: 10px;
    }

    div.item h5
    {
    }
    
    p.itemDescription
    {
      margin-top: 50px;
      padding-top: 50px;
    }

    </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>
            <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

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

Mobipocket reference info