-- lx-bundle:true

-- This file is part of Lx, created by Liqube <www.liqube.com>
-- Copyright Liqube Audio. All rights reserved.
-- Lx Interim License. See LICENSE for details.

--- OpenDocument presentation extractor
-- @module plugins.odfutils.odp

local pages = require("plugins.odfutils.pages")

local reader = {}

--- Read one ODP file as plain text
-- @param filename string archive path
-- @return string|nil content extracted text
-- @return string|nil error extraction error
function reader.extract_text(filename)
	return pages.extract(filename, "text", "office:presentation", "Slide", true)
end

--- Read one ODP file as Markdown
-- @param filename string archive path
-- @return string|nil content extracted Markdown
-- @return string|nil error extraction error
function reader.extract_markdown(filename)
	return pages.extract(filename, "markdown", "office:presentation", "Slide", true)
end

return reader
