aboutsummaryrefslogtreecommitdiffstats
path: root/l/src/config.lisp
AgeCommit message (Collapse)Author
2021-02-27Move everything from `l/` into the project rootTeddy Wing
This is the final project. Now that we got rid of the web extension and native host code, we can move the Lisp code to the root.
2021-02-21make-config: Add function documentationTeddy Wing
2021-02-21Add `--debug` option to print debug outputTeddy Wing
Let's keep a way to print WebSocket messages for debugging purposes in the release build rather than remove the messages completely. Since I've been struggling with the messages so much it seems like this could be a useful thing to have.
2021-02-14config: Remove `(setf socket-url)` methodTeddy Wing
Don't need this now that we have a `make-config` constructor.
2021-02-03main: Get WebSocket URL from command line for `*client*`Teddy Wing
Keep the `*client*` global variable, but use the client in `config`, constructed from the WebSocket URL passed from the command line. Not a huge fan of the global variable, but it's way easier to keep it like this rather than passing the client down to the `attach-to-target` and `reload-extension` functions.
2021-02-03config: Initialise a new websocket-driver client on new configTeddy Wing
Add a new `make-config` function to construct a `config` object. This creates a new websocket-driver client and stores it in the `ws-client` slot in the `config`. Before this, I thought about using a writer method on the `socket-url` slot that creates a new client. This didn't work in `make-instance` though. Perhaps there's a way to have the `:initarg` use the writer, but I'm not sure.
2021-02-03main: Move option parsing code to new function `parse-options`Teddy Wing
Make a new function `parse-options` that parses the command line options and returns a `config` object. We'll use that object instead of `options` in `main`. Cleans up the `main` function a bit. Currently, we just print the `config` object to ensure we're storing the proper values. Followed Practical Common Lisp's example to implement `print-object` so we can see the contents of its slots: http://www.gigamonkeys.com/book/practical-a-spam-filter.html#the-heart-of-a-spam-filter Still need to implement error checking for a missing `--socket-url` option.
2021-02-02Add config classTeddy Wing
We'll use this as a storage container for the command line options.