Module Bushel_sync

Bushel sync orchestration

Re-exported Modules

module Zotero : sig ... end

DOI resolution via Zotero Translation Server

module Peertube : sig ... end

Video metadata and thumbnails from PeerTube

module Http : sig ... end

HTTP client using the requests library

module Karakeep : sig ... end

Karakeep link sync

val src : Logs.src
module Log : Logs.LOG

Sync Steps

type step =
  1. | Git
    (*

    Pull from remote git repository

    *)
  2. | Images
    (*

    Rsync images from remote

    *)
  3. | Srcsetter
    (*

    Run srcsetter on images

    *)
  4. | Thumbs
    (*

    Generate paper thumbnails from PDFs

    *)
  5. | Faces
    (*

    Copy contact faces from Sortal

    *)
  6. | Videos
    (*

    Fetch video thumbnails from PeerTube

    *)
  7. | Dois
    (*

    Resolve DOIs from links.yml via Zotero

    *)
val string_of_step : step -> string
val step_of_string : string -> step option
val all_steps : step list

Step Results

type step_result = {
  1. step : step;
  2. success : bool;
  3. message : string;
  4. details : string list;
}
val pp_result : Format.formatter -> step_result -> unit

Rsync Images

val sync_images : dry_run:bool -> env:Eio_unix.Stdenv.base -> Bushel_config.t -> step_result

Srcsetter

val run_srcsetter : dry_run:bool -> fs:[> Eio.Fs.dir_ty ] Eio.Path.t -> proc_mgr:[> [> `Generic ] Eio.Process.mgr_ty ] Eio.Process.mgr -> Bushel_config.t -> step_result

Paper Thumbnails

val generate_paper_thumbnails : dry_run:bool -> fs:[> Eio.Fs.dir_ty ] Eio.Path.t -> proc_mgr:[> [> `Generic ] Eio.Process.mgr_ty ] Eio.Process.mgr -> Bushel_config.t -> step_result

Contact Faces

val sync_faces : dry_run:bool -> fs:Eio.Fs.dir_ty Eio.Path.t -> Bushel_config.t -> Bushel.Entry.t -> step_result

Video Thumbnails

val sync_video_thumbnails : dry_run:bool -> http:Requests.t -> Bushel_config.t -> Bushel.Entry.t -> step_result

Git Pull

val sync_git : dry_run:bool -> env:Eio_unix.Stdenv.base -> data_dir:string -> Bushel_config.t -> step_result

Run Pipeline

val sync_dois : dry_run:bool -> retry_errors:bool -> http:Requests.t -> data_dir:string -> config:Bushel_config.t -> step_result
val run : dry_run:bool -> retry_errors:bool -> sw:Eio.Switch.t -> env:Eio_unix.Stdenv.base -> data_dir:string -> config:Bushel_config.t -> steps:step list -> entries:Bushel.Entry.t -> step_result list