|
|
PrintFu Challange -
|
|
|
|
Forum Regular
Join Date: Jan 2004
Location: Indianapolis, Indiana
Status:
Offline
|
|
Hello again cohorts. I have a challenge that can reap impressive rewards for any developer that can take the following code and turn it in to an installable application. All that really needs to happen is have this script put in to ~/Library/PDF Services PDF SERVICES
This thread covers the discussion of writing a PDF Service (the answer is at the bottom), and automatically taking the results and sending it to PrintFu. Learn more about the PrintFu Make-A-Buck Foundation
PrintFu is a service that takes large documents - prints, binds and ships a printed book. So this service allows a user to print directly to PrintFu from your Print Dialog box. Also covered in this MacOsXHints story.
Who ever builds an application using this ground work, will be able to insert their email in the request call, and will receive a dollar for each order, paid monthly via PayPals mass pay.
Code:
on open these_items
tell me to activate
set question to "Ready to send this file to PrintFu?"
display dialog question buttons {"Yes", "Cancel"} default button 1
set userChoice to button returned of result
if userChoice is not "Cancel" then
repeat with aFile in these_items
set pdfLocation to POSIX path of aFile
set thisurl to do shell script �
"curl -F \"fileUpload=@" & pdfLocation �
& "\" -F \"mcAction=processRemoteFileUpload\" http://www.printfu.org/index.cfm"
open location thisurl
end repeat
end if
end open
Note: the CURL do shell script has to be on the same line, it can not be on seperate lines.
Anyone up to it?
(
Last edited by BrandonCorbin; Mar 14, 2005 at 02:20 PM.
)
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Feb 2005
Status:
Offline
|
|
Is something like this what you're looking for?
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Jan 2004
Location: Indianapolis, Indiana
Status:
Offline
|
|
Thats it almost to a tee... I would suggest the following:
Replace YOUR EMAIL HERE with your email, that way we know to pay you when orders come in from your script.
I also added a snippet about "Your upload time..."
Then you might want to have a readme or something happen so people know what to expect after they install it.
Code:
on open these_items
tell me to activate
set question to "Ready to send this file to PrintFu?
Your upload time will depend on how large your document is."
display dialog question buttons {"Yes", "Cancel"} default button 1
set userChoice to button returned of result
if userChoice is not "Cancel" then
repeat with aFile in these_items
set pdfLocation to POSIX path of aFile
set thisurl to do shell script "curl -F \"fileUpload=@" & pdfLocation & "\" -F \"mcAction=processRemoteFileUpload\" -F \"pppemail=YOUREMAILHERE\" http://www.printfu.org/index.cfm"
open location thisurl
end repeat
end if
end open
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Aug 2003
Status:
Offline
|
|
This thread gets the award for "widest post evar!" It scrolls horizontally in a 1600px wide window!
|
-- Devin Lane, Cocoa Programmer
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Jan 2004
Location: Indianapolis, Indiana
Status:
Offline
|
|
Originally posted by Devin Lane:
This thread gets the award for "widest post evar!" It scrolls horizontally in a 1600px wide window!
I would like to thank the Academy and especially my parents.
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Feb 2005
Status:
Offline
|
|
I've updated it with a small readme and the new script ( here). Feel free to do whatever you want with it, and if you need anything else you can email me at michaeljs at gmail.com.
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Feb 2001
Status:
Offline
|
|
anyone knows if there is something simular in europe (EU)?
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Jan 2004
Location: Indianapolis, Indiana
Status:
Offline
|
|
Originally posted by geran:
anyone knows if there is something simular in europe (EU)?
Actually I have 2 printing companies that I am working with in (one in Scandinavia and the other somewhere in europe) that I hope to have up and running before to long... Now as far as price is concerned, it might be a little more expensive.
Talk to you soon
Brandon
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Feb 2001
Status:
Offline
|
|
Scandinavia sounds good, I live in Sweden =)
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Aug 2003
Status:
Offline
|
|
I'm a tad confused. Brandon, is PrintFu your company? I couldn't find anything on the site or blog that said anything about the developers.
If so, that's a really cool idea! I might find myself using that in the near future, when I have large documents to print out.
|
-- Devin Lane, Cocoa Programmer
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Jan 2004
Location: Indianapolis, Indiana
Status:
Offline
|
|
'Tis
Originally posted by Devin Lane:
I'm a tad confused. Brandon, is PrintFu your company? I couldn't find anything on the site or blog that said anything about the developers.
If so, that's a really cool idea! I might find myself using that in the near future, when I have large documents to print out.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|