Fix typo and implement dummy version (without api calls) in chicken scheme

This commit is contained in:
heyarne 2022-07-08 15:36:58 +02:00
commit f08114fa0d
2 changed files with 43 additions and 11 deletions

View file

@ -1,9 +1,10 @@
(import (chicken io)
(chicken process-context)
(chicken random))
(chicken random)
(chicken format))
(define *api-url* (get-environment-variable "MASTODON_API_URL"))
(define *access-tolen* (get-environment-variable "MASTODON_ACCESS_TOKEN"))
(define *access-token* (get-environment-variable "MASTODON_ACCESS_TOKEN"))
(define (file-lines file-path)
(let ((file (open-input-file file-path)))
@ -28,4 +29,6 @@
(cons (car ls) (list-remove-nth (cdr ls) (- n 1)))))
(let ((nth (pseudo-random-integer (length lines))))
(display (list-nth lines nth)))
(display "Seize the means of ")
(display (list-nth lines nth))
(display "\n"))