Description
This library is for generation of ODF document with Go.
You can produce a document with content by calling the Formatter methods. Then you can save this document to zip-file .odf
No need for your code to handle with ODF XML content. More examples in demo/report.go
ODF alternatives and similar packages
Based on the "Specific Formats" category.
Alternatively, view ODF alternatives based on common mentions on social networks and blogs.
-
bluemonday
bluemonday: a fast golang HTML sanitizer (inspired by the OWASP Java HTML Sanitizer) to scrub user generated content of XSS -
omniparser
omniparser: a native Golang ETL streaming parser and transform library for CSV, JSON, XML, EDI, text, etc. -
html-to-markdown
⚙️ Convert HTML to Markdown. Even works with entire websites and can be extended through rules. -
mxj
Decode / encode XML to/from map[string]interface{} (or JSON); extract values with dot-notation paths and wildcards. Replaces x2j and j2x packages. -
go-pkg-rss
DISCONTINUED. This package reads RSS and Atom feeds and provides a caching mechanism that adheres to the feed specs. -
goq
A declarative struct-tag-based HTML unmarshaling or scraping package for Go built on top of the goquery library -
go-pkg-xmlx
DISCONTINUED. Extension to the standard Go XML package. Maintains a node tree that allows forward/backwards browsing and exposes some simple single/multi-node search functions. -
github_flavored_markdown
GitHub Flavored Markdown renderer with fenced code block highlighting, clickable header anchor links. -
pagser
Pagser is a simple, extensible, configurable parse and deserialize html page to struct based on goquery and struct tags for golang crawler -
csvplus
csvplus extends the standard Go encoding/csv package with fluent interface, lazy stream operations, indices and joins.
CodeRabbit: AI Code Reviews for Developers
Do you think we are missing an alternative of ODF or a related project?
Popular Comparisons
README
ODF
Open Document Format (ODF) producer library for Go (golang).
Описание
Формирование документа в формате Open Document (ODF) для языка Go (golang).
Формирование документа заключается в последовательном вызове инструкций Форматтера, который выполняет модификацию одной или нескольких частей модели документа. Затем вызывается процедура генерации файла-архива .odf
Клиентский код изолируется от особенностей структуры документа ODF.
Необходимость форматтера обсуловлена тем, что стандарт ODF предполагает изменение видимого содержимого документа посредством изменений в нескольких местах модели документа (стили, встроенные файлы, и т.д.)
Пример
go get github.com/kpmy/odf
В пакете demo есть пример использования ODF для формирования отчета.
Description
This library is for generation of ODF document with Go.
You can produce a document with content by calling the Formatter methods. Then you can save this document to zip-file .odf
No need for your code to handle with ODF XML content. More examples in demo/report.go
Example
package main
import (
"odf/generators"
"odf/mappers"
"odf/model"
_ "odf/model/stub" //don't forget pimpl
"odf/xmlns"
"os"
)
func main() {
if output, err := os.Create("demo2.odf"); err == nil {
//we need an empty model
m := model.ModelFactory()
//standard formatter
fm := &mappers.Formatter{}
//couple them
fm.ConnectTo(m)
//we want text
fm.MimeType = xmlns.MimeText
//yes we can
fm.Init()
//pretty simple
fm.WriteString("Hello, World!")
//store file
generators.GeneratePackage(m, nil, output, fm.MimeType)
//cleanup
defer output.Close()
}
}
Moar
It works in browser now. Got Demo3, GopherJS + Dart.