diff options
author | rsiddharth <s@ricketyspace.net> | 2019-06-18 19:50:23 -0400 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2019-06-18 19:50:23 -0400 |
commit | 315d13b733b3f41191279a6e897e4bbe89896004 (patch) | |
tree | fbcd118c966c1520cdc3cda1a12b557ddb4ac191 | |
parent | 96fba8d1e6436b258998921546537e74e338e00e (diff) |
hn/g: Add athings:list.
* hn/g (athings:list): New function.
-rwxr-xr-x | hn/g | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -13,6 +13,7 @@ (require racket/format) (require racket/string) +(require json) (require net/http-client) (require openssl) @@ -78,3 +79,8 @@ (call-with-input-file f (λ (in) (read-json in)))) (else (make-immutable-hash)))) +(define (athings:list) + (let ((f (build-path (athings:data-dir) "list"))) + (cond ((file-exists? f) (call-with-input-file f (λ (in) (read-json in)))) + (else '())))) + |