上传图片到github并返回相应的url。
img2url的Python项目详细描述
#img2url
img2url可以帮助您编写可移植文档,特别是标记文件,这样您就不必担心将静态资源(如图像)放在何处!
*github存储库(默认情况下)。
*qi秋对象存储。
<<
受支持的远程遥控器:
/>*github存储库(默认情况下安装
img2url是一个python项目,使用"pip"安装:>
```
$img2url——帮助
用法:
img2url[--no clipboard]<;path>;
img2url[--no clipboard](-m--markdown)<;path>;
选项:
--no clipboard阻止将结果复制到剪贴板。
-m,--markdown返回图像url的标记格式。
````
8月13日21:26。
drwxr-x r-x 8号浩讯员工2728月13日21:23。
-rw-r--r--@1号浩讯员工23975年8月13日21:26-8月13日21:26成像1.png
-rw-r--@1号浩讯员工3727年8月13日21:26成像2.png:2.png
$img2url image1.png
https://cdn.rawgit.com/huntzhan/huntzhan/img2url repo/master/image1.png/master/image1.png
>$img2url--image2.png
!【图片2.png】(https://cdn.rawgit.com/huntzhan/huntzhan/img2url repo/master/image2.png)
````
>用户应该在实际使用img2url之前配置好img2url,这样img2url就知道文件的上传位置。
*`img2url配置路径路径:
>> 自定义路径。
目前,img2url支持以下远程,远程是通过在配置文件中设置"remote"键来指定的。如果未定义"remote",则默认情况下将"github"选为"remote"。
<远程字段设置
<
七秋对象存储;`remote:qiniu
g2url.yml`
``yaml
remote:github
githu用户:img2url测试
githu repo:img2url测试travisci
proxies:
https:socks5://127.0.0.1:1080
````
支持的字段:
|
——————————————————————————————————————————————————————————————————————————|-|
`github_u branch` no `"master"`
`github_u path` no `"`"`
`github_u committer_u name` no `"huntzhan"`
`github u committer_u email` no `"programmer.zhx@gmail.com"`|
{time}由img2url在{time}{time}{time}创建的{filename}{集线器标志`:[人github帐户的所有访问令牌(https://github.com/settings/tokens)。如果没有,请单击"生成新令牌",然后**选择"repo"作用域**,然后记录生成的令牌。
*`github_user`:github的帐户。
*`github_repo`:存储图像的存储库。
*`github_branch`:如果没有定义,请使用"master"作为默认分支。
*`github path`:存储上载文件的路径i在您的存储库中. 如果未定义,则默认使用存储库的根目录。
*`proxies`:如果已定义,则使用proxy发出api请求,而不是直接连接。
*`message_template_create`:用于创建新文件的消息模板,支持的变量:`{filename}`,`sha`,`time`。
*`message_template_updatee`:更新现有文件的消息模板,支持的变量:`{file name}`,`sha`,`time`.
*`github committer`:提交消息的用户名。
*`github committer`:提交消息的电子邮件。
`用法:
`` yaml
远程:qiniu
qiniu_访问密钥:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
qiniu_secret_密钥:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
qiniu_bucket:img2url
qiniu base_url:xxxxxxxx.bkt.clouddn.com
```
支持的字段:
|需要默认
124;
fiel的含义ds:
*`qiniu_access_key`,`qiniu_secret_key`:[访问/密钥](https://portal.qiniu.com/user/key)
*`qiniu_bucket`:qiniu对象存储空间的名称。
*`qiniu base_url`:qiniu对象存储空间的域。
img2url可以帮助您编写可移植文档,特别是标记文件,这样您就不必担心将静态资源(如图像)放在何处!
*github存储库(默认情况下)。
*qi秋对象存储。
<<
受支持的远程遥控器:
/>*github存储库(默认情况下安装
img2url是一个python项目,使用"pip"安装:>
```
$img2url——帮助
用法:
img2url[--no clipboard]<;path>;
img2url[--no clipboard](-m--markdown)<;path>;
选项:
--no clipboard阻止将结果复制到剪贴板。
-m,--markdown返回图像url的标记格式。
````
8月13日21:26。
drwxr-x r-x 8号浩讯员工2728月13日21:23。
-rw-r--r--@1号浩讯员工23975年8月13日21:26-8月13日21:26成像1.png
-rw-r--@1号浩讯员工3727年8月13日21:26成像2.png:2.png
$img2url image1.png
https://cdn.rawgit.com/huntzhan/huntzhan/img2url repo/master/image1.png/master/image1.png
>$img2url--image2.png
!【图片2.png】(https://cdn.rawgit.com/huntzhan/huntzhan/img2url repo/master/image2.png)
````
>用户应该在实际使用img2url之前配置好img2url,这样img2url就知道文件的上传位置。
*`img2url配置路径路径:
>>
目前,img2url支持以下远程,远程是通过在配置文件中设置"remote"键来指定的。如果未定义"remote",则默认情况下将"github"选为"remote"。
<远程字段设置
<
七秋对象存储;`remote:qiniu
g2url.yml`
``yaml
remote:github
githu repo:img2url测试travisci
proxies:
https:socks5://127.0.0.1:1080
````
支持的字段:
|
——————————————————————————————————————————————————————————————————————————|-|
`github_u branch` no `"master"`
`github_u path` no `"`"`
`github_u committer_u name` no `"huntzhan"`
`github u committer_u email` no `"programmer.zhx@gmail.com"`|
{time}由img2url在{time}{time}{time}创建的{filename}{集线器标志`:[人github帐户的所有访问令牌(https://github.com/settings/tokens)。如果没有,请单击"生成新令牌",然后**选择"repo"作用域**,然后记录生成的令牌。
*`github_user`:github的帐户。
*`github_repo`:存储图像的存储库。
*`github_branch`:如果没有定义,请使用"master"作为默认分支。
*`github path`:存储上载文件的路径i在您的存储库中. 如果未定义,则默认使用存储库的根目录。
*`proxies`:如果已定义,则使用proxy发出api请求,而不是直接连接。
*`message_template_create`:用于创建新文件的消息模板,支持的变量:`{filename}`,`sha`,`time`。
*`message_template_updatee`:更新现有文件的消息模板,支持的变量:`{file name}`,`sha`,`time`.
*`github committer`:提交消息的用户名。
*`github committer`:提交消息的电子邮件。
`用法:
`` yaml
远程:qiniu
qiniu_访问密钥:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
qiniu_secret_密钥:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
qiniu_bucket:img2url
qiniu base_url:xxxxxxxx.bkt.clouddn.com
```
支持的字段:
|需要默认
124;
fiel的含义ds:
*`qiniu_access_key`,`qiniu_secret_key`:[访问/密钥](https://portal.qiniu.com/user/key)
*`qiniu_bucket`:qiniu对象存储空间的名称。
*`qiniu base_url`:qiniu对象存储空间的域。