Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This add support for converting documents to/from htps://orgmode.org. As code comments point out it is still preliminary. Support for executable nodes such as
Parameter,CodeChunkandCodeExpressionis not yet enabled. This needs some research into howorg-babelbefore continuing.Addresses #1484 and #1483. Specifically for the latter on this branch one can convert
.orgfile to JSONand HTML with Microdata,
cargo run --bin stencila -- convert fixtures/articles/simple.org - --to html Finished dev [unoptimized + debuginfo] target(s) in 0.28s Running `target/debug/stencila convert fixtures/articles/simple.org - --to html` <article data-root itemtype="https://schema.org/Article" itemscope> <stencila-document-toolbar></stencila-document-toolbar> <h1 itemprop="headline"> <span>A simple Org Mode article for testing</span> </h1> <ol data-prop="authors"> <li itemprop="author" itemtype="https://schema.org/Person" itemscope> <meta itemprop="name" content="Nokome Bentley" /><span data-prop="givenNames" ><span itemprop="givenName">Nokome</span></span ><span data-prop="familyNames" ><span itemprop="familyName">Bentley</span></span > </li> </ol> <div data-prop="content"> <h2 itemtype="https://schema.stenci.la/Heading" itemscope> <span>Introduction</span> </h2> <p itemtype="https://schema.stenci.la/Paragraph" itemscope> <span >A simple Org Mode article for testing. When making changes please note that test snapshots based on this fixture may need to be updated.</span > </p> <h2 itemtype="https://schema.stenci.la/Heading" itemscope> <span>Methods</span> </h2> <p itemtype="https://schema.stenci.la/Paragraph" itemscope> <span>This is the methods section.</span> </p> <h2 itemtype="https://schema.stenci.la/Heading" itemscope> <span>Results</span> </h2> <p itemtype="https://schema.stenci.la/Paragraph" itemscope> <span>The results include a table (Table 1).</span> </p> <table itemtype="https://schema.org/Table" itemscope> <caption> <span data-prop="label"></span> <div data-prop="caption"></div> </caption> <tbody data-prop="rows"> <tr itemtype="https://schema.stenci.la/TableRow" itemscope> <th itemtype="https://schema.stenci.la/TableCell" itemscope> <span>Group</span> </th> <th itemtype="https://schema.stenci.la/TableCell" itemscope> <span>Value</span> </th> </tr> <tr itemtype="https://schema.stenci.la/TableRow" itemscope> <td itemtype="https://schema.stenci.la/TableCell" itemscope> <span>A</span> </td> <td itemtype="https://schema.stenci.la/TableCell" itemscope> <span>1.1</span> </td> </tr> <tr itemtype="https://schema.stenci.la/TableRow" itemscope> <td itemtype="https://schema.stenci.la/TableCell" itemscope> <span>B</span> </td> <td itemtype="https://schema.stenci.la/TableCell" itemscope> <span>2.2</span> </td> </tr> </tbody> </table> <h2 itemtype="https://schema.stenci.la/Heading" itemscope> <span>Discussion</span> </h2> <p itemtype="https://schema.stenci.la/Paragraph" itemscope> <span>This is the discussion section.</span> </p> </div> </article>