Commit Graph

314 Commits

Author SHA1 Message Date
contrapunctus 186475d41e Create switch-backend command and register-backend function 2021-10-31 11:19:09 +05:30
contrapunctus 574ffd996c Split interval if necessary when clocking out 2021-10-31 09:55:58 +05:30
contrapunctus 7e19560d2a [plist-group] if required, create new tagged list before record insert 2021-10-30 09:51:21 +05:30
contrapunctus b70f304eb5 [plist-group] use hash table for task-records-for-date
* Move file-backend-mixin and related definitions to "common
  definitions for s-expression backends"
* Use loop-sexp-file and reinstate sexp-pre-read-check to reduce
  duplication
* Change some generics to dispatch on file-backend-mixin to make them
  common to the plist and plist-group backends
2021-10-30 01:17:23 +05:30
contrapunctus 7a17ed14a7 Rename functions; implement to-hash-table for plist-group
task-records -> task-records-for-date
active-time-one-day -> active-time-on

New generic - latest-date-records
Removed generic active-time
2021-10-30 00:00:35 +05:30
contrapunctus 06b29e3ce0 Update all references to chronometrist-events (except tests) 2021-10-29 09:54:28 +05:30
contrapunctus 45a2eeec06 Have details frontend use hash-table slot 2021-10-29 01:17:44 +05:30
contrapunctus 436aba7547 Remove list-tasks from backend protocol 2021-10-29 01:06:26 +05:30
contrapunctus 4f0b0c0171 Use to-list + cl-loop instead of cl-loop wrapper macros 2021-10-29 00:40:54 +05:30
contrapunctus b0482699cd fix: use unwind-protect to always reset iterator state 2021-10-23 17:06:46 +05:30
contrapunctus 1d300249cc feat: customizable task list 2021-10-23 16:06:08 +05:30
contrapunctus d10684f817 Add task-records test; restructure tests 2021-10-21 14:56:04 +05:30
contrapunctus 9eb9a05dd7 Make current-task a regular function 2021-10-21 14:33:50 +05:30
contrapunctus 8fd4d19c82 convert tests to Org LP; move hash table into backend object
* create generic functions reset-internal, on-change, backend-empty-p, memory-layer-empty-p
* move most of refresh-file to on-change method
2021-10-20 19:31:11 +05:30
contrapunctus 1aa1a30291 Write tests for loop-records; move generic function 2021-10-15 07:39:59 +05:30
contrapunctus 6424ef662c Remove docstrings from methods 2021-10-14 09:22:35 +05:30
contrapunctus 052bc23b17 Write backend tests 2021-10-14 09:21:28 +05:30
contrapunctus d6c980043b Implement insert method 2021-10-14 08:08:48 +05:30
contrapunctus 1f85435d56 Change slot name and values 2021-10-13 07:05:45 +05:30
contrapunctus 6bdb38f171 Implement replace-last 2021-10-13 06:59:34 +05:30
contrapunctus 786b6937ad Update task-records for changed loop-records interface 2021-10-13 06:56:45 +05:30
contrapunctus 177eb62d34 Update method for changed loop-records interface 2021-10-12 14:03:08 +05:30
contrapunctus 49d005be82 fix: remove :end from iterator states 2021-10-11 06:05:20 +05:30
contrapunctus b86825dded Use keywords for iterator-state; wrap cl-loop in save-excursion 2021-10-11 05:38:58 +05:30
contrapunctus b76624c8e7 Convert plist-group-backend iterator to method;
Initialize iterator-state to t, so point is moved to (point-max) on
the first run of the iterator, too.

Our :after method for initialize-instance only applies to file-related
backends, and is thus changed to only dispatch on file-backend-mixin.
2021-10-10 21:58:27 +05:30
contrapunctus 5402130b27 Make iterator a generic function; store iterator-state as slot
Remove file-related details from `loop-records`
2021-10-10 17:52:52 +05:30
contrapunctus 1efc5ec7ac Move file-related slots into file-backend-mixin 2021-09-19 20:09:35 +05:30
contrapunctus a8cad8ccac fix file change detection 2021-09-13 19:34:20 +05:30
contrapunctus b310aa9298 migrate - fix insertion of file mode prop line 2021-09-12 19:19:41 +05:30
contrapunctus 4637f38408 optimize plist-group-read-record; extend backend documentation 2021-09-12 17:22:08 +05:30
contrapunctus 03b71132dc loop-records - fix infinite loop; list-tasks - fix test 2021-09-12 17:22:08 +05:30
contrapunctus e4c33d7097 create backend-generic `cl-loop` interface 2021-09-12 17:22:08 +05:30
contrapunctus 3b9e151bac migrate - prompt to overwrite if output file exists 2021-09-12 17:21:50 +05:30
contrapunctus 793491eb9b Remove list-records from protocol (there's already `to-hash-table`) 2021-09-10 19:41:55 +05:30
contrapunctus 69cda68f20 Convert references to chronometrist-file to chronometrist-backend-file 2021-09-09 21:25:40 +05:30
contrapunctus 7d7e801484 Update file watch setup for multiple backends 2021-09-09 18:30:37 +05:30
contrapunctus 34aeec3bb7 Revert changes to date format
Refactor spark-durations from spark-row-transformer for ease of
testing
2021-09-09 02:14:04 +05:30
contrapunctus c14fea723c (WIP) implement task-records from task-events-in-day
Use ISO date instead of TS struct when dates required
2021-09-07 07:21:05 +05:30
contrapunctus b1192b1fdf Protocol - move list-records; remove task-time
task-time does not need to be polymorphic
2021-09-07 07:20:23 +05:30
contrapunctus 648253172a Implement task-records 2021-09-07 06:24:13 +05:30
contrapunctus 9e34fb8058 correct to-hash method, class definition 2021-09-06 22:31:27 +05:30
contrapunctus 7f90191a40 rename loop-file; implement list-tasks and current-task methods 2021-09-06 19:32:21 +05:30
contrapunctus 63df54aa2e chronometrist-migrate - prompt for backends and files 2021-09-06 15:42:02 +05:30
contrapunctus 092f3e8f07 Hard wrap and copy hash table docstring 2021-09-06 01:18:26 +05:30
contrapunctus 8d73749c3f Associate create-file with both plist and plist-group backends
Move definitions common to sexp backends together
2021-09-06 01:18:26 +05:30
contrapunctus 6893299427 Create methods stubs, create basic to-file method and migrate command 2021-09-05 19:10:37 +05:30
contrapunctus 43deef28af Use backend passed to method rather than active-backend 2021-09-05 17:39:43 +05:30
contrapunctus 3e7c41c9f7 Create on-file-change generic 2021-09-04 20:25:18 +05:30
contrapunctus 083a2f4d8e Adapt sexp-events-populate to to-hash-table 2021-09-04 20:20:59 +05:30
contrapunctus 78048824e5 Add package prefix to accessors 2021-09-04 19:45:20 +05:30
contrapunctus da1f2ed329 Fix more errors 2021-09-04 19:29:24 +05:30
contrapunctus a948fb4632 backend protocol - create count-record generic 2021-09-04 18:23:06 +05:30
contrapunctus 88d06da043 backend protocol - create migration generics 2021-09-04 18:08:06 +05:30
contrapunctus b218a835f7 plist backend - correct errors 2021-09-04 18:01:56 +05:30
contrapunctus 297f288130 Correct docstring 2021-09-04 17:29:34 +05:30
contrapunctus 3f30eadbb0 Create method for list-tasks 2021-09-04 17:26:10 +05:30
contrapunctus af286f2d5d Create method for replace-last 2021-09-04 14:49:18 +05:30
contrapunctus dee921244b Create method for insert 2021-09-04 14:21:44 +05:30
contrapunctus 4e6243b3e3 Update call sites for create-file 2021-09-04 14:14:47 +05:30
contrapunctus 2b6ee13b96 Create method for create-file 2021-09-04 14:10:25 +05:30
contrapunctus 622914397e Create method for latest-record 2021-09-04 14:01:22 +05:30
contrapunctus 445614e9aa backend - add file slot 2021-09-04 13:55:26 +05:30
contrapunctus 260aafaebb Make edit-file method for plist backend 2021-09-04 08:45:56 +05:30
contrapunctus 0d612f28b5 Update current-task call sites 2021-09-04 08:43:32 +05:30
contrapunctus 7bb023caf5 Rethink custom interface 2021-09-04 08:11:57 +05:30
contrapunctus 7c55a19e1f feat: create generic backend protocol 2021-09-04 00:28:33 +05:30
contrapunctus ba9e8dfa9c fix: correct docstring; indent code 2021-09-02 21:05:30 +05:30
contrapunctus 73e6d98612 doc: bump versions 2021-07-08 03:17:55 +05:30
contrapunctus 58f0fdf0ba feat: add menu entry and keybinding for force-restart-timer 2021-07-08 03:15:47 +05:30
contrapunctus 61eb311d0a feat(details): create new buffer for each range 2021-07-06 23:38:00 +05:30
contrapunctus 224a7fec3f cleanup: remove iso-date-to-ts, rename iso-timestamp-to-ts -> iso-to-ts 2021-07-03 10:59:22 +05:30
contrapunctus 26e3dd5c5d feat(details): implement timestamp ranges 2021-07-03 10:51:36 +05:30
contrapunctus 7976b53d91 fix(details): flatten key-values, remove keywords 2021-07-03 06:20:10 +05:30
contrapunctus 1931e88c85 feat(details): support begin/end in ranges 2021-07-03 00:23:56 +05:30
contrapunctus 883f813615 Merge branch 'doc' into details-view 2021-07-01 07:29:13 +05:30
contrapunctus 0f68ab4f38 feat(details): add more menu items 2021-07-01 07:24:58 +05:30
contrapunctus f7f2349004 fix(details): set history variables 2021-07-01 07:24:26 +05:30
contrapunctus a04ca1fd28 fix(details): correct error 2021-06-28 07:50:19 +05:30
contrapunctus cc77b18797 fix(details): use read-from-minibuffer for filter 2021-06-28 06:53:35 +05:30
contrapunctus fd468a9ed5 feat(details): implement filter; refactor `rows` 2021-06-28 06:08:45 +05:30
contrapunctus b774700450 feat(details): create prompt, menu 2021-06-27 22:24:37 +05:30
contrapunctus c4b94be941 feat(details): implement custom ranges 2021-06-27 22:24:28 +05:30
contrapunctus 9f8e455e01 feat(details): create state variables for custom ranges and filters 2021-06-27 20:57:38 +05:30
contrapunctus 3f3567903b Merge branch 'dev' into doc 2021-06-27 03:38:47 +05:30
contrapunctus 2f8d136bf6 doc: shorten docstring 2021-06-26 09:09:11 +05:30
contrapunctus 37afe58cd9 fix: move menu after keymap 2021-06-22 06:14:27 +05:30
contrapunctus e57a244519 feat: change menu text; add keybinding for details view 2021-06-17 22:32:50 +05:30
contrapunctus e4b4dc277b feat(chronometrist-menu): add more entries; remove keybind printing 2021-06-16 05:35:55 +05:30
contrapunctus 50b2b03036 feat(chronometrist): create menu 2021-06-15 22:05:24 +05:30
contrapunctus dc3692270d cleanup: create commands-to-print-alist 2021-06-15 10:14:19 +05:30
contrapunctus 2f26ef0a60 feat: add missing keybindings 2021-06-14 23:42:33 +05:30
contrapunctus 1ad4a92ebf cleanup: remove chronometrist-command-helper
It was neither shorter nor particularly easier to read... 🤔
2021-06-14 23:41:47 +05:30
contrapunctus 8141b6604c feat[restart/extend]: fail with message rather than silently 2021-06-14 15:01:50 +05:30
contrapunctus 34fa77a173 refactor: use chronometrist-command-helper 2021-06-14 14:48:03 +05:30
contrapunctus 69f2b1d5c4 refactor: create chronometrist-command-helper 2021-06-14 14:45:16 +05:30
contrapunctus a3144050e4 doc(chronometrist-restart-task): clarify docstring 2021-06-12 21:12:55 +05:30
contrapunctus b0367023ef feat: new command chronometrist-extend-task 2021-06-12 21:12:37 +05:30
contrapunctus de41c158b5 feat: new command `chronometrist-restart-task` 2021-06-12 01:52:32 +05:30
contrapunctus 29c8939a7d rename: task-active? -> task-active-p 2021-06-12 01:25:01 +05:30
contrapunctus 89afc959e9 Merge branch 'sparkline' into dev 2021-06-08 11:15:19 +05:30
contrapunctus 8a2c4c0b54 refactor: format-duration-long + create tests 2021-06-07 23:13:38 +05:30
contrapunctus 343a08665f fix(details): do not display user keywords if using format string 2021-06-05 15:18:12 +05:30
contrapunctus 2f1ea5fd1f Merge branch 'dev' into doc 2021-06-05 10:06:17 +05:30
contrapunctus 0e22c725db doc(docstring): update argument name in docstring 2021-06-05 10:05:37 +05:30
contrapunctus 5c5b7fc5e7 fix: address linter complaints 2021-06-03 22:26:59 +05:30
contrapunctus e1f6121230 fix: tangle tests to separate files 2021-06-03 02:12:04 +05:30
contrapunctus 753e8115cc Merge branch 'doc' into dev 2021-06-03 01:43:01 +05:30
contrapunctus 529cd544d0 fix: address byte compilation warnings 2021-06-03 01:26:19 +05:30
contrapunctus 7e2d531bcf doc: remove root heading, demote all child headings 2021-06-02 03:56:27 +05:30
contrapunctus 3c8be625ce fix: on-save tangling setup; -let instead of -let* in spark 2021-06-01 18:37:29 +05:30
contrapunctus a6c02aaf80 fix(distribution): ship Elisp file; remove literate-elisp dependency 2021-06-01 17:35:01 +05:30
contrapunctus 0d9c7a2fd4 Run package-lint; update links 2021-05-31 01:07:33 +05:30
contrapunctus d0d065a7d9 Bump versions 2021-05-18 15:21:19 +05:30
contrapunctus 81b12053bc Bump versions 2021-05-07 14:53:16 +05:30
contrapunctus c33b3ae3fe [literate] add literate-elisp dependency; remove tangling setup 2021-04-12 08:33:46 +05:30
contrapunctus 129c7f7d78 test: make test.sexp before running tests
This does away with the whole issue of discovering the test.sexp file accurately.

It's also the point where I have increasing misgivings about shipping
the Org file itself. The tests, explanation docs, and now test
data...might be a "lot of" extra bytes to download, for something most
users have no need of.
2021-02-23 06:42:08 +05:30
contrapunctus f6082aeb1e [fix] void variable error in chronometrist-report-entries 2021-02-22 18:03:32 +05:30
contrapunctus 3ea6df7f20 [tests] moved tests to Org files
Upside - no more jumping between definitions and tests

Downside - if we ship the Org file, users will have to download some more bytes
2021-02-22 18:02:39 +05:30
contrapunctus 36e17fb4d7 [bugfix] incorrectly split plists in chronometrist-events 2021-02-22 17:59:16 +05:30
contrapunctus 8b09562aca [WIP] [bugfix] incorrectly split plists in chronometrist-events 2021-02-22 02:11:45 +05:30
contrapunctus 3fe5260972 Style and documentation changes 2021-02-21 22:09:00 +05:30
contrapunctus 83bbe0bd6a [data structures] add reset command 2021-02-18 15:52:26 +05:30
contrapunctus 665705f1b5 [literate] tag functions according to their...function
Shorten file-empty-p

Merge `events->ts-pairs` and `ts-pairs->durations` into `events-to-durations` - they were only used in two places, both times with the results of the former being passed to the latter, and it didn't seem to me that they'd ever be used separately.

Rename all functions using the Scheme-like "foo->bar" naming scheme to the Elispy "foo-to-bar".

Move many docstrings out of source blocks into Org text and TODO items.

Remove unused chronometrist-report-date

Used `with` instead of `let` in chronometrist-report-entries

Use `loop` instead of `maphash` in `chronometrist-statistics-count-average-time-spent`
2021-02-16 13:11:30 +05:30
contrapunctus fbbfd1eeec [literate] checkdoc and package-lint changes 2021-02-15 05:31:34 +05:30
contrapunctus 3fb016cd75 [literate migration] add missing function 2021-02-11 15:48:26 +05:30
contrapunctus 2b02967dc9 [Literate migration] Add missing function 2021-02-11 14:52:50 +05:30
contrapunctus d87997a0cd Remove dependencies on anaphora and s 2021-02-11 13:37:36 +05:30
contrapunctus 203838aa49 Merge branch 'dev' into literate 2021-02-11 12:08:50 +05:30
contrapunctus d1b42bbf0d Bump versions 2021-02-11 11:31:05 +05:30
contrapunctus fd376c7cf1 iso-date->ts - use pattern matching 2021-02-09 01:38:17 +05:30
contrapunctus aab2590e98 count-active-days - rewrite using cl-loop 2021-02-09 01:30:36 +05:30
contrapunctus 9f94250d94 Move task-list function to backend 2021-02-09 01:17:22 +05:30
contrapunctus 5cd9c9db47 "Hash table" -> "Data structures", move task list and related functions 2021-02-09 00:35:29 +05:30
contrapunctus 9e1358dac9 Remove unnecessary variable whitespace-re 2021-02-09 00:20:59 +05:30
contrapunctus 4a7988e46d Remove blank lines 2021-02-09 00:04:48 +05:30
contrapunctus 39e66829e5 Update auto-tangle sed script 2021-02-08 14:40:28 +05:30
contrapunctus 3bed912dcc Emit newlines in tangled source 2021-02-08 01:05:21 +05:30
contrapunctus cb1293b6cd Move definitions from chronometrist-timer.el to chronometrist.org 2021-02-07 23:20:56 +05:30
contrapunctus f32f81844a Move definitions from chronometrist-time.el to chronometrist.org 2021-02-07 21:52:53 +05:30
contrapunctus d7ec8906f4 Move definitions from chronometrist-queries.el to chronometrist.org 2021-02-07 21:42:50 +05:30
contrapunctus 9bdf9fe47b Move definitions from chronometrist-migrate.el to chronometrist.org 2021-02-07 21:41:54 +05:30
contrapunctus 018fcdd858 Address some corner cases for task list updates 2021-02-05 17:11:28 +05:30
contrapunctus e11ac89359 Tangle chronometrist.org 2021-02-05 16:15:29 +05:30
contrapunctus a7b70b5a3e chronometrist.el - move definitions to chronometrist.org 2021-02-04 08:58:21 +05:30
contrapunctus 8be5eb1ccb refresh-file - add some more checks 2021-02-03 18:02:40 +05:30
contrapunctus 1d4d5591a1 file-change-type - clean up comments and indentation 2021-02-03 17:55:05 +05:30
contrapunctus 5da1912f17 Refactor refresh-file; create chronometrist-sexp-mode for sexp file 2021-02-02 18:48:54 +05:30
contrapunctus 09a5d127a1 (WIP) try to handle vanished/replaced file; unify partial update functions 2021-01-30 12:08:57 +05:30
contrapunctus 22ea8b4e99 Bump versions 2021-01-27 21:29:04 +05:30
contrapunctus 9a47f624bb Remove unnecessary refresh-file call
It is already called at the end of `chronometrist-in`
2021-01-27 21:26:38 +05:30