From 2f704d22ddbb461e0c84d709429a9a5dacfa00ed Mon Sep 17 00:00:00 2001
From: Jan Szejko
Date: Thu, 10 Mar 2016 19:52:37 +0100
Subject: [PATCH] local changes from server
---
book2epub | 23 +
book2mobi | 19 +
book2pdf | 24 +
librarian/dcparser.py | 2 +-
librarian/epub.py | 5 +-
librarian/epub/xsltLast.xsl | 8 +-
librarian/epub/xsltTitle.xsl | 7 +-
librarian/fonts/DroidSans.ttf | Bin 0 -> 190044 bytes
librarian/fonts/EBGaramond-Regular.ttf | Bin 0 -> 231904 bytes
librarian/pdf.py | 23 +-
librarian/pdf/wl.cls | 41 +-
librarian/pdf/wl2tex.xslt | 17 +-
librarian/res/cover-arta-tech.jpg | Bin 0 -> 290014 bytes
librarian/res/fnp-logo.eps | 262 +++++
librarian/res/koed-logo.eps | 449 ++++++++
librarian/res/koedlogo.png | Bin 0 -> 3012 bytes
librarian/res/logo-fio.jpg | Bin 0 -> 70473 bytes
librarian/res/nowoczesnapolska.org.pl.png | Bin 0 -> 6541 bytes
librarian/res/ofop-logo.png | Bin 0 -> 74070 bytes
librarian/res/prawokultury-logo.png | Bin 0 -> 4500 bytes
librarian/res/trust-logo.eps | Bin 0 -> 673962 bytes
librarian/xslt/book2html.xslt | 63 +-
podrecznik.pdf | Bin 0 -> 485467 bytes
podrecznik.tex | 500 +++++++++
podrecznik.xml | 1150 +++++++++++++++++++++
samochod.png | Bin 0 -> 46880 bytes
szofere.png | Bin 0 -> 127865 bytes
27 files changed, 2552 insertions(+), 41 deletions(-)
create mode 100755 book2epub
create mode 100755 book2mobi
create mode 100755 book2pdf
create mode 100644 librarian/fonts/DroidSans.ttf
create mode 100644 librarian/fonts/EBGaramond-Regular.ttf
create mode 100644 librarian/res/cover-arta-tech.jpg
create mode 100644 librarian/res/fnp-logo.eps
create mode 100644 librarian/res/koed-logo.eps
create mode 100644 librarian/res/koedlogo.png
create mode 100644 librarian/res/logo-fio.jpg
create mode 100644 librarian/res/nowoczesnapolska.org.pl.png
create mode 100644 librarian/res/ofop-logo.png
create mode 100644 librarian/res/prawokultury-logo.png
create mode 100644 librarian/res/trust-logo.eps
create mode 100644 podrecznik.pdf
create mode 100644 podrecznik.tex
create mode 100644 podrecznik.xml
create mode 100644 samochod.png
create mode 100644 szofere.png
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]
-
+