Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Kindle dictionary template

Kindle dictionary template

Use it with KindleGen

kindlegen dic.opf

<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>Sample Dictionary</title>
<h1>Sample Dictionary</h1>
<h2>by John Doe</h2>
<mbp:pagebreak />
<a name="toc"></a>
<h1>Table of Contents</h1>
<p><a href="#langs">Languages</a></p>
<mbp:pagebreak />
<a name="langs"></a>
<idx:orth>Python</idx:orth> &mdash;
a programming language that lets you work more quickly and integrate your systems more effectively.
<idx:orth>Clojure</idx:orth> &mdash;
a dynamic programming language that targets the Java Virtual Machine (and the CLR, and JavaScript).
<idx:orth>Ruby</idx:orth> &mdash;
a dynamic, open source programming language with a focus on simplicity and productivity.
<?xml version="1.0" encoding="utf-8"?>
<package unique-identifier="uid">
<dc-metadata xmlns:dc="" xmlns:oebpackage="">
<dc:Title>Sample Dictionary</dc:Title>
<dc:Creator>John Doe</dc:Creator>
<output encoding="utf-8" content-type="text/x-oeb1-document"></output>
<!-- That's how it's recognized as a dictionary: -->
<item id="item1" media-type="text/x-oeb1-document" href="dic.html"></item>
<spine toc="toc">
<itemref idref="item1"/>
<reference type="toc" title="Table of Contents" href="dic.html#toc"></reference>

This comment has been minimized.

Copy link

@MrXyfir MrXyfir commented Jul 24, 2018

Any idea if this is still the current and proper way to do it? This information seems surprisingly hard to find; unless I'm searching for the wrong thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.