Documentation
¶
Index ¶
- type JSONExporter
- func (e *JSONExporter) ExportManifest(manifest *models.ExportManifest) error
- func (e *JSONExporter) ExportSpaces(ctx context.Context, spaces []models.Space, threads []models.Thread) error
- func (e *JSONExporter) ExportThread(thread *models.Thread) error
- func (e *JSONExporter) ExportThreadIndex(threads []models.Thread) error
- func (e *JSONExporter) ExportUser(user *models.User) error
- func (e *JSONExporter) LoadThread(uuid string) (*models.Thread, error)
- func (e *JSONExporter) LoadThreadIndex() (*models.ThreadIndex, error)
- func (e *JSONExporter) SaveThreadIndex(index *models.ThreadIndex) error
- func (e *JSONExporter) ThreadDetailExists(uuid string) bool
- type MarkdownExporter
- type PDFExporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONExporter ¶
type JSONExporter struct {
OutputDir string
}
JSONExporter writes data as formatted JSON files.
func (*JSONExporter) ExportManifest ¶
func (e *JSONExporter) ExportManifest(manifest *models.ExportManifest) error
ExportManifest writes the export manifest.
func (*JSONExporter) ExportSpaces ¶
func (e *JSONExporter) ExportSpaces(ctx context.Context, spaces []models.Space, threads []models.Thread) error
ExportSpaces writes the spaces/collections data and copies thread files into each space folder.
func (*JSONExporter) ExportThread ¶
func (e *JSONExporter) ExportThread(thread *models.Thread) error
ExportThread writes a single thread as a JSON file.
func (*JSONExporter) ExportThreadIndex ¶
func (e *JSONExporter) ExportThreadIndex(threads []models.Thread) error
ExportThreadIndex writes the thread listing index.
func (*JSONExporter) ExportUser ¶
func (e *JSONExporter) ExportUser(user *models.User) error
ExportUser writes the user profile data.
func (*JSONExporter) LoadThread ¶
func (e *JSONExporter) LoadThread(uuid string) (*models.Thread, error)
LoadThread reads a single thread from its JSON file on disk.
func (*JSONExporter) LoadThreadIndex ¶
func (e *JSONExporter) LoadThreadIndex() (*models.ThreadIndex, error)
LoadThreadIndex reads the cached thread index from disk. Returns nil if the file does not exist.
func (*JSONExporter) SaveThreadIndex ¶
func (e *JSONExporter) SaveThreadIndex(index *models.ThreadIndex) error
SaveThreadIndex persists the lightweight thread UUID list for resumable export.
func (*JSONExporter) ThreadDetailExists ¶
func (e *JSONExporter) ThreadDetailExists(uuid string) bool
ThreadDetailExists checks whether a thread's detail JSON already exists on disk.
type MarkdownExporter ¶
type MarkdownExporter struct {
OutputDir string
}
MarkdownExporter writes data as Markdown files.
func (*MarkdownExporter) ExportSpaces ¶
func (e *MarkdownExporter) ExportSpaces(ctx context.Context, spaces []models.Space, threads []models.Thread) error
ExportSpaces writes a summary Markdown file for all spaces and copies thread markdown into each space folder.
func (*MarkdownExporter) ExportThread ¶
func (e *MarkdownExporter) ExportThread(thread *models.Thread) error
ExportThread writes a single thread as a formatted Markdown file.
func (*MarkdownExporter) ExportUser ¶
func (e *MarkdownExporter) ExportUser(user *models.User) error
ExportUser writes the user profile as Markdown.
type PDFExporter ¶
type PDFExporter struct {
OutputDir string
}
PDFExporter generates PDF files from thread data using pure Go (no browser).
func NewPDFExporter ¶
func NewPDFExporter(outputDir string) *PDFExporter
NewPDFExporter creates a PDFExporter writing to the given output directory.
func (*PDFExporter) Close ¶
func (e *PDFExporter) Close()
Close is a no-op kept for interface compatibility.
func (*PDFExporter) ExportSpaces ¶
func (e *PDFExporter) ExportSpaces(ctx context.Context, spaces []models.Space, threads []models.Thread) error
ExportSpaces generates PDFs for threads within each space folder.
func (*PDFExporter) ExportThread ¶
func (e *PDFExporter) ExportThread(thread *models.Thread) error
ExportThread generates a PDF for a single thread.