mirror of
https://github.com/TriM-Organization/Linglun-Converter.git
synced 2026-01-26 13:42:29 +00:00
优化教程
This commit is contained in:
@@ -101,8 +101,7 @@
|
|||||||
pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/
|
pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/
|
||||||
# 然后安装(依次执行下面的指令)
|
# 然后安装(依次执行下面的指令)
|
||||||
apt-get install python-numpy
|
apt-get install python-numpy
|
||||||
pip install Musicreater[full] TrimLog
|
pip install -r requirements_cli.txt
|
||||||
python -m pip install --upgrade pip setuptools wheel
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- 如果出现以下情况,真是死了鬼的,我们要来再搞个设置:
|
- 如果出现以下情况,真是死了鬼的,我们要来再搞个设置:
|
||||||
@@ -118,8 +117,7 @@
|
|||||||
之后再来安装即可
|
之后再来安装即可
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install Musicreater[full] TrimLog
|
python -m pip install --upgrade -r requirements_cli.txt
|
||||||
python -m pip install --upgrade pip setuptools wheel
|
|
||||||
```
|
```
|
||||||
|
|
||||||
安装成功后您可能会见到类似下图的提示:
|
安装成功后您可能会见到类似下图的提示:
|
||||||
|
|||||||
@@ -1,7 +1,20 @@
|
|||||||
|
|
||||||
## 运行环境安装
|
|
||||||
|
|
||||||
### 检验Python运行环境
|
## 1控制台 使用 Docker
|
||||||
|
|
||||||
|
请使用根目录下的 `Dockerfile` 来构建镜像,并运行镜像。
|
||||||
|
|
||||||
|
## 2图形化用户界面
|
||||||
|
|
||||||
|
*未完待续*
|
||||||
|
|
||||||
|
------
|
||||||
|
|
||||||
|
## 3**不建议** 手动安装
|
||||||
|
|
||||||
|
### 运行环境安装
|
||||||
|
|
||||||
|
#### 检验Python运行环境
|
||||||
|
|
||||||
0. 一般的Linux发行版都有安装Python环境,我们只需要保证其版本即可,理论上 ≥Python3.6 都可以运行我们的库
|
0. 一般的Linux发行版都有安装Python环境,我们只需要保证其版本即可,理论上 ≥Python3.6 都可以运行我们的库
|
||||||
|
|
||||||
@@ -43,7 +56,7 @@
|
|||||||
|
|
||||||
暂无
|
暂无
|
||||||
|
|
||||||
### 检查并安装pip包管理器依赖
|
#### 检查并安装pip包管理器依赖
|
||||||
|
|
||||||
1. 我们在安装依赖库之前,应该确认一下,Python自带的包管理器pip是否安装到位:
|
1. 我们在安装依赖库之前,应该确认一下,Python自带的包管理器pip是否安装到位:
|
||||||
|
|
||||||
@@ -69,8 +82,7 @@
|
|||||||
2. 确认完成之后,我们来安装一下依赖库:
|
2. 确认完成之后,我们来安装一下依赖库:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install Musicreater[full] -i https://mirrors.aliyun.com/pypi/simple/
|
pip install -r requirements_cli.txt -i https://mirrors.aliyun.com/pypi/simple/
|
||||||
pip install TrimLog -i https://mirrors.aliyun.com/pypi/simple/
|
|
||||||
```
|
```
|
||||||
|
|
||||||
3. 安装成功后可能会见到类似下图的提示:
|
3. 安装成功后可能会见到类似下图的提示:
|
||||||
@@ -78,7 +90,7 @@
|
|||||||
<img src="https://foruda.gitee.com/images/1662737676719454287/f61a70f7_9911226.png">
|
<img src="https://foruda.gitee.com/images/1662737676719454287/f61a70f7_9911226.png">
|
||||||
|
|
||||||
|
|
||||||
## 本代码库的下载与使用
|
### 本代码库的下载与使用
|
||||||
|
|
||||||
1. 使用Git下载本库及其示例代码
|
1. 使用Git下载本库及其示例代码
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,21 @@
|
|||||||
|
|
||||||
## Install Runtime Environment
|
|
||||||
|
|
||||||
### Install and Verify Python Runtime
|
|
||||||
|
## 1 CLI - Docker
|
||||||
|
|
||||||
|
Using the `Dockerfile` in the root directory to build a Docker image, and run it.
|
||||||
|
|
||||||
|
## 2 GUI
|
||||||
|
|
||||||
|
*to be written*
|
||||||
|
|
||||||
|
------
|
||||||
|
|
||||||
|
## 3 **Not Recommended** Manually Run the CLI code
|
||||||
|
|
||||||
|
### Install Runtime Environment
|
||||||
|
|
||||||
|
#### Install and Verify Python Runtime
|
||||||
|
|
||||||
0. Common Linux Distributions do include a Python Runtime Environment, what we should do is only to check whether it is a satisfied version to our program. If the version ≥Python3.6, theoretically our program can be run.
|
0. Common Linux Distributions do include a Python Runtime Environment, what we should do is only to check whether it is a satisfied version to our program. If the version ≥Python3.6, theoretically our program can be run.
|
||||||
|
|
||||||
@@ -43,7 +57,7 @@
|
|||||||
|
|
||||||
None yet.
|
None yet.
|
||||||
|
|
||||||
### Install and Verify pip Package Manager
|
#### Install and Verify pip Package Manager
|
||||||
|
|
||||||
1. Before installing, it is to be checked, wheather Python's pip is OK:
|
1. Before installing, it is to be checked, wheather Python's pip is OK:
|
||||||
|
|
||||||
@@ -55,22 +69,21 @@
|
|||||||
/usr/bin/python: No module named pip
|
/usr/bin/python: No module named pip
|
||||||
# We can install pip via:
|
# We can install pip via:
|
||||||
sudo pacman -S python-pip
|
sudo pacman -S python-pip
|
||||||
# Verfy, remember.
|
# Check, remember.
|
||||||
python -m pip
|
python -m pip
|
||||||
|
|
||||||
|
|
||||||
# If you did but failed, we should use other methods to install pip:
|
# If you did but failed, we should use other methods to install pip:
|
||||||
wget https://bootstrap.pypa.io/get-pip.py
|
wget https://bootstrap.pypa.io/get-pip.py
|
||||||
sudo python get-pip.py
|
sudo python get-pip.py
|
||||||
# Verfy, must.
|
# Double check, must.
|
||||||
python -m pip
|
python -m pip
|
||||||
```
|
```
|
||||||
|
|
||||||
2. After checking, let's install the dependences.
|
2. After checking, let's install the dependences.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install mido -i
|
pip install -r requirements_cli.txt -i https://mirrors.aliyun.com/pypi/simple/
|
||||||
pip install brotli -i
|
|
||||||
```
|
```
|
||||||
|
|
||||||
3. See the tips below as successfully installed:
|
3. See the tips below as successfully installed:
|
||||||
@@ -78,25 +91,25 @@
|
|||||||
<img src="https://foruda.gitee.com/images/1662737676719454287/f61a70f7_9911226.png">
|
<img src="https://foruda.gitee.com/images/1662737676719454287/f61a70f7_9911226.png">
|
||||||
|
|
||||||
|
|
||||||
## Download this lib's sources code and Using its demos.
|
### Download this lib's sources code and Using its demos.
|
||||||
|
|
||||||
1. Download via Git
|
1. Download via Git
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone -b pkgver https://github.com/TriM-Organization/Musicreater.git MSCTpkgver
|
git clone https://gitee.com/TriM-Organization/Linglun-Converter.git llc
|
||||||
```
|
```
|
||||||
|
|
||||||
If succeed, a directory named `MSCTpkgver` well be found in the path you run this command, and inside it is the source code and demo(s) we wantted to download.
|
If succeed, a directory named `llc` well be found in the path you run this command, and inside it is the source codes we wantted to download.
|
||||||
What we want to use is the demo(s) so enter the folder via:
|
What we want to use is in the folder so enter the folder via:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd MSCTpkgver
|
cd llc
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Starting Using Demo(s)
|
1. Starting Using
|
||||||
|
|
||||||
Via
|
Via
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python magicDemo.py
|
python llc_cli.py
|
||||||
```
|
```
|
||||||
|
|||||||
5
requirements_cli.txt
Normal file
5
requirements_cli.txt
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Musicreater[full]>=2.1.0.1
|
||||||
|
TrimLog>=0.8.3
|
||||||
|
setuptools < 81
|
||||||
|
requests>=2.0.0
|
||||||
|
zhDateTime>=2.0.0
|
||||||
@@ -41,7 +41,7 @@ else:
|
|||||||
try:
|
try:
|
||||||
yanlun_texts = (
|
yanlun_texts = (
|
||||||
requests.get(
|
requests.get(
|
||||||
"https://nd.liteyuki.icu/api/v3/share/content/Xpue?path=null",
|
"https://nd.liteyuki.org/api/v3/share/content/Xpue?path=null",
|
||||||
)
|
)
|
||||||
.text.strip("\n")
|
.text.strip("\n")
|
||||||
.split("\n")
|
.split("\n")
|
||||||
|
|||||||
Reference in New Issue
Block a user