Skip to content

Commit

Permalink
doc: 文档更新
Browse files Browse the repository at this point in the history
  • Loading branch information
meowrain committed Jun 17, 2024
1 parent 8866ac4 commit 5373cab
Show file tree
Hide file tree
Showing 3 changed files with 167 additions and 17 deletions.
42 changes: 25 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
# LocalSend CLI

<p align="center">
<img src="doc/images/image.png" alt="LocalSend CLI logo">
</p>
<div align="center">
<h1>LocalSend CLI</h1>
<img src="doc/images/image.png" alt="LocalSend CLI logo" width="150" height="150">
<p>✨LocalSend CLI✨</p>
</div>

## 文档

[中文](doc/README_zh.md) | [英文](doc/README_en.md)

## 安装

> 😊可以下载Release中的可执行文件
### 先决条件

- [Go](https://golang.org/dl/) 1.16 或更高版本

### 克隆仓库

```sh
git clone https://github.com/yourusername/localsend_cli.git
git clone https://github.com/meowrain/localsend_cli.git
cd localsend_cli
```

Expand All @@ -31,27 +38,27 @@ make build

### 运行程序

#### 接收模式

```sh
.\localsend_cli-windows-amd64.exe -mode receive
```

根据你的操作系统和架构选择相应的二进制文件运行。
Linux下需要执行这个命令,启用其ping功能
`sudo setcap cap_net_raw=+ep localsend_cli`
### 功能

#### 发送模式

```
.\localsend_cli-windows-amd64.exe -mode send -file ./xxxx.xx -to your_ip
```

## 代码结构
example:

- `cmd/main.go`:程序入口
- `internal/config`:配置相关代码
- `internal/discovery`:设备发现相关代码
- `http.go`:HTTP 广播相关代码
- `udp.go`:UDP 广播相关代码
- `shared/shared.go`:共享代码
- `internal/handlers`:HTTP 请求处理相关代码
- `internal/models`:数据模型相关代码
- `internal/utils`:工具类代码
```
.\localsend_cli-windows-amd64.exe -mode send -file ./hello.tar.gz -to 192.168.3.199
```

## 贡献

Expand All @@ -63,4 +70,5 @@ Linux下需要执行这个命令,启用其ping功能

# Todo

发送功能
- [ ] 发送功能完善 发送文字可以在设备上直接显示

69 changes: 69 additions & 0 deletions doc/README_en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<div align="center">
<h1>LocalSend CLI</h1>
<img src="images/image.png" alt="LocalSend CLI logo" width="150" height="150">
<p>✨LocalSend CLI✨</p>
</div>

## Installation

> 😊 You can download the executable files from the Releases.
### Prerequisites

- [Go](https://golang.org/dl/) 1.16 or higher

### Clone the Repository

```sh
git clone https://github.com/meowrain/localsend_cli.git
cd localsend_cli
```

### Build

Use the `Makefile` to build the program.

```sh
make build
```

This will generate binary files for all supported platforms and save them in the `bin` directory.

## Usage

### Run the Program

#### Receive Mode

```sh
.\localsend_cli-windows-amd64.exe -mode receive
```

Choose the appropriate binary file for your operating system and architecture.
On Linux, you need to execute this command to enable its ping functionality:
`sudo setcap cap_net_raw=+ep localsend_cli`

#### Send Mode

```sh
.\localsend_cli-windows-amd64.exe -mode send -file ./xxxx.xx -to your_ip
```

Example:

```sh
.\localsend_cli-windows-amd64.exe -mode send -file ./hello.tar.gz -to 192.168.3.199
```

## Contribution

You are welcome to submit issues and pull requests to help improve this project.

## License

[MIT](LICENSE)

# Todo

- [ ] Improve send functionality to display sent text directly on the device

73 changes: 73 additions & 0 deletions doc/README_zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<div align="center">
<h1>LocalSend CLI</h1>
<img src="images/image.png" alt="LocalSend CLI logo" width="150" height="150">
<p>✨LocalSend-cli✨</p>
</div>



## 安装

> 😊可以下载Release中的可执行文件
### 先决条件

- [Go](https://golang.org/dl/) 1.16 或更高版本

### 克隆仓库

```sh
git clone https://github.com/meowrain/localsend_cli.git
cd localsend_cli
```

### 编译

使用 `Makefile` 来编译程序。

```sh
make build
```

这将会为所有支持的平台生成二进制文件,并保存在 `bin` 目录中。

## 使用

### 运行程序

#### 接收模式

```sh
.\localsend_cli-windows-amd64.exe -mode receive
```

根据你的操作系统和架构选择相应的二进制文件运行。
Linux下需要执行这个命令,启用其ping功能
`sudo setcap cap_net_raw=+ep localsend_cli`

#### 发送模式

```
.\localsend_cli-windows-amd64.exe -mode send -file ./xxxx.xx -to your_ip
```

example:

```
.\localsend_cli-windows-amd64.exe -mode send -file ./hello.tar.gz -to 192.168.3.199
```



## 贡献

欢迎提交 issue 和 pull request 来帮助改进这个项目。

## 许可证

[MIT](LICENSE)

# Todo

- [ ] 发送功能完善 发送文字可以在设备上直接显示

0 comments on commit 5373cab

Please sign in to comment.