diff --git a/api.rkt b/api.rkt index 3a6d451..e88ebab 100644 --- a/api.rkt +++ b/api.rkt @@ -198,15 +198,12 @@ ; Returns a list of all modified post files in this commit (define (get-files) (map - (lambda (file) - (string-split - file - ":")) + string-split (string-split (with-output-to-string (lambda () (system - "git status --short | grep -E '^(A|M|D)' | awk '{ printf \"%s:%s\\n\",$1,$2 }' | grep -E '\\.post$'"))) + "git status --short | grep -E '\\.post$'"))) "\n"))) ; Parses a post file and returns the components @@ -237,8 +234,8 @@ ["D" (rm-post post-id)] - [m (error - (format "Unimplemented mode ~a" m))])) + [m (displayln + (format "Untracked file ~a" m))])) ; Get a list of all commit refs (define (get-commits) diff --git a/categorize.rkt b/categorize.rkt index face65f..f1ec378 100644 --- a/categorize.rkt +++ b/categorize.rkt @@ -14,6 +14,8 @@ (cons (path->string bottom) (categorize (path->string upper)))]))) +;(define (prefix-of + (define (get-categories path-string) (let ([non-categories (categorize (blog-location))]) (filter