Skip to content

Instantly share code, notes, and snippets.

View DocumentAlchemy's full-sized avatar

Document Alchemy DocumentAlchemy

View GitHub Profile
@DocumentAlchemy
DocumentAlchemy / doc2docx.sh
Created April 17, 2016 21:13
Shell script that converts an old-style *.doc Microsoft Word document into a modern *.docx MS Word document using the DocumentAlchemy document conversion API.
#!/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
#!/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() {
@DocumentAlchemy
DocumentAlchemy / powerpoint-to-pdf
Last active March 15, 2019 09:08
Shell script using https://documentalchemy.com API to convert a PowerPoint file into a PDF.
#!/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() {