My personal data management layer
at main 91 lines 2.8 kB view raw
1(*--------------------------------------------------------------------------- 2 Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 SPDX-License-Identifier: ISC 4 ---------------------------------------------------------------------------*) 5 6(** Bushel - Personal knowledge base and research entry management 7 8 Bushel is a library for managing structured research entries including 9 notes, papers, projects, ideas, videos, and contacts. It provides typed 10 access to markdown files with YAML frontmatter and supports link graphs, 11 markdown processing with custom extensions, and search integration. 12 13 {1 Entry Types} 14 15 - {!Note} - Blog posts and research notes 16 - {!Paper} - Academic papers with BibTeX metadata 17 - {!Project} - Research projects 18 - {!Idea} - Research ideas/proposals 19 - {!Video} - Talk videos and recordings 20 21 {1 Core Modules} 22 23 - {!Entry} - Union type for all entry types with common operations 24 - {!Tags} - Tag parsing and filtering 25 - {!Md} - Markdown processing with Bushel link extensions 26 - {!Link_graph} - Bidirectional link tracking between entries 27 28 {1 Quick Start} 29 30 {[ 31 (* Load entries using bushel-eio *) 32 let entries = Bushel_loader.load fs "/path/to/data" in 33 34 (* Look up entries by slug *) 35 match Bushel.Entry.lookup entries "my-note" with 36 | Some (`Note n) -> Printf.printf "Title: %s\n" (Bushel.Note.title n) 37 | _ -> () 38 39 (* Get backlinks *) 40 let backlinks = Bushel.Link_graph.get_backlinks_for_slug "my-note" in 41 List.iter print_endline backlinks 42 ]} 43*) 44 45(** {1 Entry Types} *) 46 47module Note = Bushel_note 48(** Blog post and research note entries. *) 49 50module Paper = Bushel_paper 51(** Academic paper entries with BibTeX-style metadata. *) 52 53module Project = Bushel_project 54(** Research project entries. *) 55 56module Idea = Bushel_idea 57(** Research idea/proposal entries. *) 58 59module Video = Bushel_video 60(** Video/talk recording entries. *) 61 62(** {1 Core Modules} *) 63 64module Entry = Bushel_entry 65(** Union type for all entry types with common accessors. *) 66 67module Tags = Bushel_tags 68(** Tag parsing, filtering, and counting. *) 69 70module Md = Bushel_md 71(** Markdown processing with Bushel link extensions. *) 72 73module Link = Bushel_link 74(** External link tracking and merging. *) 75 76module Link_graph = Bushel_link_graph 77(** Bidirectional link graph for entry relationships. *) 78 79module Description = Bushel_description 80(** Generate descriptive text for entries. *) 81 82(** {1 Utilities} *) 83 84module Types = Bushel_types 85(** Common types and Jsont codecs. *) 86 87module Doi_entry = Bushel_doi_entry 88(** DOI entries resolved from external sources. *) 89 90module Util = Bushel_util 91(** Utility functions (word counting, text processing). *)