Installing Supervisor on OS X is simple:
sudo pip install supervisor
This assumes you have pip. If you don't:
import mimerender | |
mimerender.register_mime('pdf', ('application/pdf',)) | |
mimerender = mimerender.FlaskMimeRender(global_charset='UTF-8') | |
def render_pdf(html): | |
from xhtml2pdf import pisa | |
from cStringIO import StringIO | |
pdf = StringIO() | |
pisa.CreatePDF(StringIO(html.encode('utf-8')), pdf) |
.twitter-typeahead .tt-query, | |
.twitter-typeahead .tt-hint { | |
margin-bottom: 0; | |
} | |
.tt-hint { | |
display: block; | |
width: 100%; | |
height: 38px; | |
padding: 8px 12px; | |
font-size: 14px; |
(* SPLIT TWO-PAGE PDFS | |
--Stephen Margheim | |
-- 11/2/13 | |
-- open source | |
VERSION 3.0 | |
--Version 3 adds a feature for OCR'd PDFs. If your PDF has been OCR'd, the script now automatically crops the individual pages so that the text field is centered. | |
This little program uses the Mac app Skim to split scanned PDFs that have two pages layed out on a single PDF page in landscape mode: |
////////////////////////////////////////////////////////////// | |
// Font Variables (http://cssfontstack.com/) | |
////////////////////////////////////////////////////////////// | |
// | |
// Serif font-stacks | |
// | |
$baskerville-font-stack: "Big Caslon", "Book Antiqua", "Palatino Linotype", Georgia, serif !default; |
<style> | |
.zero-clipboard { | |
position: relative; | |
} | |
.btn-clipboard { | |
position: absolute; | |
top: 0; | |
right: 0; | |
z-index: 10; | |
display: block; |
<!doctype html> | |
<html class=" webkit safari mobile iphone js"> | |
<head> | |
<meta name="viewport" content="width=device-width;"> | |
<style id="ss"></style> | |
<style> | |
body { | |
text-align: center; | |
font-size: 1em; | |
-webkit-transform: translate3d(0,0,0); |
#!/usr/bin/python | |
# encoding: utf-8 | |
# | |
# Copyright © 2015 Dean Jackson <[email protected]> | |
# | |
# MIT Licence. See http://opensource.org/licenses/MIT | |
# | |
# Created on 2015-04-20 | |
# |
property imageFiles : {"jpg", "pef", "dng", "jpeg"} | |
on adding folder items to theWatchedFolder after receiving theDetectedItems | |
repeat with theItem in theDetectedItems | |
set theItemPath to POSIX path of theItem | |
set ImageFile to POSIX file theItemPath | |
tell application "System Events" | |
if name extension of theItem is in imageFiles then | |
tell application "Photos" | |
set DestinationAlbumName to "Inbox" |
""" | |
Author: Eric J. Ma | |
Purpose: To merge PDFs together in an automated fashion. | |
""" | |
import os | |
from PyPDF2 import PdfFileReader, PdfFileMerger |