Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add English translation #6

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions LANGS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Languages

* [English](en/)
* [中国](ch/)
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
description: 目前文档仍在陆续完善中!
---

[English version](./en/README.md)

# 欢迎

## Cloudreve 是什么?
Expand Down
31 changes: 31 additions & 0 deletions ch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
description: 目前文档仍在陆续完善中!
---

[English version](../en/README.md)

# 欢迎

## Cloudreve 是什么?

Cloudreve 可以让您快速搭建起公私兼备的网盘系统。Cloudreve 在底层支持不同的云存储平台,用户在实际使用时无须关心物理存储方式。你可以使用 Cloudreve 搭建个人用网盘、文件分享系统,亦或是针对大小团体的公有云系统。

## 问题反馈

如果在使用过程中发现了什么缺陷,或是有新的需求提议,请先检查一下以前的文档、[issue](https://github.com/cloudreve/Cloudreve/issues) 、[讨论社区](https://forum.cloudreve.org/)是否提过。

如果疑似 Bug 或是功能提议,请创建一个 [issue](https://github.com/cloudreve/Cloudreve/issues) 用于追踪问题;

如果是日常使用上的疑问,请到 [讨论社区](https://forum.cloudreve.org/) 创建新的话题,并详细描述你遇到的问题。

## 联系

你可以加入以下群组与其他正在使用 Cloudreve 的用户交流:

* [Telegram 群组](https://t.me/cloudreve_official)
* [QQ 群组](https://jq.qq.com/?_wv=1027&k=5em9gwb)

或是与开发者联系:

Email:[[email protected]](mailto:[email protected])

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
28 changes: 28 additions & 0 deletions en/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
description: The documentation is still being worked on!
---

## Welcome

## What is Cloudreve?

Cloudreve allows you to quickly set up both public and private drives. Cloudreve supports different cloud storage platforms under the hood, so you don't have to worry about the physical storage. You can use Cloudreve for personal use, for file sharing, or as a public cloud for small or large groups.

## Feedback

If you find any bugs or have a new requirement, please check the previous documentation, [issue](https://github.com/cloudreve/Cloudreve/issues), [discussion community](https://forum.cloudreve.org/) to see if it has been mentioned.

If a bug or feature suggestion is suspected, create an [issue](https://github.com/cloudreve/Cloudreve/issues) to track the issue.

If it is a question of daily use, please create a new topic in the [discussion community](https://forum.cloudreve.org/) and describe the problem you are having in detail.

## Contact

You can join the following groups to communicate with other users who are using Cloudreve.

* [Telegram group](https://t.me/cloudreve_official)
* [QQ group](https://jq.qq.com/?_wv=1027&k=5em9gwb)

Or contact the developer at

Email: [[email protected]](mailto:[email protected])
32 changes: 32 additions & 0 deletions en/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Table of contents

* [Welcome](README.md)

## Getting Started <a id="getting-started"></a>

* [Quick Start](getting-started/install.md)
* [Configuration Files](getting-started/config.md)
* [Build](getting-started/build.md)

## Using <a id="use"></a>

* [Storage Policies](use/policy/README.md)
* [Compare](use/policy/compare.md)
* [WebDAV](use/webdav.md)
* [Offline Download](use/aria2.md)
* [Custom Frontends](use/zi-ding-yi-qian-duan.md)
* [Donation Edition](use/pro/README.md)
* [Presentation](use/pro/jie-shao.md)
* [License Management](use/pro/shou-quan-guan-li.md)
* [Change Storage Policy](use/pro/cun-chu-ce-lve-qie-huan.md)
* [Payments](use/pro/pay.md)
* [QQ Connect](use/pro/qq.md)

## Maintenance <a id="manage"></a>

* [Database Scripts](manage/db-script.md)
* [Updating](manage/update/README.md)
* [Updating from 3.x.x](manage/update/cong-3.x.x-sheng-ji.md)
* [Updating from 2.x.x](manage/update/upgrade.md)
* [Upgrade to donation version](manage/update/update-from-os.md)

100 changes: 100 additions & 0 deletions en/getting-started/build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Build

The Cloudreve project consists of two main parts: the main backend repository [cloudreve/Cloudreve](https://github.com/cloudreve/Cloudreve), and the frontend repository [cloudreve/frontend](https://github.com/cloudreve/frontend). Before compiling the Cloudreve backend, you need to build the frontend submodules in the `assets` directory and embed them in the backend repository using [statik](https://github.com/rakyll/statik).

## Environment preparation

1. refer to [Getting Started - The Go Programming Language](https://golang.org/doc/install) to install and configure the Go language development environment.
2. Refer to [Download \| Node.js](https://nodejs.org/download/) to install Node.js;
3. Refer to [Install \| Yarn](https://classic.yarnpkg.com/docs/install#windows-stable) to install Yarn;
4. run `go get github.com/rakyll/statik` to install the statik command line tool;

## Start building

### Clone the repository

``bash
## Clone the repository
git clone --recurse-submodules https://github.com/cloudreve/Cloudreve.git

# # Check out the version you want to compile
git checkout 3.x.x
```

### Build static resources

```bash
# Access the front-end submodule
cd assets
# Install dependencies
yarn install
# Start building
yarn run build
```

When finished, the static resource files are located in the `assets/build` directory.

You can rename this directory to `statics`, place it in the same level as the main Cloudreve application and restart Cloudreve, which will use the static resource files in this directory instead of the built-in ones.

### Embedding static resources

```bash
### Return to the project home directory
cd ../

# Install statik, for embedding static resources
go get github.com/rakyll/statik

# Start embedding
statik -src=assets/build/ -include=*.html,*.js,*.json,*.css,*.png,*.svg,*.ico,*.ttf -f
```

{% hint style="info" %}
If the `statik` command is not found when embedding, try executing.

`export PATH=$PATH:$(go env GOPATH)/bin`
{% endhint %}

### Compile the project

```bash
### Get current version number, commit
export COMMIT_SHA=$(git rev-parse --short HEAD)
export VERSION=$(git describe --tags)

# Start the build
go build -a -o cloudreve -ldflags " -X 'github.com/cloudreve/Cloudreve/v3/pkg/conf.BackendVersion=$VERSION' -X 'github.com/cloudreve/ Cloudreve/v3/pkg/conf.LastCommit=$COMMIT_SHA'"
```

{% hint style="info" %}
When first compiling, Go will download the relevant dependencies, which may cause this step to slow down or fail if you have a poor network. You can use [GOPROXY.IO](https://goproxy.io/zh/) to speed up the module download.
{% endhint %}

Once compiled, the final executable `cloudreve` will be generated in the project root directory.

## Build Assistant

You can quickly build, package etc. using the build script `build.sh` in the project root directory, which is used as follows

```bash
. /build.sh [-a] [-c] [-b] [-r]
a - build static resources
c - compile binaries
b - build front-end + compile binaries
r - cross-compile, build for release
```

## Cross-compiling

Before cross-compiling, you need to enable `CGO`, properly install the GCC toolchain for the target platform and set the `CC` environment variable to the GCC compiler for the corresponding platform.

For example, to cross-compile Windows/AMD64 on a Linux/AMD64 host platform.

```bash
export GOOS=windows
export GOARCH=amd64
export CC=x86_64-w64-mingw32-gcc
export CGO_ENABLED=1

go build
```
165 changes: 165 additions & 0 deletions en/getting-started/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
# Configuration files

## Configuration file

When you start Cloudreve for the first time, Cloudreve creates a configuration file named `conf.ini` in the same level directory.

You can also specify the path to the configuration file by adding the `-c` parameter at startup:

```
./cloudreve -c /path/to/conf.ini
```

An example of a complete configuration file is as follows.

```d
[System]
; Run mode
Mode = master
; Listening port
Listen = :5000
; Whether to enable Debug
Debug = false
; Session key, usually generated automatically at first boot
SessionSecret = 23333
; Hash salt, usually generated automatically at first boot
HashIDSalt = something really hard to guess

; SSL related
[SSL]
; SSL listening port
Listen = :443
; Certificate path
CertPath = C:\Users\i\Documents\fullchain.pem
; private key path
KeyPath = C:\Users\i\Documents\privkey.pem

; Enable Unix Socket Listening
[UnixSocket]
Listen = /run/cloudreve/cloudreve.sock

;If you only want to use the built-in SQLite database, just delete this section
[Database]
; Database type, currently supports sqlite/mysql/mssql/postgres
Type = mysql
MySQL port
Port = 3306
; Username
User = root
Password
Password = root
; Database address
Host = 127.0.0.1
; Database name
Name = v3
; Data table prefix
TablePrefix = cd_
; Character set
Charset = utf8
; SQLite database file path
DBFile = cloudreve.db

; Configuration in slave mode
[Slave]
; Communication key
Secret = 1234567891234567123456789123456712345678912345671234567891234567
; Callback request timeout (s)
CallbackTimeout = 20
; Signature validity
SignatureTTL = 60

; Cross-domain configuration
[CORS]
AllowOrigins = *
AllowMethods = OPTIONS,GET,POST
AllowHeaders = *
AllowCredentials = false

; Redis-related
[Redis]
Server = 127.0.0.1:6379
Password =
DB = 0

; Thumbnail
[Thumbnail]
MaxWidth = 400
MaxHeight = 300
FileSuffix = ._thumb
; Maximum number of thumbnails to be generated in parallel, filled with -1 will be determined automatically based on the number of CPU cores
MaxTaskCount = -1
; can be filled with jpg / png
EncodeMethod = jpg
; whether to garbage collect thumbnails immediately after they are generated
GCAfterGen = false
; Thumbnail quality
EncodeQuality = 85
```

## Using MySQL

By default, Cloudreve uses the built-in SQLite database and creates the database file `cloudreve.db` in the same directory. If you want to use MySQL, please add the following to the configuration file and restart Cloudreve.

Note that Cloudreve only supports MySQL versions greater than or equal to 5.7.
```
[Database]
; database type, currently sqlite/mysql/mssql/postgres is supported
Type = mysql
MySQL port
Port = 3306
; Username
User = root
; Password
Password = root
; Database address
Host = 127.0.0.1
; Database name
Name = v3
; Data table prefix
TablePrefix = cd
; Character set
Charset = utf8
```

{% hint style="info" %}
After changing the database configuration, Cloudreve will reinitialize the database and the old data will be lost.
{% endhint %}

## Using Redis

You can add Redis-related settings to your configuration file.

```
[Redis]
Server = 127.0.0.1:6379
Password = your password
DB = 0
```

{% hint style="info" %}
Please specify a DB for Cloudreve that is not used by other services to avoid conflicts.
{% endhint %}

After restarting Cloudreve, you can note the console output to determine if Cloudreve successfully connected to the Redis server. When using Redis, the following will be taken over by Redis.

* User sessions (no more lost login sessions after restarting Cloudreve)
* Data table HF record query cache (e.g. storage policies, settings entries)
* Callback sessions
* OneDrive credentials

## Enable HTTPS

{% hint style="info" %}
If you are using Cloudreve as a web server reverse proxy, it is recommended that you configure SSL in your web server, the how to described in this section is only valid if you are using Cloudreve's built-in web server.
{% endhint %}

In the configuration file add.

```
[SSL]
Listen = :443
CertPath = C:\Users\i\Documents\fullchain.pem
KeyPath = C:\Users\i\Documents\privkey.pem
```

where `CertPath` and `KeyPath` are the SSL certificate and private key paths, respectively. Save and restart Cloudreve to take effect.
Loading