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

docs: Update README & Add a README translation of Simplified Chinese #63

Open
wants to merge 7 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
72 changes: 72 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
<div align="center">

# Moe-Counter

Multiple styles of Moe-Counters to choose from

**English** | [简体中文](docs/README-zhcn.md)

![Moe-Counter](https://count.getloli.com/get/@Moe-counter.github)

</div>

<details>
<summary>More theme</summary>

##### asoul
![asoul](https://count.getloli.com/get/@demo?theme=asoul)

##### moebooru
![moebooru](https://count.getloli.com/get/@demo?theme=moebooru)

##### rule34
![Rule34](https://count.getloli.com/get/@demo?theme=rule34)

##### gelbooru
![Gelbooru](https://count.getloli.com/get/@demo?theme=gelbooru)</details>
=======
# *Moe Counter!*

多种风格可选的萌萌计数器
Expand Down Expand Up @@ -240,6 +267,12 @@ For information on counter usage and configuration, refer to the [demo website](

### Install

#### Run on Replit

- Open the url [https://replit.com/@journeyad/Moe-Counter](https://replit.com/@journeyad/Moe-Counter)
- Just hit the **Fork** button
- And hit the **Run** button

#### Run on Glitch

- Open [Glitch project](https://glitch.com/~moe-counter-api)
Expand All @@ -251,13 +284,41 @@ For information on counter usage and configuration, refer to the [demo website](
```shell
$ git clone https://github.com/journey-ad/Moe-Counter.git
$ cd Moe-Counter

$ yarn install

$ yarn start

$ pnpm install

$ pnpm run start
```

### Configuration

`config.yml`

```yaml
app:
# site: https://count.getloli.com # your website
port: 3000

db:
type: sqlite # sqlite or mongodb
```

If you use mongodb, you need to specify the environment variable `DB_URL`

```shell
# eg:
export DB_URL=mongodb+srv://account:passwd@***.***.***.mongodb.net/db_count
```

Replit can use Secrets, check [documentation](https://docs.replit.com/programming-ide/storing-sensitive-information-environment-variables)

```
DB_URL="mongodb+srv://account:passwd@***.***.***.mongodb.net/db_count"
=======
Set `.env` file to specify the environment variables. *[.env.example](./.env.example)*

```dosini
Expand Down Expand Up @@ -285,6 +346,17 @@ LOG_LEVEL=debug

## Credits

* [replit](https://replit.com/)
* [A-SOUL_Official](https://space.bilibili.com/703007996)
* [moebooru](https://github.com/moebooru/moebooru)
* rule34.xxx NSFW
* gelbooru.com NSFW
* [Icons8](https://icons8.com/icons/set/star)

## License

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fjourney-ad%2FMoe-Counter.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fjourney-ad%2FMoe-Counter?ref=badge_large)
=======
* [Glitch](https://glitch.com/)
* [A-SOUL_Official](https://space.bilibili.com/703007996)
* [moebooru](https://github.com/moebooru/moebooru)
Expand Down
88 changes: 88 additions & 0 deletions docs/README-zhcn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<div align="center">

# 萌萌计数器

多种风格可选的萌萌计数器

[English](README.md) | **简体中文**

![Moe-Counter](https://count.getloli.com/get/@Moe-counter.github)

</div>

<details>
<summary>更多风格</summary>

##### asoul
![asoul](https://count.getloli.com/get/@demo?theme=asoul)

##### moebooru
![moebooru](https://count.getloli.com/get/@demo?theme=moebooru)

##### rule34
![Rule34](https://count.getloli.com/get/@demo?theme=rule34)

##### gelbooru
![Gelbooru](https://count.getloli.com/get/@demo?theme=gelbooru)</details>

## 演示
[https://count.getloli.com](https://count.getloli.com)

## 使用

### 安装

#### 在Replit上运行

- 打开URL [https://replit.com/@journeyad/Moe-Counter](https://replit.com/@journeyad/Moe-Counter)
- 点击 **Fork** 按钮
- 点击 **Run** 按钮

#### 在自己的服务器上运行

```shell
$ git clone https://github.com/journey-ad/Moe-Counter.git
$ cd Moe-Counter
$ yarn install

$ yarn start
```

### 设置

`config.yml`

```yaml
app:
# site: https://count.getloli.com # your website
port: 3000

db:
type: sqlite # sqlite or mongodb
```

如果你使用的是mongodb,需要指定环境变量`DB_URL`

```shell
# eg:
export DB_URL=mongodb+srv://account:passwd@***.***.***.mongodb.net/db_count
```

Replit可以使用Secrets, 请查看[操作手册](https://docs.replit.com/programming-ide/storing-sensitive-information-environment-variables)

```
DB_URL="mongodb+srv://account:passwd@***.***.***.mongodb.net/db_count"
```

## 鸣谢

* [replit](https://replit.com/)
* [A-SOUL_Official](https://space.bilibili.com/703007996)
* [moebooru](https://github.com/moebooru/moebooru)
* rule34.xxx NSFW
* gelbooru.com NSFW
* [Icons8](https://icons8.com/icons/set/star)

## 许可

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fjourney-ad%2FMoe-Counter.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fjourney-ad%2FMoe-Counter?ref=badge_large)