updated via script

main
m455 2018-03-12 10:02:54 -04:00
parent 845db119ae
commit e26e78c58c
1 changed files with 20 additions and 0 deletions

20
rodo.rkt 100755
View File

@ -0,0 +1,20 @@
#! /usr/bin/env racket
#lang racket/base
(define message (hash
'help-message "For usage type `rodo -h` or `rodo --help`"
'file-not-found ".rodo file was not found in your home directory. Would you like to create it?"
'file-exists ".rodo file exists"
'item-added "Item added"
'item-removed "item removed"
'initializing "Initializing rodo in your home directory"))
(define (todo-list-exist?)
(if (file-exists? (expand-user-path "~/.rodo"))
; the displayln here removes the quotes from appearing
; in the stdout. from ".rodo file exists" -> .rodo file exists
; not sure if this is the cleanest way to do so
(displayln (hash-ref message 'file-exists))
(displayln (hash-ref message 'file-not-found))))
(todo-list-exist?)