libro-book


Namelibro-book JSON
Version 0.2.2 PyPI version JSON
download
home_pageNone
SummaryA command-line tool to track books read
upload_time2025-07-28 02:11:14
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords books library reading
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Libro

๐Ÿ“š Libro: A simple command-line tool to track your reading history, with your data stored locally in a SQLite database.

## Usage

Add new book: `libro add`

Show books read by year: `libro show --year 2024`

Show book details by id: `libro show 123`

Show books by author: `libro show --author "Stephen King"`

Show books read by year: `libro report`

Show books read grouped by author: `libro report --author`

See: `libro --help` for more information.

### Examples

#### Books Read in Year

```
โฏ libro
                                 Books Read in 2025
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
โ”ƒ id         โ”ƒ Title                        โ”ƒ Author               โ”ƒ Rating โ”ƒ Date Read    โ”ƒ
โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฉ
โ”‚ Fiction    โ”‚                              โ”‚                      โ”‚        โ”‚              โ”‚
โ”‚ 1          โ”‚ Cujo                         โ”‚ Stephen King         โ”‚ 3      โ”‚ Jan 05, 2025 โ”‚
โ”‚ 585        โ”‚ The Midnight Library         โ”‚ Matt Haig            โ”‚ 5      โ”‚ Jan 13, 2025 โ”‚
โ”‚ 587        โ”‚ The Maid                     โ”‚ Nita Prose           โ”‚ 4      โ”‚ Jan 20, 2025 โ”‚
โ”‚ 589        โ”‚ Into the Water               โ”‚ Paula Hawkins        โ”‚ 2      โ”‚ Feb 02, 2025 โ”‚
โ”‚ 584        โ”‚ Salem's Lot                  โ”‚ Stephen King         โ”‚ 3      โ”‚ Mar 12, 2025 โ”‚
โ”‚ 595        โ”‚ The Thursday Murder Club     โ”‚ Richard Osman        โ”‚ 3      โ”‚ Mar 20, 2025 โ”‚
โ”‚ 596        โ”‚ Remarkably Bright Creatures  โ”‚ Shelby Van Pelt      โ”‚ 5      โ”‚ Mar 27, 2025 โ”‚
โ”‚ 598        โ”‚ Colorless Tsukuru Tazaki     โ”‚ Haruki Murakami      โ”‚ 3      โ”‚ Apr 09, 2025 โ”‚
โ”‚ 599        โ”‚ Ten                          โ”‚ Gretchen McNeil      โ”‚ 3      โ”‚ Apr 16, 2025 โ”‚
โ”‚            โ”‚                              โ”‚                      โ”‚        โ”‚              โ”‚
โ”‚ Nonfiction โ”‚                              โ”‚                      โ”‚        โ”‚              โ”‚
โ”‚ 586        โ”‚ The Art Thief                โ”‚ Michael Finkel       โ”‚ 4      โ”‚ Jan 14, 2025 โ”‚
โ”‚ 588        โ”‚ All the Pieces Matter        โ”‚ Jonathan Abrams      โ”‚ 3      โ”‚ Jan 27, 2025 โ”‚
โ”‚ 590        โ”‚ Supercommunicators           โ”‚ Charles Duhigg       โ”‚ 4      โ”‚ Feb 04, 2025 โ”‚
โ”‚ 593        โ”‚ Leonardo da Vinci            โ”‚ Walter Isaacson      โ”‚ 3      โ”‚ Mar 02, 2025 โ”‚
โ”‚ 594        โ”‚ The Leap to Leader           โ”‚ Adam Bryant          โ”‚ 3      โ”‚ Mar 08, 2025 โ”‚
โ”‚ 597        โ”‚ Team of Rivals               โ”‚ Doris Kearns Goodwin โ”‚ 3      โ”‚ Apr 06, 2025 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```


#### Books by Year

```
โฏ libro report

                         Books Read by Year

  Year   Count   Bar
 โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  2013   3       โ–„โ–„โ–„โ–„
  2014   4       โ–„โ–„โ–„โ–„โ–„โ–„
  2015   11      โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„
  2016   30      โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„
  2017   21      โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„
  2018   27      โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„
  2019   29      โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„
  2020   27      โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„
  2021   28      โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„
  2022   27      โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„
  2023   32      โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„
  2024   30      โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„
  2025   17      โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„โ–„
```

