Coder Social home page Coder Social logo

pandoc-aws-lambda-binary's Introduction

Pandoc for AWS Lambda

This is a binary package and a Node.js wrapper for a precompiled version of Pandoc for the Amazon Linux machine image used by AWS Lambda. It can help you get started quickly with Pandoc inside Lambda functions.

Check out the Running Pandoc on Lambda Guide for information on how this binary was produced, and how to compile a different version yourself with modified options.

Usage without Node.js

To use without Node.js, grab the binary from vendor/pandoc.gz and upload to Lambda yourself.

Usage from Node.js

Include the pandoc-aws-lambda-binary package using NPM, and make sure to package it with your Lambda function code:

npm install pandoc-aws-lambda-binary -S

Require and call the NPM package function from your Lambda code:

var pandoc = require('pandoc-aws-lambda-binary');

var resultPromise = pandoc(inputFilePath, outputFilePath, additionalOptions);

Options

  • inputFilePath: string -- file you want to convert
  • outputFilePath: string -- path to save the results
  • additionalOptions: array -- any other options you want to pass to the pandoc executable

The options will be concatenated into a command such as pandoc inputFilePath -o outputFilePath additionalOptions.

Return value

The pandoc function is asynchronous and returns a JavaScript Promise, that will be resolved or rejected depending on the results of the command execution.

Full Example

Check out the Pandoc S3 Converter Example Project to see how to wire everything up into a Lambda function.

Version information

Compiled for ami-60b6c60a, for Linux kernel version โ€“ 4.1.27-25.49.amzn1.x86_64.

Pandoc 1.17.2, Compiled with texmath 0.8.6.5, highlighting-kate 0.6.2.1.

Syntax highlighting is supported for the following languages: abc, actionscript, ada, agda, apache, asn1, asp, awk, bash, bibtex, boo, c, changelog, clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css, curry, d, diff, djangotemplate, dockerfile, dot, doxygen, doxygenlua, dtd, eiffel, elixir, email, erlang, fasm, fortran, fsharp, gcc, glsl, gnuassembler, go, hamlet, haskell, haxe, html, idris, ini, isocpp, java, javadoc, javascript, json, jsp, julia, kotlin, latex, lex, lilypond, literatecurry, literatehaskell, llvm, lua, m4, makefile, mandoc, markdown, mathematica, matlab, maxima, mediawiki, metafont, mips, modelines, modula2, modula3, monobasic, nasm, noweb, objectivec, objectivecpp, ocaml, octave, opencl, pascal, perl, php, pike, postscript, prolog, pure, python, r, relaxng, relaxngcompact, rest, rhtml, roff, ruby, rust, scala, scheme, sci, sed, sgml, sql, sqlmysql, sqlpostgresql, tcl, tcsh, texinfo, verilog, vhdl, xml, xorg, xslt, xul, yacc, yaml, zsh

License

To keep things consistent, this library is released under GPL. If this is a problem for you, check out the Running Pandoc on Lambda Guide for information on how to produce the binary yourself.

Pandoc is free software, released under the GPL. ยฉ 2006-2016 John MacFarlane.

pandoc-aws-lambda-binary's People

Contributors

gojko avatar robfe avatar

Watchers

 avatar  avatar

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.