mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix incorrect cleanup when building simple book for tests
This commit is contained in:
parent
0ad58ef8a6
commit
f48d9a47ca
@ -51,10 +51,7 @@ def get_simple_book(fmt='epub'):
|
|||||||
build_book(x, ans, args=['--level1-toc=//h:h2', '--language=en', '--authors=Kovid Goyal',
|
build_book(x, ans, args=['--level1-toc=//h:h2', '--language=en', '--authors=Kovid Goyal',
|
||||||
'--cover=' + I('lt.png')])
|
'--cover=' + I('lt.png')])
|
||||||
finally:
|
finally:
|
||||||
try:
|
os.remove(x)
|
||||||
os.remove('index.html')
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
return ans
|
return ans
|
||||||
|
|
||||||
devnull = DevNull()
|
devnull = DevNull()
|
||||||
|
@ -1,64 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>A simple test page</title>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
|
|
||||||
<style type="text/css">
|
|
||||||
@font-face {
|
|
||||||
font-family: "Liberation Mono";
|
|
||||||
src: url(/home/kovid/work/calibre/resources/fonts/liberation/LiberationMono-Regular.ttf);
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "Liberation Mono";
|
|
||||||
src: url(/home/kovid/work/calibre/resources/fonts/liberation/LiberationMono-Italic.ttf);
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
color: DarkCyan;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
p { font-family: "Liberation Mono"; }
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h2>A simple test page</h2>
|
|
||||||
<!--lorem-->
|
|
||||||
<p>To pursue pleasure rationally encounter consequences that are extremely
|
|
||||||
painful.</p>
|
|
||||||
|
|
||||||
<p>Nor again is there anyone who loves or pursues or desires to obtain pain of
|
|
||||||
itself, because it is pain, but because occasionally circumstances occur in
|
|
||||||
which toil and pain can procure him some great pleasure. To take a trivial
|
|
||||||
example, which of us ever undertakes laborious physical exercise, except to
|
|
||||||
obtain some advantage from it? But who has any right to find fault with a man
|
|
||||||
who chooses to enjoy a pleasure that has no <em>annoying</em> consequences, or one who
|
|
||||||
avoids a pain that produces no resultant pleasure?</p>
|
|
||||||
|
|
||||||
<div style="text-align:center"><img alt="test" src="/home/kovid/work/calibre/resources/images/marked.png"></div>
|
|
||||||
|
|
||||||
<p>On the other hand.</p>
|
|
||||||
|
|
||||||
<!--/lorem-->
|
|
||||||
|
|
||||||
<h2>Another test page</h2>
|
|
||||||
|
|
||||||
<!--lorem-->
|
|
||||||
<p>The great explorer of the truth, the master-builder of human happiness. No
|
|
||||||
one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but
|
|
||||||
because those who do not know how to pursue pleasure rationally encounter
|
|
||||||
consequences that are extremely painful.</p>
|
|
||||||
|
|
||||||
<p>Nor again is there anyone who loves or pursues or desires to obtain pain of
|
|
||||||
itself, because it is pain, but because occasionally circumstances occur in
|
|
||||||
which toil and pain can procure him some great pleasure. To take a trivial
|
|
||||||
example, which of us ever undertakes laborious physical exercise, except to
|
|
||||||
obtain some advantage from it? But who has any right.</p>
|
|
||||||
<!--/lorem-->
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user