fnp
/
librarian.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
477d10c
)
Added support for <abstrakt>
author
Radek Czajka
<radekczajka@nowoczesnapolska.org.pl>
Fri, 4 Sep 2015 13:57:23 +0000
(15:57 +0200)
committer
Radek Czajka
<radekczajka@nowoczesnapolska.org.pl>
Fri, 4 Sep 2015 13:57:23 +0000
(15:57 +0200)
librarian/epub.py
patch
|
blob
|
history
librarian/epub/xsltScheme.xsl
patch
|
blob
|
history
librarian/fb2.py
patch
|
blob
|
history
librarian/html.py
patch
|
blob
|
history
librarian/parser.py
patch
|
blob
|
history
librarian/pdf/wl2tex.xslt
patch
|
blob
|
history
librarian/xslt/book2html.xslt
patch
|
blob
|
history
librarian/xslt/book2txt.xslt
patch
|
blob
|
history
diff --git
a/librarian/epub.py
b/librarian/epub.py
index
bf58a9f
..
6a1b2ce
100644
(file)
--- a/
librarian/epub.py
+++ b/
librarian/epub.py
@@
-501,6
+501,9
@@
def transform(wldoc, verbose=False,
for flag in flags:
document.edoc.getroot().set(flag, 'yes')
for flag in flags:
document.edoc.getroot().set(flag, 'yes')
+ document.clean_ed_note()
+ document.clean_ed_note('abstrakt')
+
# add editors info
editors = document.editors()
if editors:
# add editors info
editors = document.editors()
if editors:
diff --git
a/librarian/epub/xsltScheme.xsl
b/librarian/epub/xsltScheme.xsl
index
1c066d9
..
bcb3d70
100644
(file)
--- a/
librarian/epub/xsltScheme.xsl
+++ b/
librarian/epub/xsltScheme.xsl
@@
-323,6
+323,7
@@
<xsl:template match="uwaga" />
<xsl:template match="nota_red" />
<xsl:template match="uwaga" />
<xsl:template match="nota_red" />
+ <xsl:template match="abstrakt" />
<!--pominięcie tych metadanych-->
<xsl:template match="rdf:RDF" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" />
<!--pominięcie tych metadanych-->
<xsl:template match="rdf:RDF" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" />
diff --git
a/librarian/fb2.py
b/librarian/fb2.py
index
d979566
..
a1cece4
100644
(file)
--- a/
librarian/fb2.py
+++ b/
librarian/fb2.py
@@
-50,6
+50,9
@@
def transform(wldoc, verbose=False,
for flag in flags:
document.edoc.getroot().set(flag, 'yes')
for flag in flags:
document.edoc.getroot().set(flag, 'yes')
+ document.clean_ed_note()
+ document.clean_ed_note('abstrakt')
+
style_filename = os.path.join(os.path.dirname(__file__), 'fb2/fb2.xslt')
style = etree.parse(style_filename)
style_filename = os.path.join(os.path.dirname(__file__), 'fb2/fb2.xslt')
style = etree.parse(style_filename)
diff --git
a/librarian/html.py
b/librarian/html.py
index
6115b31
..
24d506f
100644
(file)
--- a/
librarian/html.py
+++ b/
librarian/html.py
@@
-50,6
+50,7
@@
def transform(wldoc, stylesheet='legacy', options=None, flags=None):
document.edoc.getroot().set(flag, 'yes')
document.clean_ed_note()
document.edoc.getroot().set(flag, 'yes')
document.clean_ed_note()
+ document.clean_ed_note('abstrakt')
if not options:
options = {}
if not options:
options = {}
diff --git
a/librarian/parser.py
b/librarian/parser.py
index
e06c4d7
..
19ec32d
100644
(file)
--- a/
librarian/parser.py
+++ b/
librarian/parser.py
@@
-155,10
+155,10
@@
class WLDocument(object):
return unmerged
return unmerged
- def clean_ed_note(self):
+ def clean_ed_note(self
, note_tag='nota_red'
):
""" deletes forbidden tags from nota_red """
""" deletes forbidden tags from nota_red """
- for node in self.edoc.xpath('|'.join('//
nota_red//%s' % tag
for tag in
+ for node in self.edoc.xpath('|'.join('//
%s//%s' % (note_tag, tag)
for tag in
('pa', 'pe', 'pr', 'pt', 'begin', 'end', 'motyw'))):
tail = node.tail
node.clear()
('pa', 'pe', 'pr', 'pt', 'begin', 'end', 'motyw'))):
tail = node.tail
node.clear()
diff --git
a/librarian/pdf/wl2tex.xslt
b/librarian/pdf/wl2tex.xslt
index
4d7ff03
..
c278981
100644
(file)
--- a/
librarian/pdf/wl2tex.xslt
+++ b/
librarian/pdf/wl2tex.xslt
@@
-515,6
+515,7
@@
<xsl:template match="extra|uwaga" mode="inline" />
<xsl:template match="nota_red" />
<xsl:template match="extra|uwaga" mode="inline" />
<xsl:template match="nota_red" />
+<xsl:template match="abstrakt" />
<!-- ======== -->
<!-- = TEXT = -->
<!-- ======== -->
<!-- = TEXT = -->
diff --git
a/librarian/xslt/book2html.xslt
b/librarian/xslt/book2html.xslt
index
9a2b771
..
ca7cdbd
100644
(file)
--- a/
librarian/xslt/book2html.xslt
+++ b/
librarian/xslt/book2html.xslt
@@
-354,6
+354,7
@@
<xsl:template match="extra|uwaga" mode="inline" />
<xsl:template match="nota_red" />
<xsl:template match="extra|uwaga" mode="inline" />
<xsl:template match="nota_red" />
+<xsl:template match="abstrakt" />
<!-- ======== -->
<!-- = TEXT = -->
<!-- ======== -->
<!-- = TEXT = -->
diff --git
a/librarian/xslt/book2txt.xslt
b/librarian/xslt/book2txt.xslt
index
a578492
..
a8bb9f1
100644
(file)
--- a/
librarian/xslt/book2txt.xslt
+++ b/
librarian/xslt/book2txt.xslt
@@
-342,6
+342,7
@@
<xsl:template match="extra|uwaga" mode="inline" />
<xsl:template match="nota_red" />
<xsl:template match="extra|uwaga" mode="inline" />
<xsl:template match="nota_red" />
+<xsl:template match="abstrakt" />
<!-- ======== -->
<!-- = TEXT = -->
<!-- ======== -->
<!-- = TEXT = -->