{ "info": { "author": "Andr\u00e9 Costa", "author_email": "lokal.profil@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# runeberg [![Build Status](https://travis-ci.org/lokal-profil/runeberg.svg?branch=master)](https://travis-ci.org/lokal-profil/runeberg)[![codecov.io Code Coverage](https://img.shields.io/codecov/c/github/lokal-profil/runeberg.svg)](https://codecov.io/github/lokal-profil/runeberg?branch=master)\n\nA library and command line application for downloading and parsing works from\n[Projekt Runeberg](http://runeberg.org).\n\n## Installation\n\nYou can install the Runeberg from [PyPI](https://pypi.org/project/runeberg/):\n\n pip install runeberg\n\nIt is supported on Python 3.6 and above.\n\n## Usage as a command line application\n\nAfter installing `runeberg` simply call the program to get a paged output of\nworks to download, follow the prompts to download (and unpack) the files.\n```console\n$ runeberg\n1. \"Det Ringer!\" Sk\u00e4mt i en akt (1902) by Helena Nyblom [sv]\n2. \"D\u00e5 sa' kungen...\" : Kungliga anekdoter under hundra \u00e5r (1946) by ? [sv]\n3. \"Pastoralier\" (1899) by August Olsson [sv]\n4. \"The Ripper\" (uppsk\u00e4raren) (1892) by Adolf Paul [sv]\n5. 100 Pr\u00e6stehistorier eller Pr\u00e6stestandens lyse og m\u00f8rke Sider (1893) by Nils Poulsen [no]\n6. 14 Descriptive Pieces for the Young for Piano (1895) by Sveinbj\u00f6rn Sveinbj\u00f6rnsson [en]\n7. 14 sovjetryska ber\u00e4ttare : valda och \u00f6versatta fr\u00e5n ryskan (1929) by ? [sv]\n8. 16 \u00e5r med Roald Amundsen. Fra Pol til Pol (1930) by Oscar Wisting [no]\n9. 1720, 1772, 1809 (1836) by Magnus Crusenstolpe [sv]\n\u2026\nWhat do you want to do? [1\u201325] to download, [N]ext 25, [Q]uit: \u2588\n```\n\nUse the `-a` flag to start with a list of authors for which a filtered list of\nworks will be presented:\n```console\n$ runeberg -a\n1. \u00dclev Aaloe (1944) [ee]\n2. Simon Aberst\u00e9n (1865\u20131937) [se]\n3. Selma Abrahamsson (1872\u20131911) [fi]\n4. Arthur Dyke Acland (1847\u20131926) [uk]\n5. Adam Bremensis (1044\u20131080) [de]\n6. Gertrud Adelborg (1853\u20131942) [se]\n7. Ottilia Adelborg (1855\u20131936) [se]\n8. Gudmund J\u00f6ran Adlerbeth (1751\u20131818) [se]\n9. Gustav Magnus Adlercreutz (1775\u20131845) [se]\n\u2026\nWhat do you want to do? [1\u201325] to display their works, [N]ext 25, [Q]uit: 6\nDisplaying works by Gertrud Adelborg [uid=adelbger]\u2026\n1. N\u00e5gra drag af de till Danmark utvandrade allmogeflickornas st\u00e4llning och arbetsf\u00f6rh\u00e5llanden (1890) by Gertrud Adelborg [sv]\n2. N\u00e5gra upplysningar ang\u00e5ende de svenska allmogeflickornas utvandring till Danmark (1893) by Gertrud Adelborg [sv]\nWhat do you want to do? [1\u20132] to download, [Q]uit: \u2588\n```\n\nUse the `-h` flag to see a full list of options and filters.\n\n## Usage as a library\n\nFirst determine the identifier of the work you wish to download. For e.g.\n this `` would be `aldrigilif`.\n```python\n# Download and unpack a work from runeberg.org:\n# this will by default download the work to /downloaded_data//\nimport runeberg.download as downloader\n\ndownloader.get_work('')\n# Warning raised if additional colour images are found, these are not unpacked.\n\n# Parse the downloaded work:\n# from the parsed work you can access individual pages, articles/chapters along\n# with any metadata\nimport runeberg\nparsed_work = runeberg.Work.from_files('')\n\n# Create a DjVu file of the work\nprint(parsed_work.to_djvu()) # outputs the path to the created file\n```\n\n## Caveats\n\nSome of the `Metadata` files are encoded in `Windows 1252` rather than the\ndefault `latin-1`. The framework does not currently detect this. If you\nencounter such a file some characters may be misinterpreted and you must\nmanually re-encode the file before parsing the work.\n\nIf the originally scanned images were `.jpg` then the downloaded \"colour\nimages\" will just be a second identical copy of these.\n\n## Requirements\n\nFor DjVu conversion `DjVuLibre` must be installed.\n\n\n# Change log\n\n## 0.0.2\n* \\[Breaking\\] Rename `ocr` prpoerty of `Page` as `text`.\n* Introduce `text` property to `Work` and `Article`.\n* Re-use djvu file generated by earlier run. Add `force` argument to avoid reuse.\n* Parse the `IMAGE_SOURCE` metadata.\n* Expand testing to py37, py38\n\n## 0.0.1\n\n* Initial PyPI release.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lokal-profil/runeberg", "keywords": "runeberg,libraries,literature", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "runeberg", "package_url": "https://pypi.org/project/runeberg/", "platform": "", "project_url": "https://pypi.org/project/runeberg/", "project_urls": { "Homepage": "https://github.com/lokal-profil/runeberg" }, "release_url": "https://pypi.org/project/runeberg/0.0.2/", "requires_dist": [ "beautifulsoup4", "html5lib", "requests", "tqdm" ], "requires_python": "", "summary": "Library for working with works from Projekt Runeberg (Runeberg.org).", "version": "0.0.2" }, "last_serial": 5631606, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "1b2fead2ce8d6188add3c0010857b214", "sha256": "a702902df513911ad0dcab08e016fa5ed12d1f316d572f7d7623d9917fd0d5f6" }, "downloads": -1, "filename": "runeberg-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "1b2fead2ce8d6188add3c0010857b214", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22972, "upload_time": "2019-06-17T20:47:40", "url": "https://files.pythonhosted.org/packages/3b/a6/990fe20bb922c917dcca95ed37e04818d4cb70acd5e9463a4123ef36155b/runeberg-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0c326897c8dbdff8829c424b5081b2d0", "sha256": "c37fa7bfba937216740963c28a3395b8264599b85acbd477d91fac8b40af6296" }, "downloads": -1, "filename": "runeberg-0.0.1.tar.gz", "has_sig": false, "md5_digest": "0c326897c8dbdff8829c424b5081b2d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18647, "upload_time": "2019-06-17T20:47:42", "url": "https://files.pythonhosted.org/packages/d7/94/ce49489237711f57ddc43403e05fad19f7c1ddf36a75939eccc0d50427c3/runeberg-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "50c183fa41843103df7cc296a7c2a136", "sha256": "40585fce5d7fa9dc065c80162e44093c65c1bdcf7a220d6b3ac9fc008f784632" }, "downloads": -1, "filename": "runeberg-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "50c183fa41843103df7cc296a7c2a136", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23618, "upload_time": "2019-08-04T21:23:52", "url": "https://files.pythonhosted.org/packages/ee/ff/3404bd47fbc4dec30a815880ffb9e38674d5d3f1d95dd5aa67a6415789f7/runeberg-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7ee38476f71fdd548087a35ea9deb7f2", "sha256": "18fa4a83a96e81b9ad67b1037e859b7dc6d61c29ad6e6a58206b5f2a203505bc" }, "downloads": -1, "filename": "runeberg-0.0.2.tar.gz", "has_sig": false, "md5_digest": "7ee38476f71fdd548087a35ea9deb7f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20963, "upload_time": "2019-08-04T21:23:54", "url": "https://files.pythonhosted.org/packages/fb/91/1d9fdab573baad80fd33cac5cbe87f7cee9ad2a5c4d4d8b09b0e9eaaa0e0/runeberg-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "50c183fa41843103df7cc296a7c2a136", "sha256": "40585fce5d7fa9dc065c80162e44093c65c1bdcf7a220d6b3ac9fc008f784632" }, "downloads": -1, "filename": "runeberg-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "50c183fa41843103df7cc296a7c2a136", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23618, "upload_time": "2019-08-04T21:23:52", "url": "https://files.pythonhosted.org/packages/ee/ff/3404bd47fbc4dec30a815880ffb9e38674d5d3f1d95dd5aa67a6415789f7/runeberg-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7ee38476f71fdd548087a35ea9deb7f2", "sha256": "18fa4a83a96e81b9ad67b1037e859b7dc6d61c29ad6e6a58206b5f2a203505bc" }, "downloads": -1, "filename": "runeberg-0.0.2.tar.gz", "has_sig": false, "md5_digest": "7ee38476f71fdd548087a35ea9deb7f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20963, "upload_time": "2019-08-04T21:23:54", "url": "https://files.pythonhosted.org/packages/fb/91/1d9fdab573baad80fd33cac5cbe87f7cee9ad2a5c4d4d8b09b0e9eaaa0e0/runeberg-0.0.2.tar.gz" } ] }