updates
parent
4564cb6d15
commit
1d18a15e76
@ -1,9 +1,9 @@
|
||||
PANDOC = "pandoc"
|
||||
EPUB_PATH = None
|
||||
MAKE = "make"
|
||||
MAKEFILE = "/home/murtaugh/projects/DPT/hybrideditor/cgi-bin/makefile"
|
||||
MAKEFILE = None
|
||||
PROJECT_PATH = "./projects"
|
||||
PROJECT_URL = "/projects/" # must end with /
|
||||
EDITOR_URL = "/cgi-bin/hype.cgi"
|
||||
|
||||
SAMPLE_PROJECT_PATH = "projects/sample"
|
||||
SAMPLE_PROJECT_PATH = "projects/sample"
|
||||
|
@ -0,0 +1,9 @@
|
||||
How to create a simple EPUB
|
||||
===========================
|
||||
|
||||
* Drag in files in either saved in the DOCX (.docx) or Markdown (.md) format.
|
||||
* Gray links will appear for conversion.
|
||||
* Click on the publication.epub to create it.
|
||||
|
||||
The _styles.css_ file is the main stylesheet of the EPUB.
|
||||
|
@ -0,0 +1,51 @@
|
||||
#
|
||||
# DEVELOPERS:
|
||||
#
|
||||
# This is the projects makefile
|
||||
# It determines how source files get converted
|
||||
# into an EPUB
|
||||
|
||||
# You can change this file to adjust the process
|
||||
# and add new outputs.
|
||||
|
||||
DOCX=$(shell ls *.docx)
|
||||
DOCX_MD = $(DOCX:%.docx=%.md)
|
||||
scripts=/usr/lib/cgi-bin
|
||||
sources=$(shell python $(scripts)/sources.py)
|
||||
|
||||
all: publication.epub publication.icml publication.gif
|
||||
|
||||
publication.epub: metadata.txt publication.md styles.css
|
||||
pandoc metadata.txt publication.md \
|
||||
--table-of-contents \
|
||||
--epub-stylesheet styles.css \
|
||||
-o publication.epub
|
||||
|
||||
publication.icml: publication.md styles.css
|
||||
pandoc publication.md --to ICML -o publication.icml
|
||||
|
||||
# Concatenate all Markdown sources into a single file
|
||||
# Adding the filename as a unique identifier for footnotes
|
||||
#publication.md: $(sources)
|
||||
# cat $(sources) > publication.md
|
||||
|
||||
publication.gif: publication.epub styles.css
|
||||
python $(scripts)/epubtrailer.py $< --background "#EEEEEE" --width 320 --height 240 --duration=0.5 -o $@
|
||||
|
||||
publication.md: metadata.txt $(sources) $(DOCX_MD)
|
||||
rm -f $@
|
||||
cat metadata.txt > $@
|
||||
$(foreach c,$(sources),pandoc --to markdown --id-prefix=$(c) $(c) >> $@; echo >> $@; echo >> $@;)
|
||||
echo "The End" >> $@
|
||||
|
||||
# cat metadata.txt >> $@
|
||||
# $(scripts)/expand_toc.py toc.md --filter $(scripts)/chapter.sh | \
|
||||
# python $(scripts)/enable_links_markdown.py >> $@
|
||||
|
||||
# MARKDOWN <= DOCX
|
||||
%.md: %.docx
|
||||
pandoc $< -o $@
|
||||
|
||||
# special rule for debugging variable names in this makefile
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
title: Title of book
|
||||
author: Luther Blisset
|
||||
rights: Creative Commons Non-Commercial Share Alike 3.0
|
||||
language: en-UK
|
||||
...
|
@ -0,0 +1,48 @@
|
||||
/*
|
||||
This is the projects style sheet.
|
||||
You can control the visual properties of your EPUB here.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 5%;
|
||||
text-align: justify;
|
||||
font-size: medium;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
h1,h2,h3,h4,h5 {
|
||||
font-family: sans-serif;
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
code { font-family: monospace; }
|
||||
h1 { text-align: left; }
|
||||
h2 { text-align: left; }
|
||||
h3 { text-align: left; }
|
||||
h4 { text-align: left; }
|
||||
h5 { text-align: left; }
|
||||
h6 { text-align: left; }
|
||||
|
||||
a {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px dotted blue;
|
||||
}
|
||||
|
||||
a.footnoteRef, a.footnote_backlink {
|
||||
padding: 2px;
|
||||
font-size: 60%;
|
||||
border-bottom: 1px dotted blue;
|
||||
margin-left: 0.5em;
|
||||
margin-right: 0.5em;
|
||||
position: relative;
|
||||
top: -0.1em;
|
||||
color: blue;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
a
|
||||
#cover-image img {
|
||||
max-width: 100%;
|
||||
}
|
Loading…
Reference in New Issue