From b9bf927954b10468d410442af70fdfa2cb3dc308 Mon Sep 17 00:00:00 2001 From: KilluaChen Date: Fri, 7 Apr 2017 23:58:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=BF=9B=E7=A8=8B=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + DownloadAll.php | 2 +- README.md | 26 +++-- cache.txt | 1 - info.plist | 110 +++++++++--------- ...76\347\245\236\345\231\250.alfredworkflow" | Bin 2994091 -> 2994306 bytes 6 files changed, 75 insertions(+), 65 deletions(-) delete mode 100644 cache.txt diff --git a/.gitignore b/.gitignore index be629b8..abba6d1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ # Created by .ignore support plugin (hsz.mobi) .idea tmp/ +.DS_Store diff --git a/DownloadAll.php b/DownloadAll.php index 7912488..ae3bd75 100644 --- a/DownloadAll.php +++ b/DownloadAll.php @@ -18,7 +18,7 @@ public function down($start = 1) $is_cs = false;//是否重试 - for ($i = $start; ; $i++) { + for ($i = $start; $i < $start + 50; $i++) { $content = $this->get($url . $i); preg_match_all('/data-original\=\"\/\/([\s\S]*?)\"/', $content, $img_list); if (count($img_list[1]) < 10) { diff --git a/README.md b/README.md index be6b15d..0ef4a49 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,30 @@ # 斗图神器 -### [下载斗图神器](斗图神器.alfredworkflow) +## 下载 -### 第一次检索的关键字只会显示第一页预览,搜过的关键字图片会自动缓存 +[下载斗图神器](斗图神器.alfredworkflow) -### 检索关键字: `dt` +## 检索 -### 下载所有图片关键字: `dadt` ,近20个进程同时下载 +检索关键字: `dt` -### 查看已下载图片数:`ls ~/Pictures/.DouTu | wc -w` +检索快捷键:`Option+Shift+D` -### 图片默认保存在`~/Pictures/.DouTu/`下面 +下载所有图片关键字: `dadt` ,近20个进程同时下载 -### 不要了可以直接删掉`rm -rf ~/Pictures/.DouTu` +> 第一次检索的关键字只会显示第一页预览,搜过的关键字图片会自动缓 -### 想修改图片保存路径可以修改`config.php`文件 +## 查阅 + +查看已下载图片数:`ls ~/Pictures/.DouTu | wc -w` + +## 配置 + +图片默认保存在`~/Pictures/.DouTu/`下面,不要了可以直接删掉`rm -rf ~/Pictures/.DouTu` + +想修改图片保存路径可以修改`config.php`文件 + +## 效果图 ![效果图](preview.gif) diff --git a/cache.txt b/cache.txt deleted file mode 100644 index 6f16aa3..0000000 --- a/cache.txt +++ /dev/null @@ -1 +0,0 @@ -熊本熊 diff --git a/info.plist b/info.plist index ddd0f75..02dd165 100644 --- a/info.plist +++ b/info.plist @@ -132,37 +132,6 @@ version 2 - - config - - action - 0 - argument - 0 - focusedappvariable - - focusedappvariablename - - hotkey - 2 - hotmod - 655360 - hotstring - D - leftcursor - - modsmode - 0 - relatedAppsMode - 0 - - type - alfred.workflow.trigger.hotkey - uid - B2766B5C-9C5D-4BE4-A748-35C43FCD5C7C - version - 2 - config @@ -207,12 +176,35 @@ 2 + config + + action + 0 + argument + 0 + focusedappvariable + + focusedappvariablename + + hotkey + 2 + hotmod + 655360 + hotstring + D + leftcursor + + modsmode + 0 + relatedAppsMode + 0 + type - alfred.workflow.action.revealfile + alfred.workflow.trigger.hotkey uid - 73C71487-6079-42CA-831B-3E959C6BAE2F + B2766B5C-9C5D-4BE4-A748-35C43FCD5C7C version - 1 + 2 config @@ -260,6 +252,14 @@ version 2 + + type + alfred.workflow.action.revealfile + uid + 73C71487-6079-42CA-831B-3E959C6BAE2F + version + 1 + config @@ -283,27 +283,6 @@ version 2 - - config - - argumenttype - 2 - keyword - dadt - subtext - 可能需要一段时间...5万多张 - text - 下载所有图图片-斗图神器 - withspace - - - type - alfred.workflow.input.keyword - uid - 03F0F61A-BDC4-4F63-8F6E-DFF5E4D5396A - version - 1 - config @@ -347,6 +326,27 @@ php DownloadAll.php 1000& version 2 + + config + + argumenttype + 2 + keyword + dadt + subtext + 可能需要一段时间...... + text + 下载所有图图片-斗图神器 + withspace + + + type + alfred.workflow.input.keyword + uid + 03F0F61A-BDC4-4F63-8F6E-DFF5E4D5396A + version + 1 + readme Keywords are one of Alfred's most commonly used and most useful ways of launching actions. Set a keyword and connect it to the action(s) you want to perform. diff --git "a/\346\226\227\345\233\276\347\245\236\345\231\250.alfredworkflow" "b/\346\226\227\345\233\276\347\245\236\345\231\250.alfredworkflow" index f745eddbd2a09e48a83442843597c3cb32ed3bdb..b17cca1ff079a9a057a476c128a70887adcdc61f 100644 GIT binary patch delta 3453 zcmZ|SS5Q-L0tN6S6cf4_IwbTaA<|KrfV3c?2vVejfYO^(2_i+BAT1&wA}B}|fW9A?f4hV`d5iQ82|UTd)BFgK0rv$~`a$LC?$cM8nvcy(+U>*AZG_^ie}~H&+=52edZcN_KQ?x*K=Joi3c9jkUXhtK#Ko3o_M%t0WpMVVR~zlDu_R#(?OR$}Fii(W-F zW*T?H1cdugTDadUky6+}N=kwJzsMzQbWwMx#gasojg#G$~VrqN4p8Gdi z)>nkl=>n1)XPoxbyC!YLTo!ARvIcimZg4|n=Hk8XqND2ryoYPsg|2v zNsFdT0rIe1N`nuspNhjYn6Pa(j6uC7u^~q)XABb zb8wo#qmi9)&zn&t8a}Bb;Q0Fjxs8n4yUGOUdt(lFL*1(tQU?qAaf0IgA81#96H^+( z(6)%!nLNFY!i_VBAougRKiD9csB!9fd{{$c>-UFy_SQCr99U|~oVm#gmJvh3h^YDU zlX`jP?fO6Z;r)w6YAqZ#!|vWm>+1AhFBP2N(jBR;fP)C>R7POj- ze*#ZEKw)7(wVfQC-0n&S1PA=1)YXJ#i#ou6l{zrh!0Xc$rkDeNnvJiQtIIOvsO7-9 z*MA9{tYUbfwUN*gN(dyBBTRWZN>CA_@x5y$Y!kI)IAsIZ_Y9inAmjRa_S--T1|f(j zWvsKZ!u58u{Ic;0q~Tw9_rEAhTMMze_(0Bu0xDS=_%YQBX%F&3L2^g4lv&I%Rf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