Gustav Eek [Mon, 25 Dec 2023 18:41:10 +0000 (19:41 +0100)]
Src. Provide CUA priority
Add a function *lib.icalprio*, which returns the CUA string mapping of
priorities. In output, add a version of post in the case theses should
be printed.
Gustav Eek [Mon, 25 Dec 2023 14:52:22 +0000 (15:52 +0100)]
Src. Parse the iCalendar (org-mode) priority pattern
This implements only the parsing in *lib.winnow* of priority patterns:
`(A)`, `(A1)`, `[#A]`, etc. The priority pattern occurse after any
bullets, numbers or priorities: ` 8. 45 % [#A] Text`.
The operation is the similar to the owne with numbers. The difference
is that the iCalendar priority patterns apply only after the other
patterns.
Gustav Eek [Mon, 27 Mar 2023 22:18:09 +0000 (00:18 +0200)]
Src. Add piped table parsing and printing
Identify piped table start as a *bullet* pattern. The *prio* pattern
also is update to capture the possible (in case of old priorities)
trailing pipe sign. The pipes are printed as new *pre*/*pst* (post)
patterns. A test is also added.
Gustav Eek [Mon, 6 Mar 2023 09:28:35 +0000 (10:28 +0100)]
Sys. Refactor number parsing for length and readability
"The rule of index of the longest match" is introduced also for bullet
parsing. In finding longest index, the length vector middle step is
removed for the benefit of iterator chaining. The *conf* templates are
produced symmetrically between bullet and number patterns. Debug
printing is reduced, concentrated and made symmetric. Finally, a
bullet test is updated as a consequence of introducing the longest
index rule for bullets.
Gustav Eek [Sun, 5 Mar 2023 18:17:45 +0000 (19:17 +0100)]
Src. Add parsing and printing of numbered item lists.
Add a member *number* to *Conf* struct, which is a printing template
for the case of numbered list. In *winnow*, identify number patterns,
store it them as template in *conf* and remove it. In *output* print
according to pattern. Also provide some basic tests.
A special treatment is in printing is that number width is adopted to
the length for right alignment. A special treatment in parsing is that
the widest numbered list item should be used for pattern definition.
Only for that you can tell about leading and trailing spaces.
TODO Clean up (refactor) number pattern parsing in *winnow*.
TODO Write some useful instructions in *README* from above commit
message.
Gustav Eek [Sun, 26 Feb 2023 07:46:28 +0000 (08:46 +0100)]
Src. Handle bullet lists
Support for bullet list input is implemented with regular expressions
in *winnow*. The configuration struct stores bullet format if
found. Function *output* implements the printing. Testing is completed
for all above.
Gustav Eek [Sun, 26 Feb 2023 07:41:18 +0000 (08:41 +0100)]
Src. Refactor. Prepare for storing output modes.
A configuration struct is added for storing various output
modes. Function *winnow* returns this *config*. The *winnow* function
is changed to be called by value.
Gustav Eek [Sun, 19 Feb 2023 16:26:29 +0000 (17:26 +0100)]
Src. Split input function and provide tests
* Refactor a split of the *input* function into *winnow*
* Trim and remove empty items
* Provice two tests for input cleaning
* Clean up among *use* headers