and todo list code for stream and read word changes.
: get-live-updater-js* ( stream -- string )
#! Read all lines from the stream, creating a string of the result.
- dup freadln dup [ , "\n" , get-live-updater-js* ] [ drop fclose ] ifte ;
+ dup stream-readln dup [ , "\n" , get-live-updater-js* ] [ drop stream-close ] ifte ;
: get-live-updater-js ( filename -- string )
#! Return the liveUpdater javascript code as a string.
: read-todo ( -- <todo> )
#! Read a todo list from the current input stream.
- read url-decode read url-decode <todo>
- read str>number [
+ read-line url-decode read-line url-decode <todo>
+ read-line str>number [
dup
<namespace> [
- read url-decode "yes" = "complete?" set
- read url-decode "priority" set
- read url-decode "description" set
+ read-line url-decode "yes" = "complete?" set
+ read-line url-decode "priority" set
+ read-line url-decode "description" set
] extend add-todo-item
] times ;
#! Number of seconds to timeout continuations in
#! continuation table. This value will need to be
#! tuned. I leave it at 24 hours but it can be
- #! higher/lower as needed. Default to 12 hours for
+ #! higher/lower as needed. Default to 15 minutes for
#! testing.
- 12 3600 * ;
+ 900 ;
: redirect-enabled?
#! Set to true if you want the post-redirect-get pattern