Save the category of site tululu.org offline
Description
The program downloads from tululu.org books in text format and their covers. The following information is also downloaded to the json file:
- title;
- author;
- image path;
- book path;
- comments;
- genres.
After downloading the necessary data, the offline version of the site will be generated (you can see an example here).
Table of content
Installation
Install using pip:
pip install tululu-offline
How to use
tululu-offline [OPTIONS]
Options
category_url- the category url tululu.org;--start_page- which page to start downloading;--end_page- on which page to finish downloading;--dest_folder- path to the directory with parsing results: pictures, books, JSON;--skip_txt- do not download books;--skip_imgs- do not download images;--json_path- specify your path to *.json file with results;--number_of_books_per_page- number of books per page.
Example run
Run the script with the necessary parameters. For example:
tululu-offline http://tululu.org/l55/ --start_page 1 --end_page 3 --skip_txt true --skip_imgs true --number_of_books_per_page 15
The first page of the library will be available at pages/index1.html.
For developers
How to install with dev dependencies
Install using poetry:
git clone https://github.com/velivir/tululu-offline
cd tululu-offline
make install_dev
How to run:
poetry run python3 tululu_offline/app.py [OPTIONS]
Example of running a script
poetry run python3 tululu_offline/app.py http://tululu.org/l55/ --start_page 1 --end_page 5 --skip_txt true --skip_imgs true --number_of_books_per_page 10
Start render website
Run the file render_website.py with the following options:
category_url- the category url tululu.org;--dest_folder- path to the directory with parsing results: pictures, books, JSON;--json_path- specify your path to *.json file with results;--number_of_books_per_page- number of books per page.
Example:
poetry run python3 tululu_offline/render_website.py http://tululu.org/l55/ --number_of_books_per_page 10 --json_path result/books.json --dest_folder result
How to run lint files
make lint
How to run tests
make test
License
Tululu-offline is licensed under the MIT License. See LICENSE for more information.
Project goal
The code is written for educational purposes in an online course for web developers dvmn.org.
Metadata
Release files for tululu-offline 1.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tululu-offline-1.0.6.tar.gz | 413.1 kB | Without provenance | Details for tululu-offline-1.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tululu_offline-1.0.6-py3-none-any.whl | Python 3 | none | any | Details for tululu_offline-1.0.6-py3-none-any.whl |
Total release size: 827.4 kB
Release files / tululu-offline-1.0.6.tar.gz
| Download URL | tululu-offline-1.0.6.tar.gz |
|---|---|
| Size | 413.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8ba9ec84902a968132c9b95b44724c872cddf75f1a03f968dfa4843df6b2d062
|
|
BLAKE2b-256 checksum How to use checksums |
ad46306b28d22a7bc92184c823018849ead8c3893805d19788bc61e404581f0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.7.3 Linux/5.3.0-53-generic
|
Release files / tululu_offline-1.0.6-py3-none-any.whl
| Download URL | tululu_offline-1.0.6-py3-none-any.whl |
|---|---|
| Size | 414.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
802f607568736bb368866ca98de60ae9a08988baf76020f6ef0842c4e425bc89
|
|
BLAKE2b-256 checksum How to use checksums |
aac6fae0d65a268d6add859e81edfb6e0a07471b4a0b86ea03d85e7831ad857f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.5 CPython/3.7.3 Linux/5.3.0-53-generic
|
Security for tululu-offline 1.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.