2.6 KiB
Sico: Rockie's Robot Butler
Installation
sico
will soon be installable via MELPA. Otherwise you can add this directory to your load-path
and (require 'sico)
.
Usage
Basic Usage
-
src_emacs-lisp[:exports code]{(customize-group 'sico)}
- At the bare minimum, customize
sico-rooms
andsico-users
- At the bare minimum, customize
- You may also want to customize
matrix-homeserver-base-url
M-x sico-start
will connect Sico to the Matrix homeserver and begin polling for events
Extending
Customizing the Note Taker
The note taker is a simple wrapper around org-capture
, which gives you a nice simple wedge with
which to get your way in to an org-mode document
Begin by defining a capture-template:
(add-to-list 'org-capture-templates
'("A"
"Automatic note taking using Sico"
entry
(file org-default-notes-file)
"* %c :NOTE:NOEXPORT:"
:immediate-finish t))
The important bits here are:
- The usage of
%c
, which will be expanded to the head of the kill-ring. Sico stores the note in there as an easy way to push it in to Org-Mode. - The usage of
:immediate-finish t
, since Sico is not helping you do interactive things over Matrix, you need to make sure the Capture dialog doesn't stay open.
Do read the Org-Mode documentation on Capture Tepmlates ((info "org#Capture templates")
inside of
Emacs), as it is quite helpful.
New Listeners
Creating new listeners is fairly trivial. Create a function which takes a single argument, which is
the sexp representation of a Matrix.org room event. It can do whatever you want it to do with that
event, for a minimal example, see the source for sico-capture-note
.
Once you have your function defined, add a cons to the alist sico-listeners
where the car is the
regexp that will match the event, and the cdr is the symbol for the function you've just defined.
Contributing
To submit patches:
- Clone the repo
- Create a git branch, code in a branch.
-
When you're done, send me a
git format-patch
style patchgit format-patch --to ryan@whatthefuck.computer master..HEAD > YOURBRANCHNAME.patch
-
Mail that patch to me at ryan@whatthefuck.computer, and I will integrate it.
- Or send it to me on Matrix, I'm
@rrix:whatthefuck.computer
- Or send it to me on Matrix, I'm
Project Discussion happens in #ft_kickass:whatthefuck.computer
License
See LICENSE in the root of the repository for legal information.