geometer / book_tools Goto Github PK
View Code? Open in Web Editor NEWSome python code used on FBReader® book network
Home Page: https://books.fbreader.org/
License: MIT License
Some python code used on FBReader® book network
Home Page: https://books.fbreader.org/
License: MIT License
Python library used on FBReader® book network (https://books.fbreader.org/) + some command line tools based on the library Command line tools: ./create_opds.py: OPDS catalog file creator (takes list of books + some metainfo) ./encrypt.py: Marlin ePub encryptor OPDS creation tool takes list of book urls (+some feed meta information) as input. Sample catalog description can be found in ./sample/catalog.description. Supported book formats: ePub mobi (a.k.a. azw3) fb2 fb2.zip How to create sample OPDS catalog: ./create_opds.py ./sample/catalog.description Catalog files will be created in './opds'. Run ./create_opds.py -h for more information.
Добрый день.
Хотелось бы получать в opds такую же структуру, как и на файловой системе. Как мне кажется - это более логично было бы и более удобно.
Заранее спасибо.
Unexpected error:
$ ./create_opds.py samples/catalog.description
Warning: feed "icon" attribute is not specified
Warning: feed "author_email" attribute is not specified
Traceback (most recent call last):
File "./create_opds.py", line 221, in <module>
create_opds(params.description_file, params.output_dir, working_dir)
File "./create_opds.py", line 193, in create_opds
add_entry(root, urls, output_dir, working_dir)
File "./create_opds.py", line 127, in add_entry
etree.SubElement(entry, etree.QName(NS_ATOM, 'summary'), type='html').text = book.description
File "lxml.etree.pyx", line 953, in lxml.etree._Element.text.__set__ (src/lxml/lxml.etree.c:44956)
File "apihelpers.pxi", line 677, in lxml.etree._setNodeText (src/lxml/lxml.etree.c:20273)
File "apihelpers.pxi", line 1395, in lxml.etree._utf8 (src/lxml/lxml.etree.c:26485)
ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters
Content of description file:
[feed]
id = http://dmitriy.lyalyuev.info/books/
title = Personal library
subtitle = My family lybrary
author_name = Dmitriy Lyalyuev
author_uri = http://dmitriy.lyalyuev.info/
[book]
url = http://dmitriy.lyalyuev.info/books/Veyr_Marsianin.348577.fb2.zip
[book]
url = http://dmitriy.lyalyuev.info/books/Frei/Hroniki_Eho/Fray_Hroniki-Eho_8_Tuburskaya-igra.333061.fb2.zip
[book]
url = http://dmitriy.lyalyuev.info/books/Frei/Hroniki_Eho/Fray_Hroniki-Eho_6_Obzhora-hohotun-Istoriya-rasskazannaya-serom-Melifaro.202033.fb2.zip
[book]
url = http://dmitriy.lyalyuev.info/books/Frei/Hroniki_Eho/Fray_Hroniki-Eho_1_Chub-zemli-Tulanskiy-detektiv.173193.fb2.zip
[book]
url = http://dmitriy.lyalyuev.info/books/Frei/Hroniki_Eho/Fray_Hroniki-Eho_3_Neulovimyy-Habba-Hen.173195.fb2.zip
[book]
url = http://dmitriy.lyalyuev.info/books/Frei/Hroniki_Eho/Fray_Hroniki-Eho_7_Dar-Shavanaholy-Istoriya-rasskazannaya-serom-Maksom-iz-Eho.262444.fb2.zip
[book]
url = http://dmitriy.lyalyuev.info/books/Frei/Hroniki_Eho/Fray_Hroniki-Eho_2_Vlastelin-Mormory.173194.fb2.zip
[book]
url = http://dmitriy.lyalyuev.info/books/Frei/Hroniki_Eho/Fray_Hroniki-Eho_5_Gore-gospodina-Gro.173197.fb2.zip
[book]
url = http://dmitriy.lyalyuev.info/books/Frei/Hroniki_Eho/Fray_Hroniki-Eho_4_Vorona-na-mostu.173196.fb2.zip
[book]
url = http://dmitriy.lyalyuev.info/books/Dzhon_Perkins__Ispoved_ekonomicheskogo_ubiycy.fb2.zip
[book]
url = http://dmitriy.lyalyuev.info/books/Berezin_Voyna-2010_1_Voyna-2010-Ukrainskiy-front.177475.fb2.zip
[book]
url = http://dmitriy.lyalyuev.info/books/Stratoplan.Ru_Iron_Man.zip
[book]
url = http://dmitriy.lyalyuev.info/books/Roberts_Shantaram.203255.fb2.zip
[book]
url = http://dmitriy.lyalyuev.info/books/Zhvaneckiy_Yuzhnoe-leto-Chitat-na-Severe-.358710.fb2.zip
[book]
url = http://dmitriy.lyalyuev.info/books/Buntovskiyi_S._Nezavisimaya_Ukraina_Krah.fb2.zip
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.