From: Gustav Eek Date: Mon, 25 Dec 2023 19:43:34 +0000 (+0100) Subject: Todo. Close the iCalendar complient output implementation X-Git-Url: https://git.g-eek.se/?a=commitdiff_plain;h=refs%2Fheads%2Ftodo;p=ranknauto.git Todo. Close the iCalendar complient output implementation --- diff --git a/DONE b/DONE index 83a9d16..f90d3c1 100644 --- a/DONE +++ b/DONE @@ -8,3 +8,43 @@ Archived entries from file /TODO/. Move items here which should not block the view of future, /TODO/. These are typically /DONE/, /CANCELLED/ and similar + + +* DONE Implement priority output compliant with RFC 5545 +CLOSED: [2023-12-25 mån 20:24] +:PROPERTIES: +:ARCHIVE_TIME: 2023-12-25 mån 20:33 +:ARCHIVE_FILE: ~/git/g-eek/ranknauto/TODO +:ARCHIVE_OLPATH: Features +:ARCHIVE_CATEGORY: TODO +:ARCHIVE_TODO: DONE +:END: +:LOGBOOK: +- State "DONE" from "TODO" [2023-12-25 mån 20:24] +- State "TODO" from [2023-12-25 mån 08:21] +:END: + +The [[https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.1.9][iCalendar standard]] defines the /PRIORITY/ field, with integer value type +ranging 0--9. It suggests two priority calendar user agents (CUA): + + 1. High > Medium > Low, for (1--4, 5, 6--9) and 0 undefined + 2. A1 > A2 > ... > C3, for (1, 2, ..., 9) and 0 undefined + +Other values for future use. Note that "[t]his property defines the relative +priority for a calendar component [... and it] is useful in prioritizing +multiple action items for a given time period." + +Implement a mapping from Rank N' Auto's 0--1 (0--100 %) to RFC 5545. Apply a +transformation defined as follows: + + \[ + \hat{x} = \left\lceil 9 \cdot \left( 1 - \frac{x}{x_{max}} + \right)\right\rceil + \] + +which is =ceil(9 * (1 - x / x_max))= + +Produce output according to 2: A, B, C for small N and A1, A2, ... otherwise. + +For future, comply with a 1 version: High, Medium, Low. + diff --git a/TODO b/TODO index ecaf871..a917fc2 100644 --- a/TODO +++ b/TODO @@ -30,36 +30,6 @@ Most of code should probably be a library, /lib/, according to the Rust book the Library’s Functionality with Test Driven Development]]. * Features - -** TODO Implement priority output compliant with RFC 5545 -:LOGBOOK: -- State "TODO" from [2023-12-25 mån 08:21] -:END: - -The [[https://datatracker.ietf.org/doc/html/rfc5545#section-3.8.1.9][iCalendar standard]] defines the /PRIORITY/ field, with integer value type -ranging 0--9. It suggests two priority calendar user agents (CUA): - - 1. High > Medium > Low, for (1--4, 5, 6--9) and 0 undefined - 2. A1 > A2 > ... > C3, for (1, 2, ..., 9) and 0 undefined - -Other values for future use. Note that "[t]his property defines the relative -priority for a calendar component [... and it] is useful in prioritizing -multiple action items for a given time period." - -Implement a mapping from Rank N' Auto's 0--1 (0--100 %) to RFC 5545. Apply a -transformation defined as follows: - - \[ - \hat{x} = \left\lceil 9 \cdot \left( 1 - \frac{x}{x_{max}} - \right)\right\rceil - \] - -which is =ceil(9 * (1 - x / x_max))= - -Produce output according to 2: A, B, C for small N and A1, A2, ... otherwise. - -For future, comply with a 1 version: High, Medium, Low. - ** TODO Test command line input and output :LOGBOOK: - State "TODO" from [2023-03-28 tis 08:21]