├── .qshell
└── account.json
├── LICENSE
├── README.md
├── dump-clipboard-png.ps1
├── qImage.exe
├── qimage-win.ahk
├── qshell.exe
├── res
├── file.gif
├── local.gif
├── qimage.ico
├── qimge.png
└── screenshot.gif
├── settings.ini
└── tips.md
/.qshell/account.json:
--------------------------------------------------------------------------------
1 | {"access_key":"G4T2TrlRFLf2-Da-IUrHJKSbVYbJTGpcwBVFbz3D","secret_key":"0wgbpmquurY_BndFuPvDGqzlnfWHCdL8YHjz_fHJ","zone":"nb"}
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Jverson
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 | ---
10 |
11 | > 由于前段时间七牛回收测试域名的事情,给有些小伙伴使用七牛造成了困扰,后面准备做一个支持阿里云 OSS 的上传工具,阿里云不但提供域名还支持 https 的外链。目前 mac 版已完成,windows 版近期抽空搞一下,感谢小伙伴们支持!
12 |
13 | qimage-win 是 windows 版本的 markdown 一键贴图工具,支持本地文件、截图及网络图片一键上传七牛云,并粘贴资源链接至当前编辑器,使用简单方便,从此 markdown 中贴图成为一种享受。
14 |
15 | # Change Log
16 |
17 | - v2.1 2018/01 支持自定义样式后缀
18 | - v2.0 2017/04 支持截图及网络复制图片上传,同时直接提供exe文件,使用更加方便
19 | - v1.0 2016/08 实现基本功能,支持本地文件一键上传
20 |
21 | # Usage
22 |
23 | 具体使用方法请参考:[windows版本markdown一键贴图工具](http://jverson.com/2017/05/28/qiniu-image-v2/)
24 |
25 | mac版本请移步至:https://github.com/jiwenxing/qiniu-image-tool
26 |
27 | # Features
28 | - 支持各种图片格式上传
29 | - 支持截图及网络图片直接复制上传
30 | - 支持包括js、css、视频等各种其它格式本地文件上传
31 | - AutoHotkey开放源码,完全免费
32 | - 安装使用非常简单
33 |
34 | # Requirements
35 | **`qshell`** **`七牛账号`**
36 |
37 | # Preview
38 | 1. 本地图片文件上传
39 | 
40 |
41 | 2. 截图上传
42 | 
43 |
44 | 3. 其它文件上传
45 | 
46 |
47 |
48 | 注:演示gif使用wiznote及licecap制作
49 |
50 |
51 |
52 | # License
53 | [MIT License](https://github.com/jiwenxing/qiniu-image-tool-win/blob/master/LICENSE).
54 | Copyright (c) 2017 Jverson
55 |
--------------------------------------------------------------------------------
/dump-clipboard-png.ps1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jiwenxing/qimage-win/7892835d5fda110b6c6f3962a97fbbe51219ce4b/dump-clipboard-png.ps1
--------------------------------------------------------------------------------
/qImage.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jiwenxing/qimage-win/7892835d5fda110b6c6f3962a97fbbe51219ce4b/qImage.exe
--------------------------------------------------------------------------------
/qimage-win.ahk:
--------------------------------------------------------------------------------
1 | /*
2 | qiniu-image-tool.ahk
3 |
4 | a small tool that help you upload local image or screenshot to qiniu cloud and get the markdown-style
5 | url in clipboard as well as your current editor. actually you can upload any file by this script.
6 |
7 | github: https://github.com/jiwenxing/qimage-win
8 |
9 | CHANGE LOG
10 | 2.1 -- 2018/01 -- add an optional config to support user-defined qiniu image style
11 | 2.0 -- 2017/04 -- screenshot & image copy from web both supported
12 | 1.0 -- 2016/08 -- basic function realized, only local files supported.
13 |
14 | */
15 |
16 |
17 |
18 | ^!V::
19 |
20 | IfExist, .\settings.ini
21 | {
22 | IniRead, ACCESS_KEY, .\settings.ini, settings, ACCESS_KEY
23 | IniRead, SECRET_KEY, .\settings.ini, settings, SECRET_KEY
24 | IniRead, BUCKET_NAME, .\settings.ini, settings, BUCKET_NAME
25 | IniRead, BUCKET_DOMAIN, .\settings.ini, settings, BUCKET_DOMAIN
26 | IniRead, UP_HOST, .\settings.ini, settings, UP_HOST
27 | IniRead, DEBUG_MODE, .\settings.ini, settings, DEBUG_MODE
28 | IniRead, STYLE_SUFFIX, .\settings.ini, settings, STYLE_SUFFIX
29 | }
30 | else
31 | {
32 | MsgBox settings.ini not found.
33 | return
34 | }
35 |
36 | BUCKET_DOMAIN = %BUCKET_DOMAIN%/
37 | WORKING_DIR = %A_ScriptDir%\
38 | if(STYLE_SUFFIX!="")
39 | STYLE_SUFFIX = ?%STYLE_SUFFIX%
40 |
41 |
42 | ;;;; datetime+randomNum as file name prefix
43 | Random, rand, 1, 1000
44 | filePrefix = %A_yyyy%%A_MM%%A_DD%%A_Hour%%A_Min%_%rand%
45 | isDebug = /c
46 | if(DEBUG_MODE="true")
47 | isDebug = /k
48 |
49 | ;MsgBox %clipboard%
50 |
51 |
52 | if(clipboard){
53 | ;MsgBox, probably file in clipboard
54 | ;;;;; get file type by extension
55 | clipboardStr = %clipboard%
56 | StringSplit, ColorArray, clipboardStr, `. ;split by '.'
57 | maxIndex := ColorArray0 ;get array lenth
58 | str = ColorArray%maxIndex%
59 | fileType := ColorArray%maxIndex% ;get last element of array, namely file type or file extension
60 | filename = %filePrefix%.%fileType%
61 | ; To run multiple commands consecutively, use "&&" between each
62 | SetWorkingDir, %WORKING_DIR%
63 | RunWait, %comspec% %isDebug% qshell account %ACCESS_KEY% %SECRET_KEY% && qshell fput %BUCKET_NAME% %filename% %clipboard% %UP_HOST%
64 |
65 | }else{
66 | ;MsgBox, probably binary image in clipboard
67 | filename = %filePrefix%.png
68 | fileType := "png"
69 | pathAndName = %WORKING_DIR%%filename%
70 | ;MsgBox, %pathAndName%
71 | SetWorkingDir, %WORKING_DIR%
72 | ; here, thanks for https://github.com/octan3/img-clipboard-dump
73 | RunWait, %comspec% %isDebug% powershell set-executionpolicy remotesigned && powershell -sta -f dump-clipboard-png.ps1 %pathAndName% && qshell account %ACCESS_KEY% %SECRET_KEY% && qshell fput %BUCKET_NAME% %filename% %pathAndName% %UP_HOST% && del %pathAndName%
74 | }
75 |
76 | ;;;; paste markdown format url to current editor
77 | resourceUrl = %BUCKET_DOMAIN%%filename%%STYLE_SUFFIX%
78 | ;MsgBox, %resourceUrl%
79 | ; if image file
80 | if(fileType="jpg" or fileType="png" or fileType="gif" or fileType="bmp" or fileType="jpeg"){
81 | resourceUrl = 
82 | }
83 | ;MsgBox, %resourceUrl%
84 | clipboard = ; Empty the clipboard.
85 | clipboard = %resourceUrl%
86 |
87 | ;MsgBox %clipboard%
88 | Send ^v
89 |
90 | return
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/qshell.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jiwenxing/qimage-win/7892835d5fda110b6c6f3962a97fbbe51219ce4b/qshell.exe
--------------------------------------------------------------------------------
/res/file.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jiwenxing/qimage-win/7892835d5fda110b6c6f3962a97fbbe51219ce4b/res/file.gif
--------------------------------------------------------------------------------
/res/local.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jiwenxing/qimage-win/7892835d5fda110b6c6f3962a97fbbe51219ce4b/res/local.gif
--------------------------------------------------------------------------------
/res/qimage.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jiwenxing/qimage-win/7892835d5fda110b6c6f3962a97fbbe51219ce4b/res/qimage.ico
--------------------------------------------------------------------------------
/res/qimge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jiwenxing/qimage-win/7892835d5fda110b6c6f3962a97fbbe51219ce4b/res/qimge.png
--------------------------------------------------------------------------------
/res/screenshot.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jiwenxing/qimage-win/7892835d5fda110b6c6f3962a97fbbe51219ce4b/res/screenshot.gif
--------------------------------------------------------------------------------
/settings.ini:
--------------------------------------------------------------------------------
1 | [settings]
2 | ACCESS_KEY = G4T2TrlRFLf2-Da-IUrHJKSbVYbJTGpcwBVFbz3
3 | SECRET_KEY = 0wgbpmquurY_BndFuPvDGqzlnfWHCdL8YHjz_fH
4 | BUCKET_NAME = fortest
5 | BUCKET_DOMAIN = http://7xry05.com1.z0.glb.clouddn.com
6 |
7 | ;optional settings
8 | UP_HOST = http://up.qiniu.com
9 | DEBUG_MODE = false
10 | ;define your image style,like imageView2/5/w/2231/h/200, default null
11 | ;reference: https://developer.qiniu.com/dora/manual/3683/img-directions-for-use
12 | STYLE_SUFFIX =
--------------------------------------------------------------------------------
/tips.md:
--------------------------------------------------------------------------------
1 | ## 七牛云bucket之间迁移数据
2 |
3 | 以下方法使用同一区域的bucket之间数据迁移
4 |
5 | ```bash
6 | qshell listbucket jverson cp.txt //将名为jverson的源bucket中文件信息输出到 cp.txt 中
7 | cat cp.txt | awk '{print $1}' >cpp.txt //通过awk字符处理命令将cp.txt中的内容只保留第一列存为cpp.txt,即得到文件列表
8 | qshell batchcopy jverson new cpp.txt //将jverson中的文件全部复制到new的新bucket中
9 | ```
10 |
--------------------------------------------------------------------------------