Package: consumptioncli
ConsumptionCLIAboutWritten in Python,ConsumptionCLIis a lightweight command line interface tool for keeping track of various types of media. It acts as a simpler alternative to services such asgoodreadsandbookmeterfor Novels orIMDbandLetterboxdfor TV Shows and Movies. It also provides enough flexibiltiy to keep track of any number of other formats.InstallationMethod 1. pip install (Recommended)RequirementsPython 3+pipExecute the follwoing:$pipinstallconsumptioncliYou're Done!Method 2. Self BuildRequirementsPython 3+pipPyPa'sbuildfrontendconsumptionbackendStepsThe same steps can be followed forconsumptionbackendand should be done so beforehand asConsumptionCLIis dependent on it.Clone the repository and navigate insideExecute the following:$py-mbuild$pipinstall.You're Done!Basic UsageConsumptionCLIincludes 3 different entities:Consumables- Main entity type and are intended to represent things such as Movies, TV Shows, Novels, etc. However, they can be used for whatever purposes you desire.Series- Secondary entity. EachConsumablecan be affiliated with one of these. Intended to represent an entire series, for example if a TV Show has multiple seasons each season may be represented with its ownConsumableand all of theseConsumablesmay be attached to the sameSeries.Personnel- Secondary entity. Can be affiliated withConsumablesalong with some role such as Author, Illustrator, etc.There are 4 main actions that can be performed on each of these entities. NamelyNew,Update,DeleteandList. More detail on these actions is given in the sections below.NewConcerned with the creation of entities. An example on how to create aConsumableis given below:$consconsumablenew--name1984--typeNOVEL#IDTypeNamePartsRatingCompletionsStatusStartedCompleted---  ----  ------  ------  -------  --------  -------------  --------  ---------  -----------1     1  NOVEL     1984  0/?                            0  PLANNINGObserve that on creation of aConsumablea table containing the values associated with the newConsumableincluding the type of media and name along with other properties is displayed. Each of these properties can be adjusted manually using the appropriate flags (e.g.--rating NUMBER).Some fields can be ommited and are filled with sensible defaults while others, such asnameandtypein the case ofConsumables, are required and will be prompted for if not provided initially.Creation ofSeriesandPersonnelcan be done withseriesandpersonnelin place ofconsumablerespectively.Shorthand also exists and so the following input produces the same result:$conscn-n1984-tNOVEL#IDTypeNamePartsRatingCompletionsStatusStartedCompleted---  ----  ------  ------  -------  --------  -------------  --------  ---------  -----------1     1  NOVEL     1984  0/?                            0  PLANNINGNote that for flags/options consisting of a single character only a single hyphen prefix (-) is used while longer form flags/options use a double-hyphen prefix (--). This remains true for shorthand flags/options that still make use of multiple characters such as the shorthand for--startdatewhich is--sd.UpdateAll the fields for each of the entities can be changed using the update action. Note that there are some constraints on how these can be changed in order to prevent invalid states and help maintain consistency but in general the system is very flexible.One main reason you may want to update aConsumableis to change the status. There are 5 statuses that can be associated with any oneConsumableincludingPLANNING,IN_PROGRESS,ON_HOLD,DROPPEDandCOMPLETED. By defaultConsumablesare set in thePLANNINGstage. Updating can be performed through the following:$consconsumableupdate--name1984set--statusIN_PROGRESS--parts2#IDTypeNamePartsRatingCompletionsStatusStartedCompleted---  ----  ------  ------  -------  --------  -------------  -----------  ----------  -----------1     1  NOVEL     1984  2/?                            0  IN_PROGRESS  2023/11/30Observe that we first specify some search paramaters by which to find theConsumable(s)we are looking to update and then using the keywordsetspecify the updates we want to make. In this case the status has been set toIN_PROGRESSand the number of parts set to 2; which could represent chapters read in this case.Note that if multipleConsumablesmatch the search conditions then you will be prompted to confirm the update of each one. Additionally, fields such as names are not case-sensitive and only have to include part of the entire string allowing easy mass updating of related entities (e.g. setting the same series for multipleConsumables).Dates are largely handled by the system automatically and setting the status of aConsumabletoIN_PROGRESSwhich does not have an associated start date will automatically set it to present day.Note that if you want to update the date fields manually the default format isYYYY/mm/dd. As a result this format should be used when specifying a date using the--startdateand--enddateoptions. Alternatively a different date format can be supplied using--dateformat. E.g.--dateformat %d-%m-%Y.DeleteConsumablescan also be deleted by any field:$consconsumabledelete--name19841 Consumable(s) deleted.The same logic applies to deletions as does to updates in terms of search paramaters. Again, confirmation of deletion will be required when multiple entities match the search parameters.ListAllConsumables, or a subset according to some search parameters, can be viewed using the list action. The most basic example is to provide no paramaters and simply view all results. By default this opens an interactive session which can be scrolled through using the keyboard:cons consumable list#IDTypeNamePartsRatingCompletionsStatusStartedCompleted---  ----  ------  ---------------------  -------  --------  -------------  -----------  ----------  ----------->   1     1  NOVEL   1984                   23/23         8.3              1  COMPLETED    2023/07/02  2023/07/02 <2     2  NOVEL   A Tale of Two Cities   45/45         7                5  COMPLETED    1994/11/26  1996/03/223     3  MOVIE   Avatar                 1/1           5.3              2  COMPLETED    2002/12/17  2002/12/174     4  TV      Breaking Bad           35/?                           0  DROPPED      2011/06/225     5  MOVIE   Jurassic Park          0/?                            0  IN_PROGRESS  1998/03/036     6  MOVIE   Pulp Fiction           7/7           7.6              2  COMPLETED    2016/06/11  2016/08/197     7  NOVEL   The Hobbit             10/?                           0  DROPPED      2011/06/228     9  TV      The Office             101/?                          0  IN_PROGRESS  2018/08/069     8  TV      The Simpsons           234/?                          0  DROPPED      2022/12/24[K/↑] Up   [J/↓] Down   [Enter] Select   [Q] QuitBy default the listedConsumablesare ordered by name however the ordering can be changed using--order(and--reverseto reverse the order):$consconsumablelist--orderrating--reverse#IDTypeNamePartsRatingCompletionsStatusStartedCompleted---  ----  ------  ---------------------  -------  --------  -------------  -----------  ----------  ----------->   1     1  NOVEL   1984                   23/23         8.3              1  COMPLETED    2023/07/02  2023/07/02 <2     6  MOVIE   Pulp Fiction           7/7           7.6              2  COMPLETED    2016/06/11  2016/08/193     2  NOVEL   A Tale of Two Cities   45/45         7                5  COMPLETED    1994/11/26  1996/03/224     3  MOVIE   Avatar                 1/1           5.3              2  COMPLETED    2002/12/17  2002/12/175     4  TV      Breaking Bad           35/?                           0  DROPPED      2011/06/226     5  MOVIE   Jurassic Park          0/?                            0  IN_PROGRESS  1998/03/037     7  NOVEL   The Hobbit             10/?                           0  DROPPED      2011/06/228     8  TV      The Simpsons           234/?                          0  DROPPED      2022/12/249     9  TV      The Office             101/?                          0  IN_PROGRESS  2018/08/06[K/↑] Up   [J/↓] Down   [Enter] Select   [Q] QuitAnd the entries listed can be filtered using the same attributes specified in the new and update actions.$consconsumablelist--typeNOVEL#IDTypeNamePartsRatingCompletionsStatusStartedCompleted---  ----  ------  ---------------------  -------  --------  -------------  ---------  ----------  ----------->   1     1  NOVEL   1984                   23/23         8.3              1  COMPLETED  2023/07/02  2023/07/02 <2     2  NOVEL   A Tale of Two Cities   45/45         7                5  COMPLETED  1994/11/26  1996/03/223     7  NOVEL   The Hobbit             10/?                           0  DROPPED    2011/06/224    10  NOVEL   To Kill a Mockingbir.  0/?                            0  PLANNING5    11  NOVEL   War and Peace          0/?                            0  PLANNING[K/↑] Up   [J/↓] Down   [Enter] Select   [Q] QuitList ActionsIn addition to being able to traverse the interactive list other actions such as updating and deleting selected entries, attachingSeriesorPersonneltoConsumable(s), managing tags and viewing more info of an entry can be done using the various given button prompts at the bottom of the listing.TheView Infoaction is significant as it can be used to see additional information on an entry that is not presented in the compact list view such asSeriesand associatedPersonnelfor aConsumable. This action itself allows viewing of this information from another interactive session:Info───────────────────────────────────────────────────────┐Personnel──────────────────────────────────────────────────┐│#1 "1984"                                                 ││> [author] George Orwell <                                ││NOVEL - No Series                                         ││  [publisher] "Secker & Warburg"                          ││                                                          ││                                                          ││23/23 parts, 1 Completion(s)                              ││                                                          ││COMPLETED, 2023/07/02 - 2023/07/02                        ││                                                          ││                                                          ││                                                          ││Tag(s): 1949 english                                      ││                                                          ││                                                          ││                                                          ││                                                          ││                                                          ││                                                          ││[K/↑] Up   [J/↓] Down   [Enter] Select   [A] Deselect All ││                                                          ││[R] Remove Selected   [Q] Quit                            │└──────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────┘MoreHelpWhile these are the most significant ther are other possibilities. Specifically forConsumablesthere are many more actions that further streamline addingPersonnel, assigning aSeriesand tagging. These possibilities and more can be explored using the--helpflag after any given command or partial command.$cons--help$consconsumablenew--help