CUPS(CUPS-PDF)ã¨ãããããªã³ããµã¼ãã¹ã®å¤¢ã®ã³ã©ã
セブンイレブンのネットプリントサービスã便å©ã
PDFãç»åãWebã§ã¢ããããã°ãå
¨å½ã®ã»ãã³ã¤ã¬ãã³ï¼ä¸é¨åºèé¤ãï¼ã§å°å·ãã§ããã
èªå®
ã«ããªã³ã¿ã¼ããªãã¨ããåºå¼µå
ã§ã¡ãã£ã¨å°å·ãããã¨ãã§ä¾¿å©ã
ãã¡ããã»ãã³ã¤ã¬ãã³ãè¿ããããã¨ãåææ¡ä»¶ã§ããã
ã§ããããLinuxã®CUPSããã·ã¼ã ã¬ã¹ã«é£æºãã¦ã¿ããã¤ã¾ãã
- Linuxã§æ®éã«å°å·ãã
- ã¡ã¼ã«ã§ãããªã³ãäºç´çªå·ããéç¥ããã
- ã»ãã³ã¤ã¬ãã³ã«è¨ç½®ããã¦ããããªã³ã¿ã¼DocuCentre Color f450 MPã§éç¥ããããããªã³ãäºç´çªå·ããå ¥åãã
- 綺éºã«å°å·ããã
ä»çµã¿ã¯ãCUPS-PDFã§PDFãåºåãã¦ãåºåããããã¡ã¤ã«ãå®æçã«ç£è¦ãã¦ãcurlã§Webã®ãã©ã¼ã ã«PDFãæãã¤ããã ãã
Gentooã§ããã°ãcups-pdfã¨curlãã¤ã³ã¹ãã¼ã«ããã
# emerge cups-pdf curl
ã§ãå®æçã«ç£è¦ãã¦curlã§æããããã°ã©ã ã¯ãã¡ãã
#!/bin/sh # # http://www.printing.ne.jp/ # # ã¦ã¼ã¶ã¼ID i="XXXXXXXX" # ãã¹ã¯ã¼ã p="XXXXXXXX" # ã«ã©ã¼ã¢ã¼ã 1:ããªã³ãæã«é¸æ 2:ã«ã©ã¼ 0:ç½é» color=1 # äºç´çªå·ã¿ã¤ã 0:è±æ°å 1:æ°åã®ã¿ number=0 # æ証çªå· 0:è¨å®ããªã 1:è¨å®ãã(åè§æ°å4æ¡ã¾ã§) secretcodesw=0 #secretcode="1234" # ç»é²çµæéç¥ 0:éç¥ããªã 1:éç¥ãã(260æåã¾ã§) mailsw=1 mailaddr="[email protected]" # æ°è¦ãã¡ã¤ã«ã®ç»é² spooldir="/var/spool/cups-pdf/${USER}" ################################################################################ url="https://www.printing.ne.jp/cgi-bin/mn.cgi" session=`curl -F i=${i} -F p=${p} ${url} 2>/dev/null | sed 's/\r/\n/g' | grep '^<input type="hidden" name="s"' | sed 's/^.*name="s" value="\([^"]*\)".*$/\1/'` args="-F s=${session} -F c=0 -F m=2 -F color=${color} -F number=${number} -F secretcodesw=${secretcodesw} -F secretcode=${secretcode} -F mailsw=${mailsw} -F mailaddr=${mailaddr}" for file in `ls ${spooldir}` ; do curl ${args} -F "file1=@${spooldir}/${file};filename=`date +'%Y%m%d%H%M%S_'`${file}" ${url} >/dev/null 2>&1 rm ${spooldir}/${file} sleep 1 done
ã¦ã¼ã¶ã¼IDã¨ãã¹ã¯ã¼ãã¨ã¡ã¼ã«ã¢ãã¬ã¹ãå¤ããã ãã§ã¨ããããã¯è¯ãã ããã
ã¦ã¼ã¶ã¼IDã¨ãã¹ã¯ã¼ãã¯http://www.printing.ne.jp/ã§ä¼å¡ç»é²ãããç¡æã
ã¨ããããåããããæ¹åãã¹ãç¹ã沢山ããã
- ã·ã§ã«ã¹ã¯ãªããã«æ¸ãè¾¼ãè¨å®é ç®ãCUPS(PPD)ã§å®ç¾©ã§ããªãã
- Webãã©ã¼ã ã«æããéã®ã¨ã©ã¼å¦çæªå®è£
- Webãã©ã¼ã ã®æ§æãå¤ããã¨å¯¾å¿ã§ããªã
- ã¨ã©ã¼å¦çãå®è£ ã§ãã¦ãªãç¾ç¶ã§æå¾ã«ãã¡ã¤ã«ãæ¶ãã®ã¯ã¡ãã£ã¨ç¡è¬
- ãã®ä»è«¸ã
ã¾ããã®ãã¡èãã¾ããã
æåã¯Plaggerã§è©¦ãããã¨æã£ãããGentooã®g-cpanã§Plaggerãã¤ã³ã¹ãã¼ã«ã§ããªãã£ãã®ã§è«¦ããã®ã¯å ¬ç¶ã®ç§å¯ã