Giter Club home page Giter Club logo

ast-migrator's Introduction

ast-migrator

GitHub CI Build status Hackage Stackage Lts Stackage Nightly BSD-3-Clause license

Migrate documents from one pandoc AST schema to another.

Usage

The ast-migrator binary can be used as a compatibility helper for pandoc filters.

The following example assumes that my-filter expects the older pandoc API version 1.20, while pandoc has been updated and uses API version 1.22 internally. Without touching the original filter, we can no longer use the --filter options in this situation.

pandoc --filter=my-filter ...

Instead, pandoc's JSON must explicitly be converted and be passed to the filter:

pandoc --to=json ... \
  | ast-migrator --to=1.20 \
  | my-filter \
  | ast-migrator --from=1.20 \
  | pandoc ...

This will convert the JSON representation into a format palatable by the filter, and then later back into the format expected by pandoc.

For better handling the tool can be added to the filter itself; this makes the explicit piping unnecessary.

ast-migrator's People

Contributors

tarleb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

alerque terry1504

ast-migrator's Issues

someFunc

Looks like you have some code left over from stack init in the AstMigrator module.
someFunc.

Switch to BSD license

MIT license was chosen out of habit, but pandoc-types uses BSD3-clause. Using the same license would be less confusing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.