inside the engine · from ARCHITECTURE.md at v0.6.1
Where to add things
- A new source format. Shipped: text and Markdown, Word, PowerPoint, PDF, Excel, HTML with its
images, MHTML archives, and legacy Office through LibreOffice. Add a module under intake/extractors/ that subclasses
Extractor, declares its extensions, and returns aDocument. Register it in the extractors package. No core file changes. - A new command. Add
cli/<name>.pywithcmd_*handlers andregister(sub), then list it inCOMMANDSin cli/init.py. Useproject_argumentsfor the--projectflag. - A new compile output. Add a stage module with
run(project)and append it toSTAGESin builder.py. Add every path it writes togenerated_paths, or the transaction cannot restore it. - A new query tool. Add a
*_textfunction and aTOOLSentry in serve/engine.py. The CLI mode maps a command word to the same function. - A new starter vocabulary. Export one from a project with
oto ontology export, which writes it to~/.oto/ontologies/<name>/(orOTO_ONTOLOGIES). A user ontology shadows a shipped one of the same name, andoto init --ontologyalso accepts a directory path. To ship one with the package, add the same four files under ontologies/; the ontology test takes it through init, build and a query automatically.