Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ChurchTao committed Feb 3, 2024
1 parent 50605ff commit 79a608b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ name: Test

on:
push:
branches: [ master ]
branches: [master]
paths-ignore:
- "README_ZH.md"
- "README.md"
pull_request:
branches: [ master ]
branches: [master]
paths-ignore:
- "README_ZH.md"
- "README.md"

jobs:
clippy:
Expand Down Expand Up @@ -37,4 +43,4 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Run `cargo test`
run: cargo test --all
run: cargo test --all
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

clipboard-rs is a cross-platform library written in Rust for getting and setting the system-level clipboard content. It supports Linux, Windows, and MacOS.

Currently, the logic for MacOS has been completed, and we are continuing to develop the logic for Linux and Windows.

[简体中文](README_ZH.md)

## Development Plan

- [x] MacOS Support
- [ ] Linux Support
- [ ] Windows Support
- [x] Windows Support

## Usage

Expand Down Expand Up @@ -61,14 +59,13 @@ fn main() {

let img = ctx.get_image().unwrap();

println!(
"size={:?},byte len={}",
img.get_size(),
img.get_bytes().len()
);
img.save_to_path("/tmp/test.png").unwrap();

let resize_img = img.thumbnail(300, 300).unwrap();

img.save_to_file("/tmp/test.png").unwrap();
resize_img.save_to_path("/tmp/test_thumbnail.png").unwrap();
}

```

### Reading Any Format
Expand Down
15 changes: 6 additions & 9 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

clipboard-rs 是一个用 Rust 语言编写的跨平台库,用于获取和设置操作系统级别的剪贴板内容。它支持 Linux、Windows 和 MacOS。

目前,MacOS 的逻辑已经完成编写,我们正在继续开发 Linux 和 Windows 的逻辑。

[简体中文](README_ZH.md)

## 开发计划

- [x] MacOS 支持
- [ ] Linux 支持
- [ ] Windows 支持
- [x] Windows 支持

## 使用方法

Expand Down Expand Up @@ -61,15 +59,14 @@ fn main() {

let img = ctx.get_image().unwrap();

println!(
"size={:?},byte len={}",
img.get_size(),
img.get_bytes().len()
);
img.save_to_path("/tmp/test.png").unwrap();

let resize_img = img.thumbnail(300, 300).unwrap();

img.save_to_file("/tmp/test.png").unwrap();
resize_img.save_to_path("/tmp/test_thumbnail.png").unwrap();
}


```

### 读取任意类型
Expand Down

0 comments on commit 79a608b

Please sign in to comment.