Documentation
¶
Index ¶
- func GetPadTxt(pad pad2.Pad, revNum *int) (*string, error)
- type AText
- type ChatMessage
- type EtherpadExport
- type EtherpadImport
- type ExportDocx
- type ExportEtherpad
- type ExportHtml
- type ExportMarkdown
- type ExportOdt
- type ExportPDF
- type ExportTxt
- type FindURLPair
- type GlobalAuthor
- type Importer
- func (i *Importer) ExtractEtherpadFromPdf(content []byte) ([]byte, error)
- func (i *Importer) ExtractTextFromDocx(content []byte) (string, error)
- func (i *Importer) ExtractTextFromEtherpadJson(content []byte) (string, error)
- func (i *Importer) ExtractTextFromOdt(content []byte) (string, error)
- func (i *Importer) ExtractTextFromPdf(content []byte) (string, error)
- func (i *Importer) ExtractTextFromRtf(content []byte) (string, error)
- func (i *Importer) SetPadHTML(pad *padModel.Pad, htmlContent string, authorId string) error
- func (i *Importer) SetPadRaw(padId string, content []byte, authorId string) error
- func (i *Importer) SetPadText(pad *padModel.Pad, text string, authorId string) error
- type PadData
- type Pool
- type PoolWithAttribToNum
- type Revision
- type RevisionMeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChatMessage ¶
type EtherpadExport ¶
type EtherpadExport struct {
Pad map[string]PadData `json:"-"`
Authors map[string]GlobalAuthor `json:"-"`
Chats map[string]ChatMessage `json:"-"`
Revisions map[string]Revision `json:"-"`
}
func (EtherpadExport) MarshalJSON ¶
func (e EtherpadExport) MarshalJSON() ([]byte, error)
type EtherpadImport ¶
type EtherpadImport struct {
// contains filtered or unexported fields
}
type ExportDocx ¶
func NewExportDocx ¶
func (*ExportDocx) GetPadDocxDocument ¶
func (e *ExportDocx) GetPadDocxDocument(padId string, optRevNum *int) ([]byte, error)
type ExportEtherpad ¶
type ExportEtherpad struct {
PadManager *pad.Manager
AuthorManager *author.Manager
// contains filtered or unexported fields
}
func NewExportEtherpad ¶
func (*ExportEtherpad) GetPadRaw ¶
func (e *ExportEtherpad) GetPadRaw(padId string, readOnlyId *string) (*EtherpadExport, error)
type ExportHtml ¶
type ExportHtml struct {
PadManager *padLib.Manager
AuthorManager *author.Manager
Hooks *hooks.Hook
}
func NewExportHtml ¶
func (*ExportHtml) Export ¶
func (e *ExportHtml) Export(padId string, revNum *int) (string, error)
Export returns a rendered HTML string (for interface compatibility)
func (*ExportHtml) GetPadHTML ¶
func (e *ExportHtml) GetPadHTML(pad *padModel.Pad, revNum *int, authorColors map[string]string) (string, error)
GetPadHTML returns the HTML content for a pad (without document wrapper)
func (*ExportHtml) GetPadHTMLDocument ¶
func (e *ExportHtml) GetPadHTMLDocument(padId string, revNum *int, readOnlyId *string) (string, error)
GetPadHTMLDocument returns the full HTML document for a pad
type ExportMarkdown ¶ added in v0.0.4
func NewExportMarkdown ¶ added in v0.0.4
func NewExportMarkdown(padManager *pad.Manager, hooksSystem *hooks.Hook) *ExportMarkdown
func (*ExportMarkdown) GetPadMarkdownDocument ¶ added in v0.0.4
func (em *ExportMarkdown) GetPadMarkdownDocument(padID string, revNum *int) (*string, error)
type ExportOdt ¶
func NewExportOdt ¶
type FindURLPair ¶ added in v0.0.4
type GlobalAuthor ¶
type Importer ¶
type Importer struct {
// contains filtered or unexported fields
}
func NewImporter ¶
func (*Importer) ExtractEtherpadFromPdf ¶
ExtractEtherpadFromPdf extracts embedded Etherpad JSON data from a PDF file This is similar to how ZUGFeRD embeds XML in PDF, but uses JSON for Etherpad data Returns nil if no embedded Etherpad data is found
func (*Importer) ExtractTextFromDocx ¶
ExtractTextFromDocx extracts text content from a DOCX file
func (*Importer) ExtractTextFromEtherpadJson ¶
ExtractTextFromEtherpadJson extracts the plain text content from Etherpad JSON export
func (*Importer) ExtractTextFromOdt ¶
ExtractTextFromOdt extracts text content from an ODT file
func (*Importer) ExtractTextFromPdf ¶
ExtractTextFromPdf extracts text content from a PDF file using the ledongthuc/pdf library
func (*Importer) ExtractTextFromRtf ¶
ExtractTextFromRtf extracts text content from an RTF file
func (*Importer) SetPadHTML ¶
SetPadHTML imports HTML content into a pad Note: This currently imports only the text content. Full formatting support would require complex changeset generation which is error-prone. For full formatting preservation, export/import via .etherpad format is recommended.
type PoolWithAttribToNum ¶
type Revision ¶
type Revision struct {
Changeset string `json:"changeset"`
Meta RevisionMeta `json:"meta"`
}
type RevisionMeta ¶
type RevisionMeta struct {
Author *string `json:"author"`
Timestamp *int64 `json:"timestamp"`
Pool *PoolWithAttribToNum `json:"pool,omitempty"`
AText *AText `json:"atext,omitempty"`
}