Skip to content
David-Apps edited this page Feb 7, 2024 · 12 revisions

Using these simple plugins and some third-party conversion tools, you can browse documents in various formats.

The plugins are very similar. Each plugin specifies a content type (content) and a file extension (suffix) so that Edbrowse can tell when to use the plugin. These plugins include down_url to tell Edbrowse to create a local copy of a remote file before converting it. Each plugin specifies the command to use to convert the file (program). The command can use %i for the input file name and %o for the output file name. When the command does not use %o, Edbrowse reads the output of the command. The plugins use outtype to specify whether the output of the command is text (T) or HTML code (H).

Plugin using pdftohtml

Portable Document Format (PDF)

plugin {
type = pdf
desc = pdf file
suffix = pdf
content = application/pdf
down_url
program = pdftohtml -i -q -noframes %i %o
outtype = H
}

Plugins using catdoc

Microsoft Word .doc

plugin {
type = Word doc
desc = Microsoft Word document, not docx
suffix = doc
content = application/msword
down_url
program = catdoc %i
outtype = T
}

Rich Text Format (RTF)

plugin {
type = Rich Text Format
desc = Rich Text Format
suffix = rtf
content = application/rtf,text/rtf
down_url
program = catdoc %i
outtype = T
}

Plugins using pandoc

Markdown

plugin {
type = markdown
desc = Markdown file
suffix = md
content = text/markdown
# Downloading the file is optional.
down_url
program = pandoc -f markdown -t html %i
outtype = H
}

Microsoft Word .docx

plugin {
type = Microsoft Word document
desc = Microsoft Word Open XML document
suffix = docx
content = application/vnd.openxmlformats-officedocument.wordprocessingml.document
down_url
program = pandoc -f docx -t html %i
outtype = H
}

Open Document Format text .odt

plugin {
type = Open Document Format
desc = Open Document Format (text)
suffix = odt
content = application/vnd.oasis.opendocument.text
down_url
program = pandoc -f odt -t html %i
outtype = H
}

EPUB

plugin {
type = EPUB
desc = EPUB
suffix = epub
content = application/epub+zip
down_url
program = pandoc -f epub -t html %i
outtype = H
}

Plugin using xlsx2csv

Microsoft Excel .xlsx and .xlsm

plugin {
type = Microsoft Excel document
desc = Microsoft Excel Open XML document
suffix = xlsx,xlsm
content = application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
down_url
# For comma-separated values, remove "-d tab".
program = xlsx2csv -d tab -f %F -s 0 %i
outtype = T
}
Clone this wiki locally