/nactivitypub

ActivityPub & ActivityStreams support library for Common Lisp.

Primary LanguageCommon LispBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

NactivityPub

NactivityPub is an implementation of ActivityPub (and underlying ActivityStreams) standards for Common Lisp.

Features:

  • Parsing and un-parsing ActivityStreams JSON-LD objects to/from CLOS objects with convenient accessors on those.
  • Sending and fetching ActivityStreams objects from the ActivityStreams-enabled HTTP(S) URLs.
  • Semantic info extraction with methods like name*, url*, author*, published*, items*.
  • No reliance on JSON parser—simply use (or implement, if it’s not yet there) your preferred JSON backend for NJSON, and don’t depend on additional JSON libraries.

Getting started

Clone the Git repository to where the compiler can find it:

git clone --recursive https://github.com/atlas-engineer/nactivitypub ~/common-lisp/

And then load

  • All the NactivityPub dependencies.
  • NJSON backend you prefer, and
  • NactivityPub itself:
(ql:quickload :njson/cl-json)
(ql:quickload :nactivitypub)

And hack away, fetching objects from ActivityPub-enabled pages and playing with those in REPL:

(nactivitypub:name* (nactivitypub:fetch-object "https://ephemeral.glitch.social/@aartaka"))
;; => "Stuffed Plush Capybara"

See package.lisp for a more high-level overview of the API, and docstrings of the exported methods for more granular info.

Roadmap

  • [ ] Parse JSON-LD according to the standard.
  • [ ] Fetch JSON-LD schemes and somehow transform those into CLOS objects/classes too.
  • [ ] Add tests.