diff --git a/ReadMe.md b/ReadMe.md index ad16b2b..abce0ee 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -16,7 +16,15 @@ I think the opening UI should be to display the top 10 books in-progress (sort o allows the user to immediately enter an updated progress. Additional alphabetic keys are an option to access other features. This way tracker use is near frictionless. (0 maps to 10) -## data structure of an item +## Contributions + +This repo is hosted at https://gitea.tangentfox.com/tangent/Asymtome and +force-pushed to https://github.com/TangentFoxy/Asymtome when commits are made. +I accept pull requests and issues, but management of the code is handled there. + +Licensing? I don't care. Do whatever you want. IP rights are stupid. + +## Book Data Structure ```json { "title": "Title", @@ -24,14 +32,21 @@ tracker use is near frictionless. (0 maps to 10) "series": "Series", "pages": 100, "priority": 0, - "progress": 0.5 + "progress": 0.5, + "hidden": true } ``` -- `title`, `author`, `series`, and `pages` are optional. +- `title`, `author`, `series`, `pages`, and `hidden` are optional. - At least one of `title`, `author`, or `series` must be defined. - `priority` is the ELO ranking, initializing to `0`. -- `progress` represents read/unread/in-progress status. `0` is unread, `1` is read, and anything in-between in a percentage of progress. +- `progress` represents read/unread/in-progress status. `0` is unread, `1` is + read, and anything in-between in a percentage of progress. +- `hidden` is undefined or `true` to hide a book from ALL of the interface + without deleting its data. -## the name -A combination of asymptote - because you will die before you finish your reading list, always getting closer but never arriving - and tome. +## Why "Asymptome" ? +A combination of asymptote - because you will die before you finish your reading +list, always getting closer but never arriving - and tome. + +It's also a-symptom of my neuroses. :D diff --git a/asymptome.lua b/asymptome.lua index 0849cde..409c32c 100644 --- a/asymptome.lua +++ b/asymptome.lua @@ -41,19 +41,26 @@ local get_random_order = function(array) end local filters = { + all_books = function(book) + if book.hidden then return false end + return true + end, unread = function(book) + if book.hidden then return false end if book.progress == 0 then return true end return false end, read = function(book) + if book.hidden then return false end if book.progress == 1 then return true end return false end, in_progress = function(book) + if book.hidden then return false end if book.progress > 0 and book.progress < 1 then return true end @@ -101,5 +108,11 @@ else maximum_change = 2.5, }, total_pages = 0, + defaults = { + launch = { + filter = "in_progress", + sort = "fewest_pages_remaining", + }, + }, } end