From: Jan Szejko
Date: Thu, 10 Mar 2016 18:52:37 +0000 (+0100)
Subject: local changes from server
X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/2f704d22ddbb461e0c84d709429a9a5dacfa00ed?ds=sidebyside
local changes from server
---
diff --git a/book2epub b/book2epub
new file mode 100755
index 0000000..01ca79a
--- /dev/null
+++ b/book2epub
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+#
+from librarian.book2anything import Book2Anything, Option
+
+
+class Book2Epub(Book2Anything):
+ format_name = "EPUB"
+ ext = "epub"
+ uses_cover = True
+ uses_provider = True
+ transform_flags = [
+ Option('-w', '--working-copy', dest='working-copy',
+ action='store_true', default=False,
+ help='mark the output as a working copy')
+ ]
+
+
+if __name__ == '__main__':
+ Book2Epub.run()
diff --git a/book2mobi b/book2mobi
new file mode 100755
index 0000000..f477a83
--- /dev/null
+++ b/book2mobi
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+#
+from librarian.book2anything import Book2Anything
+
+
+class Book2Mobi(Book2Anything):
+ format_name = "MOBI"
+ ext = "mobi"
+ uses_cover = True
+ cover_optional = False
+ uses_provider = True
+
+
+if __name__ == '__main__':
+ Book2Mobi.run()
diff --git a/book2pdf b/book2pdf
new file mode 100755
index 0000000..ccb5fac
--- /dev/null
+++ b/book2pdf
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+#
+from librarian.book2anything import Book2Anything, Option
+
+
+class Book2Pdf(Book2Anything):
+ format_name = "PDF"
+ ext = "pdf"
+ uses_cover = True
+ uses_provider = True
+ transform_options = [
+ Option('-t', '--save-tex', dest='save_tex', metavar='FILE',
+ help='path to save the intermediary LaTeX file to'),
+ Option('-m', '--morefloats', dest='morefloats', metavar='old/new/none',
+ help='force morefloats in old (<1.0c), new (>=1.0c) or none')
+ ]
+
+
+if __name__ == '__main__':
+ Book2Pdf.run()
diff --git a/librarian/dcparser.py b/librarian/dcparser.py
index eddd8e5..7dfcd21 100644
--- a/librarian/dcparser.py
+++ b/librarian/dcparser.py
@@ -25,7 +25,7 @@ class Person(object):
@classmethod
def from_text(cls, text):
- parts = [ token.strip() for token in text.split(',') ]
+ parts = [ token.strip() for token in text.rsplit(',', 1) ]
if len(parts) == 1:
surname = parts[0]
names = []
diff --git a/librarian/epub.py b/librarian/epub.py
index 10922d4..211ed06 100644
--- a/librarian/epub.py
+++ b/librarian/epub.py
@@ -435,8 +435,9 @@ def transform(wldoc, verbose=False,
'' \
'')
- zip.write(get_resource('res/wl-logo-small.png'), os.path.join('OPS', 'logo_wolnelektury.png'))
- zip.write(get_resource('res/jedenprocent.png'), os.path.join('OPS', 'jedenprocent.png'))
+ #zip.write(get_resource('res/wl-logo-small.png'), os.path.join('OPS', 'logo_wolnelektury.png'))
+ zip.write(get_resource('res/koedlogo.png'), os.path.join('OPS', 'logo_koed.png'))
+ #zip.write(get_resource('res/jedenprocent.png'), os.path.join('OPS', 'jedenprocent.png'))
if not style:
style = get_resource('epub/style.css')
zip.write(style, os.path.join('OPS', 'style.css'))
diff --git a/librarian/epub/xsltLast.xsl b/librarian/epub/xsltLast.xsl
index 5288443..ced13ff 100644
--- a/librarian/epub/xsltLast.xsl
+++ b/librarian/epub/xsltLast.xsl
@@ -43,7 +43,7 @@
- ŹródÅo:
+
Tekst opracowany na podstawie:
@@ -81,12 +81,12 @@
-
+
diff --git a/librarian/epub/xsltTitle.xsl b/librarian/epub/xsltTitle.xsl
index 17739a8..ab70e81 100644
--- a/librarian/epub/xsltTitle.xsl
+++ b/librarian/epub/xsltTitle.xsl
@@ -40,7 +40,7 @@
[Kopia robocza]
-
+