From ca75a8f0f3860f0ac64eaf7fdeaec422912fcd99 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 8 May 2022 18:07:27 +0200 Subject: Parse command line options * Define command line options for the program * Define Make rules to build a binary * Fix system entrypoint definition * Comment out some application code to test command line option parsing --- src/main.lisp | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'src/main.lisp') diff --git a/src/main.lisp b/src/main.lisp index 2ac7daf..938a950 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -7,14 +7,18 @@ ;; Send email to ^maildir^program^ containing message with issue metadata ;; Continue to next page - (let ((config (make-instance 'config - :login "name@example.com" - :token "atlassian-token" - :endpoint "example.atlassian.net" - :email-to "name@example.com" - :jql "project = \"FAKE\" AND watcher != currentUser() AND key > \"FAKE-100\" ORDER BY created DESC"))) - - (run config))) + (let ((config (parse-options))) + (format t "~S" config)) + + ; (let ((config (make-instance 'config + ; :login "name@example.com" + ; :token "atlassian-token" + ; :endpoint "example.atlassian.net" + ; :email-to "name@example.com" + ; :jql "project = \"FAKE\" AND watcher != currentUser() AND key > \"FAKE-100\" ORDER BY created DESC"))) + ; + ; (run config)) + ) (defun run (config) (let ((basic-auth-token (cl-base64:string-to-base64-string @@ -89,10 +93,10 @@ (when (verbose config) (format t "Watching issue ~A~%" (gethash "key" issue))) - (add-watcher - (endpoint config) - issue - :basic-auth-token basic-auth-token) + ; (add-watcher + ; (endpoint config) + ; issue + ; :basic-auth-token basic-auth-token) (if (sendmail config) (deliver-email config issue))) -- cgit v1.2.3