draft.txt (1926B)
1 format of log 2 { 3 "id": <uuid>, 4 "parent_id": <uuid>, ..needed if graph? 5 "name": <alphanum>, 6 "display_name": <base64> (optional), 7 "access": [<acl_entry...>], (optional), 8 "created": <timestamp>, 9 "updated": <timestamp>, 10 "entries": [<log_entry>], 11 "children": [<log>], 12 } 13 14 format of log entry { 15 "id": <uuid>, 16 "body": <multipart/mixed>, 17 } 18 19 # if set, server should generate random challenge to be signed by key 20 format of acl entry 21 { 22 "engine": <'pgp'>, 23 "key": <key>, 24 } 25 26 format of sum type 27 { 28 "hash": <sha256>, 29 "digest": <digest>, 30 } 31 32 ---- 33 34 MVP 35 36 each log is in folder logs named by uuid 37 each folder must have an ini-formatted file .log with a [LOG] section defining 38 - id uuid 39 - parent uuid (optional) 40 - child uuid (optional) 41 42 each log entry is in folder entries named by uuid 43 (date, subject and all content is retrieved from multipart) 44 each folder much have an ini-formatted file .entry with: 45 - an [ENTRY] section with: log=<uuid> 46 - a [TASKWARRIOR] section with: uuid=<'*'|task-url> 47 each folder must have a file _content which will be the main text body and the first entry of the multipart 48 each folder MAY have additional files which will be folded down into the multipart 49 (for now a perl script will be used to generate the multiparts) 50 51 simple python script that can: 52 * CREATE a new log entry folder with optional parent uuid setting 53 - only argument is log uuid 54 - should take a taskwarrior uuid as flag option 55 * GENERATE a log entry file ready to insert into graph using a log entry folder 56 - filename digest of contents 57 - file output in logs/<uuid-of-log> directory with <digest_uuid> as filename 58 - should not overwrite existing entry if found 59 * SYNC will be a separate operation 60 61 --- 62 63 multipart: 64 65 Any header prefixed by X-WORKLOG- will be treated as an external reference. Currently only taskwarrior will be supported in uri format, eg: 66 X-WORKLOG-TASKWARRIOR: <uuid|task-url> 67 (only uuid will be ambiguous)