package activitypub_client
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Creating clients.
This module allows to create client programs, handling multiple actors. It installs a Logs.reporter
. Command line options can be added.
module AP = Activitypub
val run :
?usage:Stdlib.Arg.usage_msg ->
?options:(Stdlib.Arg.key * Stdlib.Arg.spec * Stdlib.Arg.doc) list ->
(Conf.t -> (module Actor.T) Iri.Map.t -> string list -> 'a Lwt.t) ->
'a
run f
will parse command line then call f
. -c
and --init-conf
options are already defined, but more can be added using the ~options
argument. -c
specifies the configuration file to use (default is "conf.json"
. --init-conf
will write a default configuration file if it is not present. The usage
optional arugment can be used to replace the default usage message.
f
is called with the configuration content, the map (IRI -> Actor.T
) built from the configuration and the anonymous command line arguments.
The configuration file contains a list of actors, and must have the following form:
{
actors: {
"https://my-server.bar/actors/alice": {
jsonld_cache_dir: "jsonld-cache",
cache_dir: null,
token: "alice/jAB7HO7+BO/fPACKtT6xfKulEDmBH+gHQybHyg0dDM0=",
media_post_iri: "https://my-favorite-media-host.foo/"
},
"https://another-server.gee/actors/bob": {
...
},
...
}
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>