-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gutenberg/ moved to gutenbergtozim dump-gutenberg.py moved to gutenberg2zim
- Loading branch information
Showing
147 changed files
with
179 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% extends "base.html" %} | ||
{% block title %}{{ author.name() }}{% endblock %} | ||
{% block content %} | ||
<table class="data-table display" cellpadding="0" cellspacing="0" border="0" id="books_table"></table> | ||
<script type="text/javascript"> | ||
$( "#author_filter" ).val("{{ author.name() }}"); | ||
$( "#author_filter" ).change(); | ||
$.persistValue("author_filter", $( "#author_filter" ).val(), persist_options); | ||
showBooks(); | ||
</script> | ||
{% endblock %} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
============= | ||
gutenberg2zim | ||
============= | ||
|
||
A scraper that downloads the whole repository of [Project Gutenberg] | ||
(http://www.gutenberg.org) and puts it into a locally browsable | ||
directory and then in a ZIM file (http://www.openzim.org), a clean and | ||
user friendly format for storing content for offline usage. | ||
|
||
------------ | ||
Dependencies | ||
------------ | ||
|
||
Ubuntu/debian | ||
------------- | ||
|
||
.. code-block:: sh | ||
python-pip python-dev libxml2-dev libxslt-dev advancecomp jpegoptim pngquant p7zip-full gifsicle | ||
macOS | ||
----- | ||
|
||
.. code-block:: sh | ||
brew install advancecomp jpegoptim pngquant p7zip gifsicle | ||
------ | ||
Usage | ||
------ | ||
|
||
.. code-block:: sh | ||
gutenberg2zim | ||
By default (no argument), it runs all the steps: download, parse, export and zim. | ||
|
||
|
||
.. code-block:: sh | ||
-h --help Display this help message | ||
-y --wipe-db Do not wipe the DB during parse stage | ||
-F --force Redo step even if target already exist | ||
-l --languages=<list> Comma-separated list of lang codes to filter export to (preferably ISO 639-1, else ISO 639-3) | ||
-f --formats=<list> Comma-separated list of formats to filter export to (epub, html, pdf, all) | ||
-m --mirror=<url> Use URL as base for all downloads. | ||
-r --rdf-folder=<folder> Don't download rdf-files.tar.bz2 and use extracted folder instead | ||
-e --static-folder=<folder> Use-as/Write-to this folder static HTML | ||
-z --zim-file=<file> Write ZIM into this file path | ||
-t --zim-title=<title> Set ZIM title | ||
-n --zim-desc=<description> Set ZIM description | ||
-d --dl-folder=<folder> Folder to use/write-to downloaded ebooks | ||
-u --rdf-url=<url> Alternative rdf-files.tar.bz2 URL | ||
-b --books=<ids> Execute the processes for specific books, separated by commas, or dashes for intervals | ||
-c --concurrency=<nb> Number of concurrent process for download and parsing tasks | ||
-x --zim-title=<title> Custom title for the ZIM file | ||
-q --zim-desc=<desc> Custom description for the ZIM file | ||
--check Check dependencies | ||
--prepare Download & extract rdf-files.tar.bz2 | ||
--parse Parse all RDF files and fill-up the DB | ||
--download Download ebooks based on filters | ||
--export Export downloaded content to zim-friendly static HTML | ||
--dev Exports *just* Home+JS+CSS files (overwritten by --zim step) | ||
--zim Create a ZIM file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# vim: ai ts=4 sts=4 et sw=4 nu | ||
|
||
""" Project Gutemberg ZIM creator for Offline Use """ | ||
|
||
from codecs import open | ||
|
||
from setuptools import setup, find_packages | ||
|
||
with open('pypi-readme.rst', 'r', 'utf-8') as f: | ||
readme = f.read() | ||
|
||
with open('requirements.pip', 'r') as f: | ||
requirements = [l.strip() for l in f.readlines() if len(l.strip())] | ||
|
||
setup( | ||
name='gutenberg2zim', | ||
version="1.0", | ||
description=__doc__, | ||
long_description=readme, | ||
author="Kiwix", | ||
author_email="reg@kiwix.org", | ||
url='http://github.com/kiwix/gutenberg', | ||
keywords="gutenberg zim kiwix openzim offline", | ||
license="GNU GPL", | ||
packages=find_packages('.'), | ||
zip_safe=False, | ||
platforms='any', | ||
include_package_data=True, | ||
package_data={'': ['pypi-readme.rst', 'LICENSE']}, | ||
package_dir={'gutenberg': 'gutenberg'}, | ||
install_requires=requirements, | ||
scripts=['gutenberg2zim'], | ||
classifiers=[ | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)' | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3.6', | ||
], | ||
) |