updated via script

main
m455 2018-04-10 12:43:59 -04:00
parent 656089add8
commit 0dcd0bf5ec
1 changed files with 14 additions and 8 deletions

View File

@ -3,7 +3,8 @@
(require racket/vector (require racket/vector
racket/file racket/file
racket/string) racket/string
racket/list)
(define program-name "rodo") (define program-name "rodo")
(define program-directory ".rodo/") (define program-directory ".rodo/")
@ -160,12 +161,17 @@
program-path program-path
program-directory)))) program-directory))))
(define (add-bullets) (define (make-numbered lst)
(map
string-append
(map
number->string
(range (length lst)))
lst))
(define (add-spaces)
(lambda (lst) (lambda (lst)
(string-append (string-append ". " lst)))
bullet
" "
lst)))
(define (show-list-from-file) (define (show-list-from-file)
(let (let
@ -176,13 +182,13 @@
program-directory program-directory
program-file))]) program-file))])
(let (let
([todo-items ([todo-list
(file->lines path (file->lines path
#:mode 'text #:mode 'text
#:line-mode 'linefeed)]) #:line-mode 'linefeed)])
(display (display
(string-join (string-join
(map (add-bullets) todo-items) (make-numbered (map (add-spaces) todo-list))
"\n" "\n"
#:after-last "\n"))))) #:after-last "\n")))))