Merge remote-tracking branch 'origin/dev-v6' into v6

This commit is contained in:
SuperSonic 2023-03-04 11:38:35 +08:00
commit c2a08a2660
No known key found for this signature in database
GPG key ID: 9D3DE8DB7CF08BA3
9 changed files with 229 additions and 0 deletions

109
docs/Configure.md Normal file
View file

@ -0,0 +1,109 @@
> :warning: Warning
>
> Due to protect the talk service of LINE, the software **never** provides any login method, for raising the development threshold.
>
> If you are the developer, we hope you have the sincere spirit only, for improving the Internet, and respect for their hard. :pray:
## Preparing
+ Copying `config.yaml` from `config.sample.yaml`
+ Following the [guide](#configuring), configure your settings and environment in `config.yaml`.
## Configuring
Star Yuuki BOT never provides any login method for connecting LINE talk service, you need to collect the information required, for continuing.
The config file format is [YAML](https://yaml.org), please understanding the syntax, documents, tutorials, and how to write that for configuring.
### Sample Config File
This is the required information to boot the software for working correctly, and optional settings can be set by override as `config.py` listed.
```yaml
# Sample Config File for star_yuuki_bot
# Please replace setting options from `libs/config.py`
Yuuki:
SecurityService: True
Default_Language: en
LINE:
Server:
Host: https://example.com
Command_Path: /example_path
LongPoll_path: /example_path
Account:
X-Line-Application: LINE_Application_Identification
X-Line-Access: LINE_Application_AccessKey
User-Agent: LINE_Application_User-Agent
```
Please make sure all of information above are filled correctly.
### Optional Settings
The guide will lead you to override the settings of `config.py`.
The config file is separated as two major parts, [`Yuuki`](#Yuuki) and [`LINE`](#LINE).
#### Yuuki
| In `config.py` | Converting to `config.yaml` |
|---|---|
| systemConfig | Yuuki |
The part is used for configuring how the software works and computes.
Taking the optional setting, `Advanced`, for example, it belongs to `systemConfig -> Advanced` as `Python dict` default in `config.py`.
So if you hope to set the option to `True`, according the converting table, the config file should be
```yaml
Yuuki:
Advanced: True
```
The feature, `Advanced`, will be active as you set.
As the result, the new config file will be
```yaml
Yuuki:
SecurityService: True
Default_Language: en
Advanced: True
LINE:
Server:
Host: https://example.com
Command_Path: /example_path
LongPoll_path: /example_path
Account:
X-Line-Application: LINE_Application_Identification
X-Line-Access: LINE_Application_AccessKey
User-Agent: LINE_Application_User-Agent
```
That is the way to config the software correctly without any programming modification.
#### LINE
| In `config.py` | Converting to `config.yaml` |
|---|---|
| connectInfo | LINE -> Server |
| connectHeader | LINE -> Account |
- X-Line-Application: `LINE_Application_Identification` means the Product ID for LINE server to identify the client.
- X-Line-Access: `LINE_Application_AccessKey` as known as an access token of LINE user.
- User-Agent: `LINE_Application_User-Agent` is the field to be used as HTTP header to connect LINE server.
These are the required config for connecting LINE server, that you should collect them by yourself.
As the guide part [`Yuuki`](#Yuuki) did, overriding settings as needing.
## Next
If you are ready, let's [run it up](https://github.com/star-inc/star_yuuki_bot/wiki/Execute-and-Maintain)!

View file

@ -0,0 +1,35 @@
> Hey! Developer! 🙌
>
> This is the last step for you to execute the software! 👋
>
> After the guide, if you have anything interested else, welcome to visit [our team blog](https://snb.starinc.xyz) to get more information!
## Install the dependencies
To install the modules the software required, just need to type
pip install -Ur requirements.txt
The command will install its requirements automatically.
## Execute
It's simple that you have only a command to do
python main.py
If the configuration have no fault, [Star Yuuki BOT](https://line.starinc.xyz/star-yuuki-bot) will boot successfully!
## Maintain
You may do some programming modification, for extending some feature by creating on your own, but `Star Yuuki BOT` while suffering a major updated, it might be making you annoyed.
Please trying to good use of [`git diff`](https://git-scm.com/docs/git-diff) or something similar, for comparing between the new one and the one you edited, merging the best snippets to you product.
The software built-in a feature, checking the update automatically, will check `git` while booting everytime!
You may turn it off, but doing version control is necessary to a service for ensuring it stability.
Last but not least, DO NOT MAKE THE SOFTWARE AS `SELF BOT`, it is not acceptable, some features will not work, and may damage your account.
> Thanks for your using, developing, even contributing!

33
docs/Get-Started.md Normal file
View file

@ -0,0 +1,33 @@
Hey! Are you a new developer for LINE Unofficial Engineering?
Due to LINE Messenger API having a lot of restricts, we choose this way to create the security services for LINE.
You must understand that you will have the risk because you are using an unofficial method to connect their server.
You may receive `warning`, `request`, `ban`, even `legal action` from LINE Corporation while you taking too far.
Anyway, welcome to join us. Let's improving the Internet experience for public!
## History
[Star Yuuki BOT](https://line.starinc.xyz/star-yuuki-bot/) was a commerce service in the past, end in 2017.
Since 2018, the source code has been released on [GitHub](https://github.com/star-inc/star_yuuki_bot) as an OSS.
2019, the software was rewritten base on [`NightCrazy`](https://www.facebook.com/star.nightcrazy/) programming structure and improving its performance.
## Start Development
Before beginning, you should read all of the [Technical Information](https://github.com/star-inc/star_yuuki_bot/wiki/Technical-Information) and [Setup Environment](https://github.com/star-inc/star_yuuki_bot/wiki/Setup-Environment) at first.
Generally, the software is compatible with the latest version of `Python 3` on any `Unix-like` system.
If you're suffering anything strange, Yuuki `v6.5` is designed by `Python 3.7`, please install it instead and checking your runtime environment sure.
### Get Source Code
git clone https://github.com/star-inc/star_yuuki_bot.git
### Next
[Configure](https://github.com/star-inc/star_yuuki_bot/wiki/Configure)
[Execute and Maintain](https://github.com/star-inc/star_yuuki_bot/wiki/Execute-and-Maintain)

7
docs/Home.md Normal file
View file

@ -0,0 +1,7 @@
This is the developer documentation for Star Yuuki BOT.
Originally, these documents will should be placed at the [Developer Center of Star Inc.](https://developer.starinc.xyz), but we confused that Star Yuuki BOT is an opensource software, which is one of the repositories on GitHub, the documents should be freedom and could be modify by its community, eventually, we upload them to GitHub Wiki.
Anyway, welcome for choosing the perfectest LINE Group Protective BOT as your helper in your life. :smiley:
[**Get Started**](https://github.com/star-inc/star_yuuki_bot/wiki/Get-Started)

11
docs/Menu.md Normal file
View file

@ -0,0 +1,11 @@
> Are you new from here? ✋
>
> Please read all of [Get Started](https://github.com/star-inc/star_yuuki_bot/wiki/Get-Started) first. 🙏
+ [Setup Environment](https://github.com/star-inc/star_yuuki_bot/wiki/Setup-Environment)
+ [Configure](https://github.com/star-inc/star_yuuki_bot/wiki/Configure)
+ [Execute and Maintain](https://github.com/star-inc/star_yuuki_bot/wiki/Execute-and-Maintain)
+ [Technical Information](https://github.com/star-inc/star_yuuki_bot/wiki/Technical-Information)

View file

@ -0,0 +1,5 @@
+ Check your system environment
- According to our test, the software is incompatible with `Microsoft Windows`.
- We recommend to choosing `Python 3.7` as the runtime environment for executing.
- Please install `pip` and `git`.

View file

@ -0,0 +1,26 @@
Star Yuuki BOT is the software to deploy an automated management service of group for [LINE](http://line.me) platform via their private API with `Apache Thrift Compact Protocol`.
The new programming structure since the version `v6.5` is based on `NightCrazy`, supporting multiprocessing, and getting flexiable for extending.
There are two modes, choosing the compatible one for your environment.
- [Legacy](#legacy-mode) is used for some old or performance losing devices.
- [Advanced](#advanced-mode) will enable multiprocessing for improving the compute speed.
To configure the mode for executing, please read [`Configure`](https://github.com/star-inc/star_yuuki_bot/wiki/Configure) for getting how to set it up.
## Legacy Mode
The mode takes only one thread for running, and [WebAmin](https://github.com/star-inc/star_yuuki_bot#webadmin) or any extra features will be shutdown automatically, no matter if you already turn them on.
### Flow Chart
![Legacy Mode](https://line.starinc.xyz/wp-content/uploads/2020/11/Legacy.png)
## Advanced Mode
This is used as multiprocessing support for improving performance while computing, and provides some extra features.
### Flow Chart
![Advanced Mode](https://line.starinc.xyz/wp-content/uploads/2020/11/Advanced.png)

1
docs/_Footer.md Normal file
View file

@ -0,0 +1 @@
(c) 2020 [Star Inc.](https://starinc.xyz) with its contributors.

2
docs/_Sidebar.md Normal file
View file

@ -0,0 +1,2 @@
Hey, are you finding the menu?
[Click Me](https://github.com/star-inc/star_yuuki_bot/wiki/Menu)