{"id":21106617,"url":"https://github.com/miranizam/online-library","last_synced_at":"2025-03-14T09:14:29.524Z","repository":{"id":89341205,"uuid":"558882617","full_name":"MiraNizam/Online-Library","owner":"MiraNizam","description":"The script that help you to parse books and information about them posted on the site tululu.org. You can also deploy your own site with books and make it in offline format.  ","archived":false,"fork":false,"pushed_at":"2023-06-14T15:45:19.000Z","size":11197,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T03:28:18.682Z","etag":null,"topics":["argparse","beautifulsoup","css-selectors","github-pages","parser","python3","website"],"latest_commit_sha":null,"homepage":"https://miranizam.github.io/Online-Library/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MiraNizam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-28T14:10:38.000Z","updated_at":"2023-05-31T13:29:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"44c5f6fc-141d-4f9e-bcc5-474cc764a8b0","html_url":"https://github.com/MiraNizam/Online-Library","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiraNizam%2FOnline-Library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiraNizam%2FOnline-Library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiraNizam%2FOnline-Library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MiraNizam%2FOnline-Library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MiraNizam","download_url":"https://codeload.github.com/MiraNizam/Online-Library/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243551327,"owners_count":20309300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["argparse","beautifulsoup","css-selectors","github-pages","parser","python3","website"],"created_at":"2024-11-20T00:27:36.804Z","updated_at":"2025-03-14T09:14:29.500Z","avatar_url":"https://github.com/MiraNizam.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Online library\n\nWhat is it? \n\nOnline and also offline library with parser, settings and the site.\nThe script can download books(files), their descriptions, create your own library with the website. We will do it with with resources the great free online library [tululu.org](tululu.org).\n\n## Let's start:\n\n### Prerequisites\n\nPlease be sure that **Python3** is already installed. \n\n### Installing\n1. Clone the repository:\n```\ngit clone https://github.com/MiraNizam/Online-Library.git\n```\n2. Create a new virtual environment env in the directory\n```\npython -m virtualenv env\n```\n3. Activate the new environment\n```\nsource env/bin/activate\n``` \n4. Use pip (or pip3, if there is a conflict with Python2) to install dependencies in new environment:\n```\npip install -r requirements.txt\n```\n\n### How to run code (Part I):\nYou can parse: range of books, pages or full category.\n\nYou should run the script from the folder \"Online-Library\"\n\nScript has command-line interface for comfortable using. \nInterface includes the following commands: \n\nfor ```main.py```: \n\n* ```--start_id``` the start position in range for parsing, default: 1\n* ```--end_id``` the end position in range for parsing, default: 10\n\nfor ```parse_tululu_category.py```:\n\n* ```--start_page```  the start position in range for parsing, default: 1 \n* ```--end_page``` the end position in range for parsing, default: the last page in category\n* ```--dest_folder``` path to the catalogue with parse result: images and books,  as default: folders named images and books\n* ```--skip_imgs``` Don't download images, change to True. Default: False. \n* ```--skip_txt```Don't download txt, change to True. Default: False. \n* ```--json_path``` path to JSON file, as default: media\n* ```--help``` use it if you forget the information above\n\nfor ```render_website.py```:\n\n* ```--json_path``` path to JSON file, as default: media\n\nExamples:\n\nParse book in range from 1 to 10\n```\npython main.py\n```\nParse book in range from 11 to 15\n```\npython main.py --start_id=11 --end_id=15\n```\nParse full category\n```\npython parse_tululu_category.py\n```\nParse page **600**, save images and books in folder **page_600**, save .json file in folder **json_file** and skip images\n```\npython parse_tululu_category.py --start_page 600 --end_page 601 --dest_folder page_600 --json_path json_file --skip_imgs True\n```\n\n### How to run code (Part II):\nNow we will create a site for our books that we received earlier:\n\nInput:\n```\npython render_website.py\n```\nOutput:\n\n![](README_files/example1.png)\n\nNow you can go to folder **pages** and see some html files named **index**. So, you can open any of them, find book and start reading.\nIt will be fully offline version of site. Just enjoy!\n\n![](README_files/example4.png)\n\n### Publish site\nAdditionally, you can publish the site on [GitHub Pages](https://pages.github.com/). \nDetailed instructions can be found in [this article](https://medium.com/nuances-of-programming/%D0%BA%D0%B0%D0%BA-%D1%81%D0%BE%D0%B7%D0%B4%D0%B0%D1%82%D1%8C-%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D1%8B%D0%B9-%D1%81%D0%B0%D0%B9%D1%82-%D0%BD%D0%B0-github-pages-e0f3c258ee22) or on [GitHub Pages](https://pages.github.com/).\n\nExample site on GitHub Pages:\n\n**[First page of book catalogue](https://miranizam.github.io/Online-Library/pages/index1.html)**\n\n![Index_2](README_files/example2.png)\n\n![Book](README_files/example3.png)\n\n### Project Goals\nThis code was written for educational purposes as part of an online course for web developers at [dvmn.org](https://dvmn.org/).\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiranizam%2Fonline-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiranizam%2Fonline-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiranizam%2Fonline-library/lists"}