##《空园子》 杨键
我是一座空园子,
我是一条空河流,
我是一座空山,
我是一个空了的妈妈,
| function GBKDecode(str) { | |
| var f = File('gbk.txt'), gbk; | |
| f.encoding = 'BINARY'; | |
| f.open('w'), f.write(str), f.close(); | |
| f.encoding = 'GBK'; | |
| f.open('r'); | |
| gbk = f.read(); | |
| f.close(), f.remove(); | |
| return gbk | |
| } |
| (function() { | |
| var doc = app.activeDocument, | |
| lays = doc.layers, | |
| WORK_LAY = lays.add(), | |
| NUM_LAY = lays.add(), | |
| i = lays.length - 1, | |
| lay; | |
| // main working loop | |
| for (; i > 1; i--) { |
| var doc = activeDocument, | |
| f = File.openDialog ('选择文件 ', '*.pdf'), | |
| p = prompt ('置入第 1 到?页', 5, '指定页数') | |
| i = 0; | |
| for (; ++i <= p;) { | |
| app.preferences.setIntegerPreference('plugin/PDFImport/PageNumber', i); | |
| doc.placedItems.add().file = f; | |
| } | |
| app.preferences.setIntegerPreference('plugin/PDFImport/PageNumber', 1); |
| convert input.pdf -threshold 50% new.pdf |
| Dir *.png | rename-item -newname { $_.name -replace ".png",".pdg" } | |
| Dir *.pdg | rename-item -newname { "000" + $_.name } | |
| //Batch Incremented File Rename | |
| $files = Get-ChildItem c:\yourpath\*.ext | |
| $id = 1 | |
| $files | foreach { | |
| Rename-Item -Path $_.fullname -NewName (($id++).tostring() + $_.extension) | |
| } |
##《空园子》 杨键
我是一座空园子,
我是一条空河流,
我是一座空山,
我是一个空了的妈妈,
| #targetengine "keepWindowBounds" | |
| (function() { | |
| app.addEventListener("afterOpen", setBounds); | |
| function setBounds(ev) { | |
| var layoutWin = ev.parent, | |
| bounds = eval('[' + app.extractLabel('bounds') + ']'); | |
| layoutWin.addEventListener("beforeClose", insertBounds); | |
| function insertBounds(ev) { |
##纸质书籍电子版制作一般流程
我们一般从步骤2开始。
| Credit and Usage: http://www.mobileread.com/forums/showthread.php?t=162972 |
| #!/usr/bin/python | |
| # -*- coding:utf-8 -*- | |
| """ download all cchere posts of the author from pre-collected postlist | |
| currently the list was collected manually | |
| TODO: get the postlist from cchere user home automatically | |
| NOTE: Fanqiang is needed as the exists of GFW | |
| code based on: https://code.google.com/p/cchere-thread-saver/ | |
| """ |