Steven Haryanto > Org-To-HTML > Org::To::HTML

Download:
Org-To-HTML-0.11.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.11   Source  

NAME ^

Org::To::HTML - Export Org document to HTML

VERSION ^

version 0.11

SYNOPSIS ^

 use Org::To::HTML qw(org_to_html);

 # non-OO interface
 my $res = org_to_html(
     source_file   => 'todo.org', # or source_str
     #target_file  => 'todo.html', # defaults return the HTML in $res->[2]
     #html_title   => 'My Todo List', # defaults to file name
     #include_tags => [...], # default exports all tags.
     #exclude_tags => [...], # behavior mimics emacs's include/exclude rule
     #css_url      => '/path/to/my/style.css', # default none
     #naked        => 0, # if set to 1, no HTML/HEAD/BODY will be output.
 );
 die "Failed" unless $res->[0] == 200;

 # OO interface
 my $oeh = Org::To::HTML->new();
 my $html = $oeh->export($doc); # $doc is Org::Document object

DESCRIPTION ^

Export Org format to HTML. To customize, you can subclass this module.

This module uses Log::Any logging framework.

This module uses Moo for object system.

This module has Rinci metadata.

FUNCTIONS ^

org_to_html(%args) -> [status, msg, result, meta]

Export Org document to HTML.

This is the non-OO interface. For more customization, consider subclassing Org::To::HTML.

Arguments ('*' denotes required arguments):

Return value:

Returns an enveloped result (an array). First element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). Second element (msg) is a string containing error message, or 'OK' if status is 200. Third element (result) is optional, the actual result. Fourth element (meta) is called result metadata and is optional, a hash that contains extra information.

ATTRIBUTES ^

naked => BOOL

If set to true, export_document() will not output HTML/HEAD/BODY wrapping element. Default is false.

html_title => STR

Title to use in TITLE element. If unset, defaults to "(no title)" when exporting.

css_url => STR

If set, export_document() will output a LINK element pointing to this CSS.

METHODS ^

new(%args) ^

$exp->export_document($doc) => HTML

Export document to HTML.

SEE ALSO ^

For more information about Org document format, visit http://orgmode.org/

Org::Parser

HOMEPAGE ^

Please visit the project's homepage at https://metacpan.org/release/Org-To-HTML.

SOURCE ^

Source repository is at https://github.com/sharyanto/perl-Org-To-HTML.

BUGS ^

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Org-To-HTML

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR ^

Steven Haryanto <stevenharyanto@gmail.com>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2014 by Steven Haryanto.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: