Skip to content

Commit

Permalink
docs: update README for the clipboard file upload feature
Browse files Browse the repository at this point in the history
  • Loading branch information
pluveto committed Jan 21, 2023
1 parent aabc9a9 commit bed841e
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 24 deletions.
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@

<img src="https://img.shields.io/badge/Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white" /> <img src="https://img.shields.io/badge/Ubuntu-E95420?style=for-the-badge&logo=ubuntu&logoColor=white" /> <img src="https://img.shields.io/badge/mac%20os-000000?style=for-the-badge&logo=apple&logoColor=F0F0F0" />



**Languages**: English / [简体中文](docs/README.zh-CN.md)



*Upgit* is a native & lightweight tool to helps you upload any file to your Github repository and then get a raw URL for it.

This is also useful with [Typora](https://support.typora.io/Upload-Image/#image-uploaders) as an image uploader.
Expand Down Expand Up @@ -147,7 +143,7 @@ Input *upgit* program location into *Command* textbox.

Now enjoy it!

### Upload Clipboard
### Upload Clipboard Image

Use `:clipboard` place holder for clipboard image. (Only supports **png** format)

Expand All @@ -157,9 +153,21 @@ Use `:clipboard` place holder for clipboard image. (Only supports **png** format

Shortcuts for screenshot:

- On macOS, use `Ctrl+Shift+Cmd+4`
- On Linux/Ubuntu, use `Ctrl+Shift+PrintScreen`
- On Windows, use `Shift+Win+s`
+ On macOS, use `Ctrl+Shift+Cmd+4`
+ On Linux/Ubuntu, use `Ctrl+Shift+PrintScreen`
+ On Windows, use `Shift+Win+s`

### Upload Clipboard Files

**Note:** This feature is only supported on Windows.

Use `:clipboard-files` or `:clipboard-file` place holder for clipboard files. Both will upload all files in clipboard.

```shell
./upgit :clipboard-files
```

Because golang doesn't support clipboard file list, so *upgit* will use [APIProxy-Win32](https://github.com/pluveto/APIProxy-Win32) to get clipboard file list. It will be downloaded automatically when you first use this feature.

### Save URL to Clipboard

Expand Down Expand Up @@ -206,7 +214,6 @@ For Windows user:

(Windows Only, from v0.1.5) We recently added support for Snipaste bitmap format. Just copy screenshot and upload!


## Config Instructions

| Key | Desc |
Expand Down
31 changes: 16 additions & 15 deletions docs/README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# ![upgit](https://cdn.jsdelivr.net/gh/pluveto/upgit/logo.png)



*Upgit* 可以快捷地将文件上传到 Github 仓库并得到其直链。简洁跨平台,不常驻内存。

可作为 [Typora](https://support.typora.io/Upload-Image/#image-uploaders) 的自定义上传器使用。
Expand Down Expand Up @@ -67,21 +65,18 @@
./upgit logo.png
# for windows: .\upgit.exe logo.png
```
然后会看到一个指向 `logo.png` 的直链。


然后会看到一个指向 `logo.png` 的直链。

比如上传 `logo.png` 到远程文件夹 `/my_images/demo`,执行:


```shell
./upgit logo.png -t /my_images/demo
# 对于 Windows: .\upgit.exe logo.png -t /my_images/demo
```

有关更多帮助,请键入“-h”参数


```shell

Upload anything to github repo or other remote storages and then get its link.
Expand Down Expand Up @@ -124,8 +119,6 @@ Actions:
remove smms.jsonc remove SMMS uploader
```
### 配合 Typora 使用
> 假设 *upgit* 程序保存在`“C:\repo\upgit\upgit.exe`
Expand All @@ -146,8 +139,6 @@ Actions:
### 上传剪贴板图像
使用 `:clipboard` 占位符放置剪贴板图像。(仅支持**png**格式)
```shell
Expand All @@ -156,17 +147,26 @@ Actions:
截图快捷键:
- 在 macOS 上,使用 `Ctrl+Shift+Cmd+4`
- 在 Linux/Ubuntu 上,使用 `Ctrl+Shift+PrintScreen`
- 在 Windows 上,使用 `Shift+Win+s`
+ 在 macOS 上,使用 `Ctrl+Shift+Cmd+4`
+ 在 Linux/Ubuntu 上,使用 `Ctrl+Shift+PrintScreen`
+ 在 Windows 上,使用 `Shift+Win+s`
### 上传剪贴板文件
**注意:**此功能仅在 Windows 上支持。
使用 `:clipboard-files``:clipboard-file` 的位置标识来表示剪贴板文件。两者都将上传剪贴板中的所有文件。
```shell
./upgit :clipboard-files
```
因为 golang 不支持直接获取剪贴板文件列表,所以 *upgit* 将使用 [APIProxy-Win32](https://github.com/pluveto/APIProxy-Win32) 来获取剪贴板文件列表。当你第一次使用这个功能时,它将自动下载。
### 将 URL 保存到剪贴板
使用参数 `--output-type clipboard`:
```shell
./upgit logo.png --output-type clipboard
# or .\upgit.exe :clipboard -o clipboard
Expand All @@ -193,14 +193,15 @@ Actions:
1. 安装AHK
2. 创建这个脚本 `upload_clipboard.ahk` 并运行:
```ahk
; Press Ctrl + F9 to upload clipboard image
^F9::
RunWait, "upgit.exe" :clipboard --output-type clipboard --output-format markdown
return
```
3. 然后按 <kbd>Win</kbd><kbd>Shift</kbd><kbd>S</kbd> 截图,按 <kbd>Ctrl</kbd><kbd>F9</kbd>上传并将其链接复制到剪贴板
3. 然后按 <kbd>Win</kbd><kbd>Shift</kbd><kbd>S</kbd> 截图,按 <kbd>Ctrl</kbd><kbd>F9</kbd>上传并将其链接复制到剪贴板
## 配置文件说明
Expand Down

0 comments on commit bed841e

Please sign in to comment.