#### Author Report

```
โฏ libro report --author

         Most Read Authors

  Author                Books Read
 โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  Stephen King          15
  George R.R. Martin    5
  Timothy Zahn          4
  Grady Hendrix         4
  Andy Weir             4
  William Zinsser       3
  Roald Dahl            3
  Riley Sager           3
  Philip K. Dick        3
  Neil Gaiman           3
  Natalie D. Richards   3
  Lucy Foley            3
  Cory Doctorow         3
```


## Install

Libro is packaged as `libro-book` on PyPI.

```
pip install libro-book
```

You can also clone this repository and install it locally:

```
git clone https://github.com/mkaz/libro.git
cd libro
pip install -e .
```

## Setup

On first run, libro will create a `libro.db` database file based on database location. It will prompt for confirmation to proceed which also shows the location where the file will be created.

**Database locations:**

The following order is used to determine the database location:

1. Using the `--db` flag on command-line.

2. `libro.db` in current directory

3. Environment variable `LIBRO_DB` to specify custom file/location

4. Finally, the user's platform-specific data directory
    * Linux: `~/.local/share/libro/libro.db`
    * macOS: `~/Library/Application Support/libro/libro.db`
    * Windows: `%APPDATA%\libro\libro.db`


For example, if you want to create a new database file in the current directory, you can use the following command:

```
libro --db ./libro.db
```

### Import from Goodreads

Libro can import your reading history from a Goodreads export CSV file.

```
libro import goodreads_library_export.csv
```

There is a `genre` field for fiction and nonfiction, but this data is not available in the Goodreads export. I still need to build the edit book functionality to change the genre.

# Database Schema

## Books table

| Field | Type | Description |
|-------|------|-------------|
| id | primary key | Unique identifier |
| title | string | Book title |
| author | string | Book author |
| pages | int | Number of pages in book |
| pub_year | int | Year book was published |
| genre | string | Fiction or nonfiction |

## Reviews table

| Field | Type | Description |
|-------|------|-------------|
| id | primary key | Unique identifier |
| book_id | foreign key | Book identifier |
| date_read | date | Date book was read |
| rating | float | Number between 0 and 5 |
| review | text | Review of book |

# Changelog

