UNPKG

longform-markdown-splitter

Version:

Splits and transforms markdown files from obsidian for usage in hugo.

28 lines (27 loc) 1.21 kB
import { MD_Exporter_Parameter_Type } from "./md-exporter"; import { MD_FileContent_Interface } from "./md-filesystem"; import { MD_Observer_Interface, MD_ObserverSubject } from "./md-observer"; export interface MD_CopyTask_Type { source: string; target: string; simulate: boolean; } export interface MD_Transformer_Parameter_Type { tag_obsidian_prefix: string; tag_obsidian_suffix: string; find_rule?: string; replace_template: string; copy_task?: MD_CopyTask_Type; } export interface MD_Transformer_Interface { transform(file_content: MD_FileContent_Interface, index: number): MD_FileContent_Interface; set_job_parameter(job_paramter: MD_Exporter_Parameter_Type): void; addObserver(observer: MD_Observer_Interface): void; } export declare abstract class MD_Transformer_AbstractBase implements MD_Transformer_Interface { protected job_parameter: MD_Exporter_Parameter_Type; protected observer_subject: MD_ObserverSubject; abstract transform(file_content: MD_FileContent_Interface, index: number): MD_FileContent_Interface; set_job_parameter(job_paramter: MD_Exporter_Parameter_Type): void; addObserver(observer: MD_Observer_Interface): void; }