Phoebe Shelves is reading management tool based on 1) a book database and 2) a reading database. The command line tools provides tools for managing these databases. Currently, the tools support the following actions:
- Adding, editing, and removing entries from both databases
- Automatic calculation of the time for each reading event (days)
- Automatic calculation of total number of times you have read a book
- Support for multiple book ratings and an average rating
- Visualization of the databases on the command line
The following provides an overview of how to use the script. Currently, the tools are unavailiable via PyPI, but you can utilize the scripts by cloning the repository to your device or downloading the latest stable version from the releases section.
There are two types of tools: script configuration and database management.
$ phoebeshelves [tool] [arguments]At any point during the interactive prompts, you can utilize Ctrl-C or Ctrl-D to safely close the program without modifying any files.
Phoebe Shelves has the following dependencies:
- pandas
pip install pandasconda install pandas
- numpy
pip install numpyconda install numpy
- matplotlib
pip install matplotlibconda install matplotlib
- tabulate
pip install tabulateconda install tabulate
Phoebe Shelves CLT supports two data models: a PostgreSQL database and CSV files. Both models should support the same core features, so there is no inherent advantage to either approach. In the future, the PostgreSQL backend may integrate with remote locations/servers more easily, however.
If you choose to use the CSV backend, there are no further dependencies to install. If you choose to use the PostgreSQL backend, make sure to intall PostgreSQl and ensure the server is running.
Because a public release on pip has not been completed, you will have to install the script manually. Once you have cloned the directory/downloaded the latest release to your local computer, navigate to the directory on the command-line and install the package manually using the following line:
pip install .The script relies on a configuration file (config.cfg) located in the phoebeshelves folder. This configuration file stores a variety of configurations for the script. To setup the configuration file, you use the included config tool:
// Initialize configuration using the default data directory path
$ phoebeshelves config
// Print out the current list of configurations
$ phoebeshelves config check
// Modify a configuration
$ phoebeshelves config [config_name] [new_value]For a list of the arguments to modify the configurations, pass:
$ phoebeshelves config -hOnce you are done configuring the data directory path, the next step is to initialize the backend model.
$ phoebeshelves initIf any of the backend model files already exist, this call will not overwrite any of the existing data. If you want to overwrite existing files, pass the -f flag.
$ phoebeshelves init -fThere are two primary tools for working with the databases: "view" and "manage" mode. The modes can be quickly activated by passing in the appropriate arguments:
$ phoebeshelves view [database] [mode]
$ phoebeshelves manage [database] [mode]Each tool provides interactive prompts for the remainder of the script.
There are three primary modes for viewing the database: 1) printing a table to the command line, 2) generating charts of the database, and 3) generating summary statistics. Currently, only printing the database is fully implemented.
// Printing the books database as a table
$ phoebeshelves view books table
// Generating charts of the reading database
$ phoebeshelves view reading charts
// Calculate summary stats of the reading database
$ phoebeshelves view reading statsFor all modes, you will be prompted to optionally filter the database based on the column data, such as the start or finish date in the reading database. If decide to filter a database, this filtered database will be used for the remainder of the script rather than the original database.
There are three primary actions for managing the database: 1) adding a new entry, 2) editing an existing entry, and 3) deleting an existing entry.
// Add new entry to the books database
$ phoebeshelves manage books add
// Edit an entry in the books database
$ phoebeshelves manage books edit
// Delete an entry in the reading database
$ phoebeshelves manage reading delete