#!/bin/bash
# doc/tool/email2pdf - email2pdf support

set -e

lib_load 'doc/pdf'


######
# Native dependencies

doc_tool_email2pdf_client_packages=( python3-pypdf2 python3-magic )


######
# Config

email2pdf_config_init() {
	:
}

email2pdf_config_check() {
	:
}


######
# email2pdf support

email_pdf() {
	min_args 1 "$@"
	local file=$1
	local out=${2:-$file.pdf}
	run rm -f "$out"
	run email2pdf --headers -i "$file" -o "$out"
}

run_email_pdf_viewer() {
	has_args 1 "$@"
	local file=$1
	local tmp
	tmp=$(cmd_tempfile)
	pdf_email "$file" "$tmp"
	run_pdf_viewer "$tmp"
}

View the Developer Guide Index

View the Reference Manual Index


Generated on Fri Jul 28 14:35:38 PDT 2017 by mcsh d14 v0.23.0.