Goodreads-file-uploader is a Python Script to add a list of book titles to your want_to_read shelf on Goodreads. Is a way to upload a list of titles at once, without going one by one. Just write all your book titles line by line in a .txt file and run the script.
- Installation
- Runing the Script
- Tests
- Built With
- To-Do
- What I learn
- Contributing
- Authors
- License
- Acknowledgments
What things you need to install the software:
- Python 3 (we recomend to use Virtual Environments)
These instructions will get you a copy of the project up and running on your local machine for development, use and/or testing purposes.
$ git clone https://github.com/DobleV55/Goodreads.git
$ cd Goodreads/
$ pip install -r requirements.txt
$ cd goodreads/
$ python main.py
You need to choose between enter a Book Name or Upload a file of titles. If option 1 is chosen, the script will ask you for your goodreads account credentials (email and password) and then to enter a Book Title. The script will automatically log-in, search for the book and add the book to your Want-to-Read Shelf. If option 2 is chosen, the script will ask you for your goodreads account credentials and a file with extension .txt with your book titles like this.
From inside Goodreads project, you can execute:
$ pytest
To run the tests that are located at tests/test_goodreads.py
Explain what these tests test and why.
Give an example
- Python 3.8.3 - Python is a programming language that lets you work quickly and integrate systems more effectively.
- Cookiecutter - Cookiecutter creates projects from project templates, e.g. Python package projects.
- Beautifulsoup4 - Beautiful Soup is a library that makes it easy to scrape information from web pages.
- Click - Click is a Python package for creating beautiful command line interfaces in a composable way with as little code as necessary.
- Requests - Requests allows you to send HTTP/1.1 requests extremely easily.
- PyInquirer - A collection of common interactive command line user interfaces.
- When finish option 1 or 2, ask again to add a book.
- Check credentials to see if login was succesfull.
- Add 'Book not found' on Option 1
- Add login option. (If user not loged-in, disable add-book options)
- Add exit option.
- Conserve session when input credentials. (moving the requests.Session to name)
- Check what happens if the book is already on the Want to Read shelf.
- Posibility to create a new shelf.
- Posibility to add books to a different shelf.
- When option 2 is selected, ask for normal or forced option.
- Normal - shows the link to the book and asks if its correct.
- Forced - add directly the book that finds on goodreads.
- Add tests.
- Explain those tests in this file.
- Python Classes implementation, add comments and review code for changes.
Whit this Python project I learn a lot about:
- Python Requests - Creating Sessions, login in and send jsons with POST methods once logged in.
- Beautifulsoup - Obtaining X-CSRF-Token, search for specific meta_tags and parse html.
- Cookiecutter - Creating python package projects, build a project template to use on another projects and project licenses.
- Click - Create password inputs, create email inputs, use those two in the code to log-in.
- PyInquirer - Create a nice menu with multiple options and colors using Python Inquirer tools.
- Goodreads - A little bit of how it works and how they send the data from the browser.
- Python - Sending information as parameters through functions mainting the Beatifulsoup session, json structure and implementation with variables, data types, operators, lists, dictionaries and use of statements.
Please read CONTRIBUTING.rst for details on our code of conduct, and the process for submitting pull requests to us.
- Valentin Vila - My GitHub
See also the list of contributors who participated in this project.
This project is licensed under MIT - see the LICENSE file for details
- To Agus that shows me Goodreads.