
Basic unit renamed from Note to Text. New modular text-parser, internal to Logarion, for generic notation parsing. The default input format is now a much plainer text. Eliminated Meta module and generally lib/ modules. New Store interface, with additional information from Store. For example the converter can now check filesystem dates. Changed to filesystem hardlinks for tracking publications & indexing, instead of categories. New commands `publish [-i]` and `deindex [-u]`. Categories are ignored now. Logarion created texts have part of the UUID instead of a counter in their filename. New -i, --interactive flag for interactive creation & publication. Logarion's index re-written in Messagepack format. Removed `indices` command. They are generated during `convert`.
34 lines
1.3 KiB
OCaml
34 lines
1.3 KiB
OCaml
(*let module S = Set.Make (Text) in*)
|
|
(*let module M = Map.Make (String) in*)
|
|
(*let module I = Map.Make (Id) in*)
|
|
(*let aggr = I.empty, M.empty, M.empty, M.empty in*)
|
|
(*let fn (id, a, t, k) (n,_) =*)
|
|
(* let id = I.add n.Text.uuid n id in*)
|
|
(* let a =*)
|
|
(* let f e a = M.update (e.Person.name) (function Some v -> Some (S.add n v) | None -> Some (S.singleton n)) a in*)
|
|
(* Person.Set.fold f n.Text.authors a in*)
|
|
(* let t =*)
|
|
(* let f e a = M.update e (function Some v -> Some (S.add n v) | None -> Some (S.singleton n)) a in*)
|
|
(* String_set.fold f (Text.set "Topics" n) t in*)
|
|
(* let k =*)
|
|
(* let f e a = M.update e (function Some v -> Some (S.add n v) | None -> Some (S.singleton n)) a in*)
|
|
(* String_set.fold f (Text.set "Keywords" n) k in*)
|
|
(* (id, a, t, k)*)
|
|
|
|
module Make (Store : Store.T) = struct
|
|
include Store
|
|
let predicate fn opt = Option.(to_list @@ map fn opt)
|
|
|
|
let authored query_string =
|
|
let q = Person.Set.of_query @@ String_set.query query_string in
|
|
fun n -> Person.Set.predicate q n.Text.authors
|
|
|
|
let keyworded query_string =
|
|
let q = String_set.query query_string in
|
|
fun n -> String_set.(predicate q (Text.set "Keywords" n))
|
|
|
|
let topics query_string =
|
|
let q = String_set.query query_string in
|
|
fun n -> String_set.(predicate q (Text.set "Topics" n))
|
|
end
|