Skip to content

This is a digital library management tool I created for managing and sharing my goodreads data. Name is inspired by the Librarian from Discworld.

License

Notifications You must be signed in to change notification settings

naveenpiedy/project_ook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Project Ook

This is a digital library management tool I created for the following purposes

  • Backing up my GoodReads data locally
  • Ease of querying and managing my books
  • Ease of creating book lists and sharing them

The name is insipired by the Librarian from the Discworld novels.

Usage

The tool at it's current state has three important functions.

  • Importing Data from GoodReads
  • Querying the Data
  • Creating and sharing lists

Importing to Database

GoodReads allows you to export one's own data as a csv. Create a folder library_csv on the root.

csv_to_table.py

df = read_from_csv("20230514.csv")
 write_to_table(df)

The schema for the database exists in models.py

Querying the Database

query_table.py

    data = {
        "date_added": {
            "lower": "2022/12/01",
            "higher": "2023/04/24"
        },
        "author": "Agatha",
    }

    data = json.dumps(data)
    db = QueryLibrary(data)
    result = json.loads(db.select_query_db())

    print(result.keys())

Gives the output as json object where the keys are book titles and values are info about the books.

Creating and Sharing Lists

output_formatter.py

data = {
        "author": "Agatha",
        "status": "read",
        "my_rating": {
            "lower": "4.0",
            "higher": "6.0"
        }
    }

    result = get_output(data, ["title", "og_year_pub", "avg_rating"])
    print_data(result, title="Agatha Christie Books I like")

Will create an SVG image to the folder called output_imgs inside src. The Output will be something like below

Output

Authors

About

This is a digital library management tool I created for managing and sharing my goodreads data. Name is inspired by the Librarian from Discworld.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages