We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfa87fe commit a7ed476Copy full SHA for a7ed476
utils.lisp
@@ -294,3 +294,17 @@ the subdirectory is absent or inconsistent."
294
(#\Nul
295
(write-string "[nul]" s))
296
(t (write-char char s))))))
297
+
298
+(defun gist-file (&key (description "No description") pathname (public t))
299
+ (unless pathname
300
+ (error "Pathname required"))
301
+ (flet ((js (&rest args)
302
+ (apply #'githappy:js args))
303
+ (table (&rest args)
304
+ (apply #'githappy:table args)))
305
+ (let ((value (alexandria:read-file-into-string pathname))
306
+ (key (file-namestring pathname)))
307
+ (githappy:create-gist :body
308
+ (githappy:js "description" description
309
+ "public" public
310
+ "files" (table key (table "content" value)))))))
0 commit comments