See [GitHub Releases](https://github.com/mkaz/libro/releases) for the changelog.

# Packaging

Notes to self, I forget how to do this stuff.

Libro is packaged as `libro-book` on PyPI.

Packaging is done with `hatchling`, [see Guide](https://packaging.python.org/en/latest/tutorials/packaging-projects/)

```
# install tools
py -m pip install --upgrade build twine
```

```
# build
py -m build
```

```
# upload
py -m twine upload dist/*
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "libro-book",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "books, library, reading",
    "author": null,
    "author_email": "Marcus Kazmierczak <marcus@mkaz.com>",
    "download_url": "https://files.pythonhosted.org/packages/24/34/4c81e4653774310eb9f1d6479fac33a39245ad21c5b6ad54ef46e12ca0ac/libro_book-0.2.2.tar.gz",
    "platform": null,
    "description": "# Libro\n\n\ud83d\udcda Libro: A simple command-line tool to track your reading history, with your data stored locally in a SQLite database.\n\n## Usage\n\nAdd new book: `libro add`\n\nShow books read by year: `libro show --year 2024`\n\nShow book details by id: `libro show 123`\n\nShow books by author: `libro show --author \"Stephen King\"`\n\nShow books read by year: `libro report`\n\nShow books read grouped by author: `libro report --author`\n\nSee: `libro --help` for more information.\n\n### Examples\n\n#### Books Read in Year\n\n```\n\u276f libro\n                                 Books Read in 2025\n\u250f\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2533\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2513\n\u2503 id         \u2503 Title                        \u2503 Author               \u2503 Rating \u2503 Date Read    \u2503\n\u2521\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2547\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2529\n\u2502 Fiction    \u2502                              \u2502                      \u2502        \u2502              \u2502\n\u2502 1          \u2502 Cujo                         \u2502 Stephen King         \u2502 3      \u2502 Jan 05, 2025 \u2502\n\u2502 585        \u2502 The Midnight Library         \u2502 Matt Haig            \u2502 5      \u2502 Jan 13, 2025 \u2502\n\u2502 587        \u2502 The Maid                     \u2502 Nita Prose           \u2502 4      \u2502 Jan 20, 2025 \u2502\n\u2502 589        \u2502 Into the Water               \u2502 Paula Hawkins        \u2502 2      \u2502 Feb 02, 2025 \u2502\n\u2502 584        \u2502 Salem's Lot                  \u2502 Stephen King         \u2502 3      \u2502 Mar 12, 2025 \u2502\n\u2502 595        \u2502 The Thursday Murder Club     \u2502 Richard Osman        \u2502 3      \u2502 Mar 20, 2025 \u2502\n\u2502 596        \u2502 Remarkably Bright Creatures  \u2502 Shelby Van Pelt      \u2502 5      \u2502 Mar 27, 2025 \u2502\n\u2502 598        \u2502 Colorless Tsukuru Tazaki     \u2502 Haruki Murakami      \u2502 3      \u2502 Apr 09, 2025 \u2502\n\u2502 599        \u2502 Ten                          \u2502 Gretchen McNeil      \u2502 3      \u2502 Apr 16, 2025 \u2502\n\u2502            \u2502                              \u2502                      \u2502        \u2502              \u2502\n\u2502 Nonfiction \u2502                              \u2502                      \u2502        \u2502              \u2502\n\u2502 586        \u2502 The Art Thief                \u2502 Michael Finkel       \u2502 4      \u2502 Jan 14, 2025 \u2502\n\u2502 588        \u2502 All the Pieces Matter        \u2502 Jonathan Abrams      \u2502 3      \u2502 Jan 27, 2025 \u2502\n\u2502 590        \u2502 Supercommunicators           \u2502 Charles Duhigg       \u2502 4      \u2502 Feb 04, 2025 \u2502\n\u2502 593        \u2502 Leonardo da Vinci            \u2502 Walter Isaacson      \u2502 3      \u2502 Mar 02, 2025 \u2502\n\u2502 594        \u2502 The Leap to Leader           \u2502 Adam Bryant          \u2502 3      \u2502 Mar 08, 2025 \u2502\n\u2502 597        \u2502 Team of Rivals               \u2502 Doris Kearns Goodwin \u2502 3      \u2502 Apr 06, 2025 \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n\n#### Books by Year\n\n```\n\u276f libro report\n\n                         Books Read by Year\n\n  Year   Count   Bar\n \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n  2013   3       \u2584\u2584\u2584\u2584\n  2014   4       \u2584\u2584\u2584\u2584\u2584\u2584\n  2015   11      \u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\n  2016   30      \u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\n  2017   21      \u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\n  2018   27      \u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\n  2019   29      \u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\n  2020   27      \u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\n  2021   28      \u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\n  2022   27      \u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\n  2023   32      \u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\n  2024   30      \u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\n  2025   17      \u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584\n```\n\n#### Author Report\n\n```\n\u276f libro report --author\n\n         Most Read Authors\n\n  Author                Books Read\n \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n  Stephen King          15\n  George R.R. Martin    5\n  Timothy Zahn          4\n  Grady Hendrix         4\n  Andy Weir             4\n  William Zinsser       3\n  Roald Dahl            3\n  Riley Sager           3\n  Philip K. Dick        3\n  Neil Gaiman           3\n  Natalie D. Richards   3\n  Lucy Foley            3\n  Cory Doctorow         3\n```\n\n\n## Install\n\nLibro is packaged as `libro-book` on PyPI.\n\n```\npip install libro-book\n```\n\nYou can also clone this repository and install it locally:\n\n```\ngit clone https://github.com/mkaz/libro.git\ncd libro\npip install -e .\n```\n\n## Setup\n\nOn first run, libro will create a `libro.db` database file based on database location. It will prompt for confirmation to proceed which also shows the location where the file will be created.\n\n**Database locations:**\n\nThe following order is used to determine the database location:\n\n1. Using the `--db` flag on command-line.\n\n2. `libro.db` in current directory\n\n3. Environment variable `LIBRO_DB` to specify custom file/location\n\n4. Finally, the user's platform-specific data directory\n    * Linux: `~/.local/share/libro/libro.db`\n    * macOS: `~/Library/Application Support/libro/libro.db`\n    * Windows: `%APPDATA%\\libro\\libro.db`\n\n\nFor example, if you want to create a new database file in the current directory, you can use the following command:\n\n```\nlibro --db ./libro.db\n```\n\n### Import from Goodreads\n\nLibro can import your reading history from a Goodreads export CSV file.\n\n```\nlibro import goodreads_library_export.csv\n```\n\nThere is a `genre` field for fiction and nonfiction, but this data is not available in the Goodreads export. I still need to build the edit book functionality to change the genre.\n\n# Database Schema\n\n## Books table\n\n| Field | Type | Description |\n|-------|------|-------------|\n| id | primary key | Unique identifier |\n| title | string | Book title |\n| author | string | Book author |\n| pages | int | Number of pages in book |\n| pub_year | int | Year book was published |\n| genre | string | Fiction or nonfiction |\n\n## Reviews table\n\n| Field | Type | Description |\n|-------|------|-------------|\n| id | primary key | Unique identifier |\n| book_id | foreign key | Book identifier |\n| date_read | date | Date book was read |\n| rating | float | Number between 0 and 5 |\n| review | text | Review of book |\n\n# Changelog\n\nSee [GitHub Releases](https://github.com/mkaz/libro/releases) for the changelog.\n\n# Packaging\n\nNotes to self, I forget how to do this stuff.\n\nLibro is packaged as `libro-book` on PyPI.\n\nPackaging is done with `hatchling`, [see Guide](https://packaging.python.org/en/latest/tutorials/packaging-projects/)\n\n```\n# install tools\npy -m pip install --upgrade build twine\n```\n\n```\n# build\npy -m build\n```\n\n```\n# upload\npy -m twine upload dist/*\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A command-line tool to track books read",
    "version": "0.2.2",
    "project_urls": {
        "Documentation": "https://github.com/mkaz/libro",
        "Issues": "https://github.com/mkaz/libro/issues",
        "Repository": "https://github.com/mkaz/libro"
    },
    "split_keywords": [
        "books",
        " library",
        " reading"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "437aed5faa2e2cc216a6ab86eb9f9bbd8db101a993159ca70d6975e8c63b1dff",
                "md5": "44d05c00debe203e75fd8b5e544b81d5",
                "sha256": "55d3d57db30013e4647031087873219c1935b9ae2d1aa192f1dd5ae8556840fd"
            },
            "downloads": -1,
            "filename": "libro_book-0.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "44d05c00debe203e75fd8b5e544b81d5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 15179,
            "upload_time": "2025-07-28T02:11:14",
            "upload_time_iso_8601": "2025-07-28T02:11:14.110879Z",
            "url": "https://files.pythonhosted.org/packages/43/7a/ed5faa2e2cc216a6ab86eb9f9bbd8db101a993159ca70d6975e8c63b1dff/libro_book-0.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "24344c81e4653774310eb9f1d6479fac33a39245ad21c5b6ad54ef46e12ca0ac",
                "md5": "3b7dd39fa0f1788e54cf36cc074b10b5",
                "sha256": "10a2b33e549e2a4b9d5d41d3913c7c9ecab0facb5ad37a65ead737deefe5de21"
            },
            "downloads": -1,
            "filename": "libro_book-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "3b7dd39fa0f1788e54cf36cc074b10b5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 13858,
            "upload_time": "2025-07-28T02:11:14",
            "upload_time_iso_8601": "2025-07-28T02:11:14.932390Z",
            "url": "https://files.pythonhosted.org/packages/24/34/4c81e4653774310eb9f1d6479fac33a39245ad21c5b6ad54ef46e12ca0ac/libro_book-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-28 02:11:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mkaz",
    "github_project": "libro",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "libro-book"
}
        
Elapsed time: 0.52581s