This file contains 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
#!/bin/bash | |
# powerpoint-to-pdf <PPT-FILE> [<PDF-FILE>] | |
# Uses <https://documentalchemy.com/> to convert a PowerPoint document to PDF. | |
# SET YOUR DOCUMENT ALCHEMY API KEY HERE (OR PASS AS AN ENV VAR). | |
# SIGN UP AT <https://documentalchemy.com/> TO GET YOUR FREE API KEY. | |
DA_API_KEY=${DA_API_KEY:-"EDs2UQEprGn9aD4vg6HCPhFvgQFDahQgRzzIfocJ"} | |
# PRINT USAGE MESSAGE | |
show_help() { |
This file contains 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
#!/bin/bash | |
# docx2pdf <WORD-DOC> [<PDF-FILE>] | |
# Uses <https://documentalchemy.com/> to convert an MS Word document to PDF. | |
# SET YOUR DOCUMENT ALCHEMY API KEY HERE (OR PASS AS AN ENV VAR). | |
# SIGN UP AT <https://documentalchemy.com/> TO GET YOUR FREE API KEY. | |
DA_API_KEY=${DA_API_KEY:-"EDs2UQEprGn9aD4vg6HCPhFvgQFDahQgRzzIfocJ"} | |
# PRINT USAGE MESSAGE | |
show_help() { |
This file contains 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
#!/bin/bash | |
# Converts one or more *.doc files into *.docx | |
# USAGE: doc2docx <DOC_FILE> | |
# doc2docx <DIRECTORY>/*.doc | |
# Errors are reported, but do not stop further processing. | |
# Exits with `0` if the given files were converted correctly, | |
# or with the number of failing files. | |
# This is your DocumentAlchemy API key. It may be set via the |
This file contains 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
# Example of using curl and the DocumentAlchemy API to convert a | |
# Word *.doc file to a post-Office 2007 *.docx file. | |
# (See <https://documentalchemy.com/> for more information.) | |
# Assuming: | |
# | |
# - `403l1zh3dkbakyb9` is the value of your Document Alchemy API key, | |
# - `MY_DOCUMENT.doc` is the file you want to convert | |
# - `MY_DOCUMENT.docx` is the file you want to save the converted document to | |
# |
This file contains 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
# Example of using curl and the DocumentAlchemy API to render a | |
# Markdown document as a PDF. | |
# There are several parameters that can be used to control the | |
# structure and format of the generated PDF document that are | |
# not included in this simple example. See the DocumentAlchemy | |
# API documentation at <https://documentalchemy.com/api-doc> for | |
# more information about these options. | |
# | |
# See <https://documentalchemy.com/> for more information about |
This file contains 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
#!/bin/bash | |
# Converts a Markdown file into an HTML, PDF or Microsoft Word document | |
# USAGE: md2x.sh <MARKDOWN-FILE> <FORMAT> | |
# | |
# EXAMPLE: md2x.sh README.md pdf | |
# This is your DocumentAlchemy API key. It may be set via the | |
# environment variable named `DA_API_KEY`. | |
# (See <https://documentalchemy.com/> to get one of your own.) |
This file contains 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
# Example of using curl and the DocumentAlchemy API to render a | |
# scale an image to fixed width while preserving the orignal | |
# aspect ratio. | |
# This particular example will work with PNG and JPEG files, | |
# and convert any input JPEG documents to PNG. | |
# See <https://documentalchemy.com/> for more information about | |
# DocumentAlchemy's document conversion and processing capabilities. |
This file contains 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
#!/bin/bash | |
# Resizes one or more images to a fixed width using the DocumentAlchemy API | |
# USAGE: resize.sh <NEW-WIDTH> <FILES> | |
# | |
# EXAMPLE: resize.sh 180 images/*.png | |
# The generated files will have the same name (and location) as their source | |
# image, but with '-resized' inserted between the filename and the extension. |
This file contains 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
curl -H "Authorization: da.key=403l1zh3dkbakyb9" \ | |
-X POST --form "[email protected]" \ | |
https://documentalchemy.com/api/v1/document/-/rendition/images.zip \ | |
-o "IMAGES-FROM-MY-DECK.ZIP" |
This file contains 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
#!/bin/bash | |
# Extracts images from Microsoft Office or PDF files using the DocumentAlchemy API. | |
# USAGE: extract-images.sh <FILES> | |
# | |
# EXAMPLE: extract-images.sh MyDeck.pptx *.doc | |
# A ZIP archive containing the extracted images (if any) will be | |
# created for each document submitted. |
OlderNewer