mirror of
https://github.com/TriM-Organization/Linglun-Converter.git
synced 2026-01-13 15:21:57 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0564ee29e | ||
|
|
680e8f5d3b | ||
|
|
8584f8df33 | ||
|
|
f8e073a2a9 | ||
|
|
2ff857fce7 | ||
|
|
b2fd1c331b |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -8,6 +8,7 @@ __pycache__/
|
||||
*.mid
|
||||
*.midi
|
||||
*.mcpack
|
||||
*.mcstructure
|
||||
*.bdx
|
||||
*.json
|
||||
/Musicreater
|
||||
|
||||
14
Dockerfile
14
Dockerfile
@@ -1,13 +1,16 @@
|
||||
|
||||
# 从镜像站点拷贝基础系统
|
||||
FROM docker.1ms.run/library/python:3.10-slim-bullseye
|
||||
|
||||
ENV TZ Asia/Taipei
|
||||
|
||||
# 工作目录
|
||||
WORKDIR /app
|
||||
|
||||
# RUN cp /etc/apt/sources.list /etc/apt/sources.list.bak
|
||||
# 省的说我给人删了不备份
|
||||
RUN touch /etc/apt/sources.list
|
||||
RUN cp /etc/apt/sources.list /etc/apt/sources.list.bak
|
||||
|
||||
# 换源!!
|
||||
RUN echo "deb https://mirrors.aliyun.com/debian/ bullseye main non-free contrib" > /etc/apt/sources.list && \
|
||||
echo "deb-src https://mirrors.aliyun.com/debian/ bullseye main non-free contrib" >> /etc/apt/sources.list && \
|
||||
echo "deb https://mirrors.aliyun.com/debian-security/ bullseye-security main" >> /etc/apt/sources.list && \
|
||||
@@ -18,21 +21,22 @@ RUN echo "deb https://mirrors.aliyun.com/debian/ bullseye main non-free contrib"
|
||||
echo "deb-src https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib" >> /etc/apt/sources.list
|
||||
|
||||
|
||||
# 下个 Git
|
||||
RUN apt-get update && apt-get install -y git && \
|
||||
# 清理 apt 缓存
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 克隆指定的 git 仓库
|
||||
# 克隆伶伦仓库
|
||||
RUN git clone https://gitee.com/TriM-Organization/Linglun-Converter.git
|
||||
|
||||
# 创建 Python 虚拟环境
|
||||
RUN python3 -m venv /app/venv
|
||||
|
||||
|
||||
# 处理依赖
|
||||
RUN . /app/venv/bin/activate && \
|
||||
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ && \
|
||||
/app/venv/bin/python3 -m pip install --upgrade pip && \
|
||||
pip install --no-cache-dir --upgrade "Musicreater[full]" TrimLog requests zhDateTime
|
||||
pip install --no-cache-dir --upgrade /app/Linglun-Converter/requirements_cli.txt
|
||||
|
||||
# 切换到克隆下来的仓库目录
|
||||
WORKDIR /app/Linglun-Converter
|
||||
|
||||
35
README.md
35
README.md
@@ -45,17 +45,44 @@
|
||||
|
||||
## 致谢 🙏
|
||||
|
||||
- 感谢由 **𝘼𝙪𝙤 “可白”**\<QQ2425476216\> 带来的 Dockerfile 文件参考;
|
||||
在此特别授予其利用本软件进行商业使用之权利:
|
||||
特别声明:依据《汉钰律许可协议,第一版》,准许**可白**\<QQ2425476216\>在中国大陆范围内非专有地对本作品进行商业性使用,包括但不限于:出售本作品之副本、将本作品嵌入云平台后租赁等。
|
||||
* 感谢由 **𝘼𝙪𝙤 “可白”**\<QQ2425476216\> 带来的 Dockerfile 文件参考;
|
||||
|
||||
> 感谢广大群友为此软件提供的测试和建议
|
||||
|
||||
## 授权 📃
|
||||
|
||||
```md
|
||||
伶伦转换器 WXGUI
|
||||
Linglun Converter
|
||||
|
||||
版权所有 © 2026 金羿
|
||||
Copyright © 2026 Eilles
|
||||
|
||||
伶伦转换器项目(“本项目”)的协议颁发者为 金羿
|
||||
The Licensor of _Linglun Converter Project_("this project") is Eilles.
|
||||
|
||||
本项目根据 汉钰律许可协议,第一版(“本协议”)授权。
|
||||
任何人皆可从以下地址获得本协议副本:https://gitee.com/EillesWan/YulvLicenses。
|
||||
若非因法律要求或经过了特殊准许,此作品在根据本协议“原样”提供的基础上,不予提供任何形式的担保、任何明示、任何暗示或类似承诺。也就是说,用户将自行承担因此作品的质量或性能问题而产生的全部风险。
|
||||
详细的准许和限制条款请见原协议文本。
|
||||
```
|
||||
|
||||
该协议禁止在未经许可的情况下对本软件进行商业性使用,因此如需商用请联系本项目开发者。
|
||||
|
||||
**在此特别授予以下用户相关权利:**
|
||||
|
||||
* 特别声明:依据《汉钰律许可协议,第一版》,准许以下用户在中国大陆范围内非专有地对本作品进行商业性使用,包括但不限于:出售本作品之副本、将本作品嵌入云平台后租赁等。
|
||||
|
||||
1. **可白**\<QQ2425476216\>
|
||||
2. **星白**\<QQ3939721331\>
|
||||
|
||||
**权利授予特别声明结束**
|
||||
|
||||
## 联系 📞
|
||||
|
||||
QQ 群 [861684859](https://jq.qq.com/?_wv=1027&k=hpeRxrYr)
|
||||
|
||||
电邮 [TriM-Organization@hotmail.com](mailto:TriM-Organization@hotmail.com)
|
||||
电邮 [TriM-Organization@hotmail.com](mailto://TriM-Organization@hotmail.com)
|
||||
|
||||
[Bilibili: 金羿ELS]: https://img.shields.io/badge/Bilibili-%E9%87%91%E7%BE%BFELS-00A1E7?style=for-the-badge
|
||||
[Bilibili: 诸葛亮与八卦阵]: https://img.shields.io/badge/Bilibili-%E8%AF%B8%E8%91%9B%E4%BA%AE%E4%B8%8E%E5%85%AB%E5%8D%A6%E9%98%B5-00A1E7?style=for-the-badge
|
||||
|
||||
@@ -26,6 +26,8 @@ def main():
|
||||
):
|
||||
if os.path.isdir(file) and os.access(file, os.W_OK):
|
||||
shutil.rmtree(file)
|
||||
elif os.path.isfile(file) and os.access(file, os.W_OK):
|
||||
os.remove(file)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
这里我们选用 **Termux** 作为我们的终端工具来安装,这是一个强大的终端模拟器,旨在安卓环境下模拟Linux的软件包环境。
|
||||
|
||||
> **注意** 若你的设备中已经有终端工具(例如 Utermux 之类的),请跳过此步骤。
|
||||
|
||||
1. 下载
|
||||
|
||||
下载可以通过 [GitHub源](https://github.com/termux/termux-app/releases) 或者 [F-Droid源](https://f-droid.org/en/packages/com.termux/) ,个人建议选择 F-Droid 源,因为在国内可以访问得到,而 GitHub 源就看运气。
|
||||
@@ -26,6 +28,8 @@
|
||||
|
||||
首先,我估计你等不了多久,急得要死,所以我们要让下载速度稍微快一点,先来换个源。在 **Termux** 中,输入以下指令:
|
||||
|
||||
> **注意** 这条指令很长,执行时请左右滑动以复制全部内容。
|
||||
|
||||
```bash
|
||||
echo "deb https://mirror.mwt.me/termux/main stable main" > /data/data/com.termux/files/usr/etc/apt/sources.list
|
||||
```
|
||||
@@ -33,8 +37,10 @@
|
||||
*感谢 天如<QQ 3291691454>为我们带来的简单换源方法。*
|
||||
|
||||
- *非必要步骤*:手动编辑换源
|
||||
|
||||
> **注意** 这是非必要的步骤,执行了也没有好处,小白别闲着没事干。
|
||||
|
||||
如果你闲着没事,非要要手动编辑个文档来换源,那用啥?用普通的编辑器肯定可以,于是我们就让他更普通一点,用**nano**吧!
|
||||
如果你闲着没事,非要要手动编辑个文档来换源,那就可以遵循这一部分的内容,我们先打开 **nano** 吧。
|
||||
|
||||
在 **Termux** 中,输入以下指令:
|
||||
|
||||
@@ -59,13 +65,13 @@
|
||||
|
||||
然后键入 `Ctrl`+`S`,再键入 `Ctrl`+`X`,退出`nano`。
|
||||
|
||||
在换源之后,你可能会见到类似的提示:
|
||||
在换源之后,你可能会见到类似的提示(“可能会”的意思是也可能不会):
|
||||
|
||||
```bash
|
||||
Your '/data/data/com.termux/files/usr/etc/apt/sources.list' file changed. Please run 'apt-get update'.
|
||||
```
|
||||
|
||||
那就遵循它的指引,输入:
|
||||
那就遵循它的指引(但无论出没出现上面的那个提示,都请执行下面的指令),输入:
|
||||
|
||||
```bash
|
||||
apt-get update
|
||||
@@ -94,37 +100,24 @@
|
||||
|
||||
如果输出了形如 `Python 3.X.X` 的提示,则完成。
|
||||
|
||||
3. 安装依赖库
|
||||
3. 构建环境并安装依赖库
|
||||
|
||||
以下长段中井号“#”开头的是注释,无需复制输入。
|
||||
|
||||
```bash
|
||||
# 首先换源
|
||||
pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/
|
||||
# 然后安装(依次执行下面的指令)
|
||||
# 然后安装 numpy
|
||||
apt-get install python-numpy
|
||||
pip install Musicreater[full] TrimLog
|
||||
python -m pip install --upgrade pip setuptools wheel
|
||||
# 新建虚拟环境
|
||||
python -m venv ./.venv
|
||||
```
|
||||
|
||||
- 如果出现以下情况,真是死了鬼的,我们要来再搞个设置:
|
||||
|
||||
<img height="512" src="https://foruda.gitee.com/images/1665933289612919459/b87b7804_9911226.jpeg">
|
||||
|
||||
我们来修改收信任的源设置:
|
||||
|
||||
```bash
|
||||
pip config set global.trusted-host mirrors.aliyun.com/
|
||||
```
|
||||
|
||||
之后再来安装即可
|
||||
|
||||
```bash
|
||||
pip install Musicreater[full] TrimLog
|
||||
python -m pip install --upgrade pip setuptools wheel
|
||||
```
|
||||
|
||||
<!--
|
||||
安装成功后您可能会见到类似下图的提示:
|
||||
|
||||
<img src="https://foruda.gitee.com/images/1662737676719454287/f61a70f7_9911226.png">
|
||||
-->
|
||||
|
||||
### 安装下载工具
|
||||
|
||||
@@ -134,15 +127,23 @@
|
||||
apt install git
|
||||
```
|
||||
|
||||
安装完成后记得测试一下:
|
||||
安装完成后可以测试一下是否安装成功:
|
||||
|
||||
```bash
|
||||
git --version
|
||||
```
|
||||
|
||||
你可能会见到类似 `git version 2.x.x` 的提示,表示安装成功。
|
||||
|
||||
<!--
|
||||
<img height="512" src="https://foruda.gitee.com/images/1665933331269483373/9374c85d_9911226.jpeg">
|
||||
-->
|
||||
|
||||
## 本软件的下载与使用
|
||||
|
||||
1. 使用Git下载本程序代码
|
||||
0. 使用Git下载本程序代码
|
||||
|
||||
```bash
|
||||
```git
|
||||
git clone https://gitee.com/TriM-Organization/Linglun-Converter.git llc
|
||||
```
|
||||
|
||||
@@ -155,13 +156,20 @@ apt install git
|
||||
|
||||
1. 开始使用命令行程序
|
||||
|
||||
依照你的需要,执行以下命令以运行程序:
|
||||
执行以下命令以运行伶伦转换器:
|
||||
|
||||
```bash
|
||||
python llc_cli.py
|
||||
source ./run_cli.sh
|
||||
```
|
||||
|
||||
运行成功了,哦耶!
|
||||
|
||||
<img height="512" src="https://foruda.gitee.com/images/1686963721390700714/b82fb3d5_9911226.png">
|
||||
|
||||
2. 软件更新
|
||||
|
||||
有时可能需要更新本程序,请在进入到本程序所在的文件夹(上述`cd llc`即此)后,执行以下命令:
|
||||
|
||||
```bash
|
||||
git pull
|
||||
```
|
||||
|
||||
@@ -1,7 +1,20 @@
|
||||
|
||||
## 运行环境安装
|
||||
|
||||
### 检验Python运行环境
|
||||
## 一、【控制台】使用 Docker
|
||||
|
||||
请使用根目录下的 `Dockerfile` 来构建镜像,并运行镜像。
|
||||
|
||||
## 二、【图形化用户界面】暂无内容
|
||||
|
||||
*未完待续*
|
||||
|
||||
------
|
||||
|
||||
## 三、【控制台】手动安装(*不建议*)
|
||||
|
||||
### 运行环境安装
|
||||
|
||||
#### 检验Python运行环境
|
||||
|
||||
0. 一般的Linux发行版都有安装Python环境,我们只需要保证其版本即可,理论上 ≥Python3.6 都可以运行我们的库
|
||||
|
||||
@@ -43,7 +56,7 @@
|
||||
|
||||
暂无
|
||||
|
||||
### 检查并安装pip包管理器依赖
|
||||
#### 检查并安装pip包管理器依赖
|
||||
|
||||
1. 我们在安装依赖库之前,应该确认一下,Python自带的包管理器pip是否安装到位:
|
||||
|
||||
@@ -65,20 +78,19 @@
|
||||
# 安装完成后一定要验证!!!
|
||||
python -m pip
|
||||
```
|
||||
|
||||
<!--
|
||||
2. 确认完成之后,我们来安装一下依赖库:
|
||||
|
||||
```bash
|
||||
pip install Musicreater[full] -i https://mirrors.aliyun.com/pypi/simple/
|
||||
pip install TrimLog -i https://mirrors.aliyun.com/pypi/simple/
|
||||
pip install -r requirements_cli.txt -i https://mirrors.aliyun.com/pypi/simple/
|
||||
```
|
||||
|
||||
3. 安装成功后可能会见到类似下图的提示:
|
||||
|
||||
<img src="https://foruda.gitee.com/images/1662737676719454287/f61a70f7_9911226.png">
|
||||
-->
|
||||
|
||||
|
||||
## 本代码库的下载与使用
|
||||
### 本代码库的下载与使用
|
||||
|
||||
1. 使用Git下载本库及其示例代码
|
||||
|
||||
@@ -93,11 +105,20 @@
|
||||
cd llc
|
||||
```
|
||||
|
||||
1. 开始使用
|
||||
1. 新建虚拟环境
|
||||
|
||||
在目录下打开终端,执行以下命令以运行演示程序:
|
||||
在目录下打开终端,或者继续沿用我们刚才已经`cd`过`llc`的终端,执行以下命令以新建虚拟环境:
|
||||
|
||||
```bash
|
||||
python llc_cli.py
|
||||
python -m venv ./.venv
|
||||
```
|
||||
|
||||
2. 运行示例程序
|
||||
|
||||
执行以下命令以运行演示程序:
|
||||
|
||||
```bash
|
||||
source ./run_cli.sh
|
||||
```
|
||||
|
||||
该脚本会自动激活虚拟环境,你也可以通过手动执行`source ./.venv/bin/activate`来激活之。
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## 运行打包文件(推荐)
|
||||
## 运行可执行文件(推荐)
|
||||
|
||||
### 一、下载打包好的应用程序
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<img src=https://foruda.gitee.com/images/1699106948861444130/30c156bc_9911226.png>
|
||||
|
||||
|
||||
## 从代码运行(最新功能)
|
||||
## 从代码运行(不建议)
|
||||
|
||||
### 一、运行环境安装
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
1. 首先需要下载Python的安装包,最好是 *Python3.10*,因为作者就用的是这个版本
|
||||
|
||||
!注意!此程序现已不支持Python3.6。请更新到至少Python3.8,但是,我们对于Python3.8的支持也即将停止,为了更好的兼容,避免不必要的麻烦,我们强烈建议您更新到Python3.10。(这意味着我们即将放弃对Windows7的支持)
|
||||
!注意!此程序现已不支持 Python3.6。请更新到至少Python3.8,但是,我们对于 Python3.8 的支持也即将停止,为了更好的兼容,避免不必要的麻烦,我们强烈建议您更新到 Python3.10。(这意味着我们即将放弃对 Windows7 的支持)
|
||||
|
||||
> [下载64位Python3.10安装包](https://www.python.org/ftp/python/3.10.11/python-3.10.11-amd64.exe)
|
||||
> [下载32位Python3.10安装包](https://www.python.org/ftp/python/3.10.11/python-3.10.11.exe)
|
||||
@@ -38,13 +38,13 @@
|
||||
|
||||
<img src=https://foruda.gitee.com/images/1662736520757331846/e38efb81_9911226.png>
|
||||
|
||||
- 若您对Python一知半解或者不怎么了解、并对自己的系统盘(通常是C盘)有大约150*兆字节*(MB)的信心的话,您可以在安装时直接选择*快速安装*(Install Now)
|
||||
- 若您对 Python 一知半解或者不怎么了解、并对自己的系统盘(通常是C盘)有大约 150 *兆字节*(MB)的信心的话,您可以在安装时直接选择*快速安装*(Install Now)
|
||||
|
||||
3. 若您选择了*自定义安装*(Customize Installation),请务必勾选 `pip` 和 `py launcher` 便于后续安装依赖,如下图:
|
||||
|
||||
<img src=https://foruda.gitee.com/images/1662736621235871190/2ac3d98f_9911226.png>
|
||||
|
||||
4. 安装结束之后可以在*终端*(命令行/PowerShell/Bash/etc)中输入:`python -V` 试试是否安装成功,成功安装之后,在终端中输入python会显示诸如如下图片的提示:
|
||||
4. 安装结束之后可以在*终端*工具(例如 命令行/PowerShell/Bash 之类的都是终端工具)中输入:`python -V` 试试是否安装成功,成功安装之后,在终端中输入python会显示诸如如下图片的提示:
|
||||
|
||||
<img src=https://foruda.gitee.com/images/1699107336707287940/1837e2f6_9911226.png>
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
1. 开始使用
|
||||
|
||||
您可以直接双击 `llc_cli.py` 以运行演示程序,或者按照以下步骤使用终端应用运行。
|
||||
您可以直接双击 `llc_cli.py` 以运行软件,或者按照以下步骤使用终端应用运行。
|
||||
|
||||
在目录下打开终端。
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -43,7 +57,7 @@
|
||||
|
||||
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:
|
||||
|
||||
@@ -55,22 +69,21 @@
|
||||
/usr/bin/python: No module named pip
|
||||
# We can install pip via:
|
||||
sudo pacman -S python-pip
|
||||
# Verfy, remember.
|
||||
# Check, remember.
|
||||
python -m pip
|
||||
|
||||
|
||||
# If you did but failed, we should use other methods to install pip:
|
||||
wget https://bootstrap.pypa.io/get-pip.py
|
||||
sudo python get-pip.py
|
||||
# Verfy, must.
|
||||
# Double check, must.
|
||||
python -m pip
|
||||
```
|
||||
|
||||
2. After checking, let's install the dependences.
|
||||
|
||||
```bash
|
||||
pip install mido -i
|
||||
pip install brotli -i
|
||||
pip install -r requirements_cli.txt -i https://mirrors.aliyun.com/pypi/simple/
|
||||
```
|
||||
|
||||
3. See the tips below as successfully installed:
|
||||
@@ -78,25 +91,25 @@
|
||||
<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
|
||||
|
||||
```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.
|
||||
What we want to use is the demo(s) so enter the folder via:
|
||||
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 in the folder so enter the folder via:
|
||||
|
||||
```bash
|
||||
cd MSCTpkgver
|
||||
cd llc
|
||||
```
|
||||
|
||||
1. Starting Using Demo(s)
|
||||
1. Starting Using
|
||||
|
||||
Via
|
||||
|
||||
```bash
|
||||
python magicDemo.py
|
||||
python llc_cli.py
|
||||
```
|
||||
|
||||
50
llc_cli.py
50
llc_cli.py
@@ -19,33 +19,44 @@ The Licensor of _Linglun Converter CLI_("this project") is Eilles Wan.
|
||||
详细的准许和限制条款请见原协议文本。
|
||||
"""
|
||||
|
||||
__version__ = "0.0.9"
|
||||
__version__ = "0.0.9.2"
|
||||
|
||||
|
||||
import os
|
||||
import random
|
||||
|
||||
import Musicreater
|
||||
from Musicreater import DEFAULT_PROGRESSBAR_STYLE
|
||||
from Musicreater.plugin.addonpack import (
|
||||
to_addon_pack_in_delay,
|
||||
to_addon_pack_in_repeater,
|
||||
to_addon_pack_in_score,
|
||||
)
|
||||
from Musicreater.plugin.bdxfile import to_BDX_file_in_delay, to_BDX_file_in_score
|
||||
from Musicreater.plugin.mcstructfile import (
|
||||
to_mcstructure_file_in_delay,
|
||||
to_mcstructure_file_in_repeater,
|
||||
to_mcstructure_file_in_score,
|
||||
)
|
||||
try:
|
||||
|
||||
from utils.io import bool_str, float_str, int_str, ipt, isin, logger, prt
|
||||
from utils.yanlun import solar_date, yanlun_texts
|
||||
import Musicreater
|
||||
from Musicreater import DEFAULT_PROGRESSBAR_STYLE
|
||||
from Musicreater.plugin.addonpack import (
|
||||
to_addon_pack_in_delay,
|
||||
to_addon_pack_in_repeater,
|
||||
to_addon_pack_in_score,
|
||||
)
|
||||
from Musicreater.plugin.bdxfile import to_BDX_file_in_delay, to_BDX_file_in_score
|
||||
from Musicreater.plugin.mcstructfile import (
|
||||
to_mcstructure_file_in_delay,
|
||||
to_mcstructure_file_in_repeater,
|
||||
to_mcstructure_file_in_score,
|
||||
)
|
||||
|
||||
from utils.io import bool_str, float_str, int_str, ipt, isin, logger, prt
|
||||
from utils.yanlun import solar_date, yanlun_texts
|
||||
|
||||
except ImportError:
|
||||
if input("[ERROR] 当前环境中未安装所需依赖库,是否直接安装依赖库?[Y/n]") in (
|
||||
"y",
|
||||
"Y",
|
||||
):
|
||||
os.system("pip install -r ./requirements_cli.txt")
|
||||
print("[INFO] 安装完成,请重新启动。")
|
||||
|
||||
exit()
|
||||
|
||||
# import sys
|
||||
|
||||
|
||||
|
||||
# from Musicreater.plugin.mcstructure import commands_to_structure, commands_to_redstone_delay_structure
|
||||
|
||||
|
||||
@@ -95,6 +106,7 @@ elif solar_date == (8, 16):
|
||||
style_ = "#F0F2F4 on #0089F2" # TODO
|
||||
else:
|
||||
style_ = "#121110 on #F0F2F4"
|
||||
yanlun_texts = [""]
|
||||
# 显示箴言部分
|
||||
logger.console.print(
|
||||
"[{}]{}".format(style_, random.choice(yanlun_texts)),
|
||||
@@ -196,7 +208,7 @@ def is_in_player(sth: str, in_ok: tuple = (0, 1, 2)):
|
||||
),
|
||||
(
|
||||
2,
|
||||
("repeater", "2", "中继器", "瑞皮特"),
|
||||
("repeater", "2", "中继器", "瑞皮特尔"),
|
||||
),
|
||||
]
|
||||
if i in in_ok
|
||||
@@ -379,7 +391,7 @@ for singleMidi in midis:
|
||||
else to_BDX_file_in_delay(cvt_mid, out_path, style, *prompts[3:])
|
||||
)
|
||||
if output_file_format == 1
|
||||
else (cvt_method(cvt_mid, out_path, *prompts[2:]))
|
||||
else (cvt_method(cvt_mid, out_path, *prompts[2:])) # type: ignore
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -57,15 +57,15 @@ from Musicreater.plugin.websocket import to_websocket_server
|
||||
|
||||
from utils.authorp import go_author_page
|
||||
from utils.io import TrimLog, log__init__, logger, object_constants
|
||||
from utils.packdata import enpack_llc_pack, load_msct_packed_data, unpack_llc_pack
|
||||
from utils.packdata import enpack_llc_pack, unpack_llc_pack
|
||||
from utils.update_check import check_update_release
|
||||
from utils.webview import go_update_tip
|
||||
from utils.yanlun import yanlun_bg_colour, yanlun_fg_colour, yanlun_texts
|
||||
from utils.yanlun import STANDARD_WHITE, STANDART_BLACK, yanlun_texts
|
||||
|
||||
WHITE = (242, 244, 246) # F2F4F6
|
||||
WHITE = wx.Colour(242, 244, 246) # F2F4F6
|
||||
# WHITE2 = (248, 252, 255)
|
||||
# WHITE3 = (233, 236, 240)
|
||||
BLACK = (18, 17, 16) # 121110
|
||||
BLACK = wx.Colour(18, 17, 16) # 121110
|
||||
# BLACK2 = (9, 12, 14)
|
||||
# BLACK3 = (0, 2, 6)
|
||||
|
||||
@@ -74,32 +74,36 @@ BLACK = (18, 17, 16) # 121110
|
||||
# BLACK = (242, 244, 246) # 121110
|
||||
# BLACK2 = (248, 252, 255)
|
||||
|
||||
yanlun_fg_colour = wx.Colour(*STANDARD_WHITE)
|
||||
yanlun_bg_colour = wx.Colour(*STANDART_BLACK)
|
||||
|
||||
__appname__ = "伶伦转换器"
|
||||
__version__ = "WXGUI 1.2.1.1"
|
||||
__zhver__ = "WX图形界面 初代次版一编"
|
||||
__version__ = "WXGUI 1.2.3"
|
||||
__zhver__ = "WX图形界面 初代次版三编"
|
||||
|
||||
|
||||
logger.info("检查更新")
|
||||
if __name__ == "__main__":
|
||||
|
||||
down_paths = check_update_release(
|
||||
"伶伦转换器",
|
||||
"https://gitee.com/TriM-Organization/Linglun-Converter/releases/latest",
|
||||
__version__,
|
||||
go_update_tip,
|
||||
logger,
|
||||
"!有新版本!\n新版本 {app} {latest} 可用,当前仍是 {current}\n请前往下载地址更新\n",
|
||||
)
|
||||
logger.info("检查更新")
|
||||
|
||||
|
||||
if down_paths:
|
||||
wx.LaunchDefaultBrowser(
|
||||
"https://gitee.com{}".format(
|
||||
[v for i, v in down_paths.items() if sys.platform in i][0]
|
||||
)
|
||||
down_paths = check_update_release(
|
||||
"伶伦转换器",
|
||||
"https://gitee.com/TriM-Organization/Linglun-Converter/releases/latest",
|
||||
__version__,
|
||||
go_update_tip,
|
||||
logger,
|
||||
"!有新版本!\n新版本 {app} {latest} 可用,当前仍是 {current}\n请前往下载地址更新\n",
|
||||
)
|
||||
exit()
|
||||
# go_update_tip("点击下方链接下载更新:",'<a href="https://gitee.com{}">点击此处下载</a>'.format(list(down_paths.values())[0]))
|
||||
|
||||
if down_paths:
|
||||
wx.LaunchDefaultBrowser(
|
||||
"https://gitee.com{}".format(
|
||||
[v for i, v in down_paths.items() if sys.platform in i][0]
|
||||
)
|
||||
)
|
||||
exit()
|
||||
# go_update_tip("点击下方链接下载更新:",'<a href="https://gitee.com{}">点击此处下载</a>'.format(list(down_paths.values())[0]))
|
||||
|
||||
|
||||
"""
|
||||
msct_main = msct_plugin = msct_plugin_function = None
|
||||
@@ -278,10 +282,57 @@ if down_paths:
|
||||
) = msct_plugin_function
|
||||
"""
|
||||
|
||||
|
||||
logger.info("初始化日志系统……")
|
||||
|
||||
osc = object_constants.ObjectStateConstant(
|
||||
logging_project_name=__appname__,
|
||||
logging_project_version=__version__,
|
||||
logging_exit_exec=lambda sth: wx.MessageDialog(
|
||||
None,
|
||||
sth + "\n问题不大吧?有问题拜托请报给开发者!谢谢!",
|
||||
"崩溃",
|
||||
wx.YES_DEFAULT | wx.ICON_STOP,
|
||||
).ShowModal(),
|
||||
# is_this_a_release=True,
|
||||
)
|
||||
# print(osc.exit_execution)
|
||||
osc.set_console(logger.console)
|
||||
|
||||
log__init__(osc, TrimLog.PipManage(True, True, 40), True)
|
||||
|
||||
logger.is_logging = True
|
||||
logger.suffix = ".llc"
|
||||
logger.is_tips = True
|
||||
logger.printing = not osc.is_release
|
||||
|
||||
|
||||
logger.info("初始化窗口应用……")
|
||||
|
||||
|
||||
# 创建应用程序类
|
||||
class LinglunConverterApp(wx.App):
|
||||
def OnInit(self):
|
||||
# 创建主窗口
|
||||
self.SetAppName(__appname__)
|
||||
return True
|
||||
|
||||
def re_init(self, frameClass):
|
||||
|
||||
self.frame = frameClass(None)
|
||||
self.SetTopWindow(self.frame)
|
||||
self.frame.Show()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = LinglunConverterApp()
|
||||
|
||||
|
||||
logger.info("注册变量并读取内容……")
|
||||
|
||||
yanlun_length = len(yanlun_texts)
|
||||
|
||||
pgb_style: Musicreater.ProgressBarStyle = Musicreater.DEFAULT_PROGRESSBAR_STYLE.copy() # type: ignore
|
||||
pgb_style: Musicreater.ProgressBarStyle = Musicreater.DEFAULT_PROGRESSBAR_STYLE.copy()
|
||||
on_exit_saving: bool = True
|
||||
ignore_midi_mismatch_error: bool = True
|
||||
convert_tables = {
|
||||
@@ -307,7 +358,14 @@ ConvertClass = (Musicreater.MidiConvert, "常规转换")
|
||||
if os.path.isfile("save.llc.config"):
|
||||
unpacked_data = unpack_llc_pack("save.llc.config", False)
|
||||
if isinstance(unpacked_data, Exception):
|
||||
logger.warning("读取设置文件失败:{};使用默认设置信息。")
|
||||
wx.MessageBox(
|
||||
logger.warning(
|
||||
"读取设置文件失败:{};使用默认设置信息。".format(unpacked_data)
|
||||
),
|
||||
"警告",
|
||||
wx.YES_DEFAULT | wx.ICON_WARNING,
|
||||
)
|
||||
|
||||
else:
|
||||
(
|
||||
pgb_style,
|
||||
@@ -319,51 +377,14 @@ if os.path.isfile("save.llc.config"):
|
||||
) = unpacked_data
|
||||
|
||||
|
||||
osc = object_constants.ObjectStateConstant(
|
||||
logging_project_name=__appname__,
|
||||
logging_project_version=__version__,
|
||||
logging_exit_exec=lambda sth: wx.MessageDialog(
|
||||
None,
|
||||
sth + "\n问题不大吧?有问题拜托请报给开发者!谢谢!",
|
||||
"崩溃",
|
||||
wx.YES_DEFAULT | wx.ICON_STOP,
|
||||
).ShowModal(),
|
||||
# is_this_a_release=True,
|
||||
)
|
||||
# print(osc.exit_execution)
|
||||
osc.set_console(logger.console)
|
||||
|
||||
log__init__(osc, TrimLog.PipManage(True, True, 40), True)
|
||||
|
||||
logger.is_logging = True
|
||||
logger.suffix = ".llc"
|
||||
logger.is_tips = True
|
||||
logger.printing = not osc.is_release
|
||||
|
||||
|
||||
yanlun_length = len(yanlun_texts)
|
||||
|
||||
logger.info("加载窗口布局……")
|
||||
|
||||
|
||||
# 创建应用程序类
|
||||
class LinglunConverterApp(wx.App):
|
||||
def OnInit(self):
|
||||
# 创建主窗口
|
||||
self.SetAppName(__appname__)
|
||||
self.frame = LingLunMainFrame(
|
||||
None,
|
||||
)
|
||||
self.SetTopWindow(self.frame)
|
||||
self.frame.Show()
|
||||
return True
|
||||
logger.info("音·创内核版本:{}".format(Musicreater.__version__), mandatory_use=True)
|
||||
|
||||
|
||||
logger.info("加载主框架……")
|
||||
|
||||
|
||||
class LingLunMainFrame(wx.Frame):
|
||||
def __init__(self, parent):
|
||||
def __init__(self, parent=None):
|
||||
wx.Frame.__init__(
|
||||
self,
|
||||
parent,
|
||||
@@ -1354,13 +1375,13 @@ class ConvertPagePanel(wx.Panel):
|
||||
)
|
||||
|
||||
def onSpeedSpinChanged(self, event):
|
||||
if self.m_speed_spinCtrlDouble.Value > 1:
|
||||
if self.m_speed_spinCtrlDouble.GetValue() > 1:
|
||||
self.m_speed_slider.SetValue(
|
||||
int((self.m_speed_spinCtrlDouble.Value + 8) * 50 / 9)
|
||||
int((self.m_speed_spinCtrlDouble.GetValue() + 8) * 50 / 9)
|
||||
)
|
||||
else:
|
||||
self.m_speed_slider.SetValue(
|
||||
int((self.m_speed_spinCtrlDouble.Value - 0.01) * 5000 / 99)
|
||||
int((self.m_speed_spinCtrlDouble.GetValue() - 0.01) * 5000 / 99)
|
||||
)
|
||||
|
||||
def onProgressbarChecked(self, event):
|
||||
@@ -1410,8 +1431,8 @@ class ConvertPagePanel(wx.Panel):
|
||||
|
||||
def onStartButtonPressed(self, event):
|
||||
global pgb_style
|
||||
for file_name in self.m_midiFilesList_listBox2.GetStrings():
|
||||
if file_name == "诸葛亮与八卦阵-山水千年":
|
||||
for file_path_location in self.m_midiFilesList_listBox2.GetStrings():
|
||||
if file_path_location == "诸葛亮与八卦阵-山水千年":
|
||||
mid_cvt = ConvertClass[0].from_mido_obj(
|
||||
midi_obj=None,
|
||||
midi_name="山水千年",
|
||||
@@ -1428,8 +1449,9 @@ class ConvertPagePanel(wx.Panel):
|
||||
)
|
||||
else:
|
||||
mid_cvt = ConvertClass[0].from_midi_file(
|
||||
midi_file_path=file_name,
|
||||
midi_file_path=file_path_location,
|
||||
mismatch_error_ignorance=ignore_midi_mismatch_error,
|
||||
play_speed=self.m_speed_spinCtrlDouble.GetValue(),
|
||||
pitched_note_table=convert_tables["PITCHED"][
|
||||
convert_table_selection["PITCHED"]
|
||||
],
|
||||
@@ -1437,10 +1459,12 @@ class ConvertPagePanel(wx.Panel):
|
||||
convert_table_selection["PERCUSSION"]
|
||||
],
|
||||
old_exe_format=self.m_oldExeFormatChecker_checkBox3.GetValue(),
|
||||
min_volume=self.m_volumn_spinCtrlDouble1.GetValue() / 100,
|
||||
music_pitch_deviation=0,
|
||||
)
|
||||
|
||||
cvt_dist = (
|
||||
os.path.split(file_name)[0]
|
||||
os.path.split(file_path_location)[0]
|
||||
if self.m_Check_Every_Their_Path_checkBox7.GetValue()
|
||||
else self.m_Convertion_Destination_Picker_dirPicker1.GetTextCtrl().GetValue()
|
||||
)
|
||||
@@ -1485,7 +1509,11 @@ class ConvertPagePanel(wx.Panel):
|
||||
return
|
||||
wx.MessageDialog(
|
||||
None,
|
||||
"完成!\n指令数量:{}\n延迟总长:{}".format(cmd_num, total_delay),
|
||||
logger.info(
|
||||
"{} - 转换完成!\n指令数量:{}\n延迟总长:{}".format(
|
||||
mid_cvt.music_name, cmd_num, total_delay
|
||||
)
|
||||
),
|
||||
"转换成功",
|
||||
wx.YES_DEFAULT | wx.ICON_INFORMATION,
|
||||
).ShowModal()
|
||||
@@ -1521,14 +1549,17 @@ class ConvertPagePanel(wx.Panel):
|
||||
return
|
||||
wx.MessageDialog(
|
||||
None,
|
||||
"完成!\n结构大小:{}\n延迟总长:{}{}".format(
|
||||
size,
|
||||
total_delay,
|
||||
(
|
||||
"\n指令数量:{}".format(cmd_num) # type: ignore
|
||||
if self.m_playerChoice_choice2.GetSelection() == 0
|
||||
else ""
|
||||
),
|
||||
logger.info(
|
||||
"{} - 转换完成!\n结构大小:{}\n延迟总长:{}{}".format(
|
||||
mid_cvt.music_name,
|
||||
size,
|
||||
total_delay,
|
||||
(
|
||||
"\n指令数量:{}".format(cmd_num) # type: ignore
|
||||
if self.m_playerChoice_choice2.GetSelection() == 0
|
||||
else ""
|
||||
),
|
||||
)
|
||||
),
|
||||
"转换成功",
|
||||
wx.YES_DEFAULT | wx.ICON_INFORMATION,
|
||||
@@ -1563,8 +1594,10 @@ class ConvertPagePanel(wx.Panel):
|
||||
return
|
||||
wx.MessageDialog(
|
||||
None,
|
||||
"{}\n\n完成!\n指令数量:{}\n延迟总长:{}\n结构大小:{}\n终点坐标:{}".format(
|
||||
file_name, cmd_num, total_delay, size, final_pos
|
||||
logger.info(
|
||||
"{} - 转换完成!\n指令数量:{}\n延迟总长:{}\n结构大小:{}\n终点坐标:{}".format(
|
||||
mid_cvt.music_name, cmd_num, total_delay, size, final_pos
|
||||
)
|
||||
),
|
||||
"转换成功",
|
||||
wx.YES_DEFAULT | wx.ICON_INFORMATION,
|
||||
@@ -1578,9 +1611,43 @@ class ConvertPagePanel(wx.Panel):
|
||||
).ShowModal()
|
||||
return
|
||||
|
||||
if ConvertClass[1] == "羽音缭绕":
|
||||
shenyu_inst_list = set()
|
||||
for _inst in set(
|
||||
[
|
||||
n.split(".")[0].replace("c", "").replace("d", "")
|
||||
for n in mid_cvt.note_count_per_instrument.keys()
|
||||
]
|
||||
):
|
||||
try:
|
||||
_fnl_inst = int(_inst.strip())
|
||||
shenyu_inst_list.add(
|
||||
"-1 \t- 打击乐组"
|
||||
if _fnl_inst == -1
|
||||
else "{} \t- {}".format(
|
||||
_fnl_inst,
|
||||
Musicreater.MIDI_PITCHED_NOTE_NAME_TABLE[_fnl_inst + 1][
|
||||
0
|
||||
],
|
||||
)
|
||||
)
|
||||
except Exception as e:
|
||||
logger.warning("`{}` 出现以下问题:{}".format(_inst, e))
|
||||
shenyu_inst_list.add(_inst)
|
||||
wx.MessageDialog(
|
||||
None,
|
||||
"曲目 {} 乐器使用情况如下,请自行加载羽音缭绕资源包系列的:\n{}".format(
|
||||
mid_cvt.music_name,
|
||||
"\n".join(sorted(shenyu_inst_list)),
|
||||
),
|
||||
"羽音缭绕提示",
|
||||
wx.YES_DEFAULT | wx.ICON_INFORMATION,
|
||||
).ShowModal()
|
||||
del shenyu_inst_list
|
||||
|
||||
if self.m_done_then_remove_checkBox6.GetValue():
|
||||
self.m_midiFilesList_listBox2.Delete(
|
||||
self.m_midiFilesList_listBox2.FindString(file_name)
|
||||
self.m_midiFilesList_listBox2.FindString(file_path_location)
|
||||
)
|
||||
|
||||
|
||||
@@ -1752,7 +1819,13 @@ class SettingPagePannel(wx.Panel):
|
||||
5,
|
||||
)
|
||||
|
||||
experiment_type_choiceChoices = ["常规转换", "长音插值", "同刻偏移"]
|
||||
experiment_type_choiceChoices = [
|
||||
"常规转换",
|
||||
"长音插值",
|
||||
"同刻偏移",
|
||||
"羽音缭绕",
|
||||
"歌词测试",
|
||||
]
|
||||
self.experiment_type_choice = wx.Choice(
|
||||
setting_page1_experiment_style.GetStaticBox(),
|
||||
wx.ID_ANY,
|
||||
@@ -2050,6 +2123,7 @@ class SettingPagePannel(wx.Panel):
|
||||
def onConvertMethodUpdating(self, event):
|
||||
global ConvertClass
|
||||
# 0 "常规转换", 1 "长音插值", 2 "同刻偏移"
|
||||
# 3 "羽音缭绕" 4 "歌词测试"
|
||||
match self.experiment_type_choice.GetSelection():
|
||||
case 0:
|
||||
ConvertClass = (Musicreater.MidiConvert, "常规转换")
|
||||
@@ -2057,6 +2131,28 @@ class SettingPagePannel(wx.Panel):
|
||||
ConvertClass = (Musicreater_experiment.FutureMidiConvertM4, "长音插值")
|
||||
case 2:
|
||||
ConvertClass = (Musicreater_experiment.FutureMidiConvertM5, "同刻偏移")
|
||||
wx.MessageDialog(
|
||||
self,
|
||||
"本转换方法“同刻偏移”仅支持以延迟播放器播放,请在转换参数主页“选择播放器”一栏中选择“命令延迟”",
|
||||
"敬告",
|
||||
wx.OK | wx.ICON_WARNING,
|
||||
).ShowModal()
|
||||
case 3:
|
||||
ConvertClass = (
|
||||
Musicreater_experiment.FutureMidiConvertKamiRES,
|
||||
"羽音缭绕",
|
||||
)
|
||||
case 4:
|
||||
ConvertClass = (
|
||||
Musicreater_experiment.FutureMidiConvertLyricSupport,
|
||||
"歌词测试",
|
||||
)
|
||||
wx.MessageDialog(
|
||||
self,
|
||||
"本转换方法“歌词测试”仅支持以延迟播放器播放,请在转换参数主页“选择播放器”一栏中选择“命令延迟”\n另外,本功能仅对部分包含歌词的midi文件生效,且与进度条显示有冲突,请谨慎使用",
|
||||
"敬告",
|
||||
wx.OK | wx.ICON_WARNING,
|
||||
).ShowModal()
|
||||
|
||||
def onMidiFaultIgnoranceChecking(self, event):
|
||||
global ignore_midi_mismatch_error
|
||||
@@ -2167,9 +2263,13 @@ if __name__ == "__main__":
|
||||
|
||||
logger.info("开启窗口")
|
||||
|
||||
app = LinglunConverterApp()
|
||||
try:
|
||||
app.re_init(LingLunMainFrame) # type: ignore
|
||||
app.MainLoop() # type: ignore
|
||||
except Exception as e:
|
||||
logger.error(f"程序异常退出:{e}")
|
||||
|
||||
app.MainLoop()
|
||||
logger.info("关闭窗口,收尾任务")
|
||||
|
||||
if on_exit_saving:
|
||||
enpack_llc_pack(
|
||||
@@ -2185,9 +2285,9 @@ if __name__ == "__main__":
|
||||
)
|
||||
else:
|
||||
for path, dir_list, file_list in os.walk(r"./"):
|
||||
for file_name in file_list:
|
||||
if file_name.endswith(".llc.config"):
|
||||
for file_name_ in file_list:
|
||||
if file_name_.endswith(".llc.config"):
|
||||
os.remove(
|
||||
os.path.join(path, file_name),
|
||||
os.path.join(path, file_name_),
|
||||
)
|
||||
# input("按下回车退出……")
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
pyinstaller -D ./llc_win_wxPython.py -i ./resources/LLC_LOGO_OK_PLAIN_BANNER.ico --hide-console minimize-late --clean -n 伶伦转换器
|
||||
pyinstaller -D ./llc_win_wxPython.py -i ./resources/LLC_LOGO_OK_PLAIN_BANNER.ico --hide-console minimize-late --clean -n 伶伦转换器
|
||||
pause
|
||||
python ./clean_pycache.py
|
||||
5
requirements_cli.txt
Normal file
5
requirements_cli.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
setuptools < 80
|
||||
Musicreater[full]>=2.1.0.1
|
||||
TrimLog>=0.8.3
|
||||
requests>=2.0.0
|
||||
zhDateTime>=2.0.0
|
||||
@@ -8,22 +8,22 @@
|
||||
|
||||
**金羿ELS**、**金羿**、**Eilles Wan**、**丌幂**、**诸葛亮与八卦阵**、**诸葛八卦**、**BgArray**、**鸣凤鸽子**、**鱼旧梦**、**ElapsingDreams**等一众具有显著特征的自然人网名、自然人姓名、自然人专有名称之类之辞皆为专有标记,未经其本人允许不得擅自使用。
|
||||
|
||||
**伶伦工作站**、**伶伦转换器**、**LingLun Studio**、**LingLun Converter**、**音·创**、**Musicreater**等一众项目、软件、需求库之名称皆为专用之商业标记,未经其所有者允许不得擅自使用。
|
||||
**伶伦工作站**、**伶伦转换器**、**LingLun Studio**、**LingLun Converter**、**音·创**、**Musicreater**等一众项目、软件、需求库之名称皆为本项目专用之商业标记,未经其所有者允许不得擅自使用。
|
||||
|
||||
睿乐组织的徽标[**【木制展框上的惊异媒体】(睿思乐发)**](https://gitee.com/TriM-Organization/Linglun-Converter/raw/master/resources/TriMO_Theme.mp4)之图案及相关动画是**丌幂**所作的、**睿乐组织**的共同标志,其著作权归属**丌幂**所有,并授权给**睿乐组织**使用。其相关声像信息、睿乐组织的主题音[**【悦搏音符之回响】(睿思乐发)**](https://gitee.com/TriM-Organization/Linglun-Converter/raw/master/resources/TriMO_Theme.mp4)是**诸葛亮与八卦阵**所制作的、**睿乐组织**的共同标记,其著作权归属**诸葛亮与八卦阵**所有,并授权给**睿乐组织**使用。上述之图形、动画、声音等相关媒体信息皆为**睿乐组织**所专用的商业标记,未经**睿乐组织**之允许不得使用。
|
||||
睿乐组织的徽标[**【木制展框上的惊异媒体】(睿思乐发)**](./TriMO_Theme.mp4)之图案及相关动画是**丌幂**所作的、**睿乐组织**的共同标志,其著作权归属**丌幂**所有,并授权给**睿乐组织**使用。其相关声像信息、睿乐组织的主题音[**【悦搏音符之回响】(睿思乐发)**](./TriMO_Theme.mp4)是**诸葛亮与八卦阵**所制作的、**睿乐组织**的共同标记,其著作权归属**诸葛亮与八卦阵**所有,并授权给**睿乐组织**使用。上述之图形、动画、声音等相关媒体信息皆为**睿乐组织**所专用的商业标记,未经**睿乐组织**之允许不得使用。
|
||||
|
||||
[**木制框架中的乐灵**](https://gitee.com/TriM-Organization/Linglun-Converter/raw/master/resources/LLC_LOGO_OK_PLAIN_BANNER.png)之图案及相关动画、声音均为**伶伦工作站**之专用标记,未经**睿乐组织**之允许不得使用。
|
||||
[**木制框架中的乐灵**](./LLC_LOGO_OK_PLAIN_BANNER.png)之图案及相关动画、声音均为**伶伦工作站**之专用标记,未经**睿乐组织**之允许不得使用。
|
||||
|
||||
[**瓷板上的方块音符**](https://gitee.com/TriM-Organization/Musicreater/raw/master/resources/msctIcon.png)之图案及相关动画、声音均为**音·创库**之专用标记,未经**睿乐组织**之允许不得使用。
|
||||
|
||||
### 图片、视讯与声像信息
|
||||
|
||||
若无特殊注明,一众本仓库内公开的图片、视频、影视、声音等媒体信息
|
||||
皆系本项目所用之连带软件
|
||||
禁止在本项目之外传播
|
||||
不允许独立发行、独立副本
|
||||
不允许未经允许的二次使用与创作
|
||||
不允许脱离于本项目而独立存在
|
||||
不得随任何其他非本项目之内的软件连带发布
|
||||
不得用于商业用途
|
||||
若本项目之源码被用于商业用途,应当将其从中剔除
|
||||
若无特殊注明,一众本仓库内公开的图片、视频、影视、声音等媒体信息
|
||||
皆系本项目所用之连带软件
|
||||
禁止在本项目之外传播
|
||||
不允许独立发行、拷贝副本
|
||||
不允许未经允许的二次使用与创作
|
||||
不允许脱离于本项目而独立存在
|
||||
不得随任何其他非本项目之内的软件连带发布
|
||||
不得用于商业用途
|
||||
若本项目之源码被用于商业用途,除必要出现的显示外,应当将上述资源从中剔除
|
||||
|
||||
2
run_cli.sh
Normal file
2
run_cli.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
source ./.venv/bin/activate
|
||||
python ./llc_cli.py
|
||||
@@ -130,7 +130,7 @@ class LingLunAuthorPageFrame(wx.Frame):
|
||||
self.m_bitmap1 = wx.StaticBitmap(
|
||||
self.eilles_pannel,
|
||||
wx.ID_ANY,
|
||||
wx.Bitmap(eilles_pic, wx.BITMAP_TYPE_ANY),
|
||||
wx.BitmapBundle(wx.Image(eilles_pic, wx.BITMAP_TYPE_ANY)),
|
||||
wx.DefaultPosition,
|
||||
wx.DefaultSize,
|
||||
0,
|
||||
@@ -183,7 +183,7 @@ class LingLunAuthorPageFrame(wx.Frame):
|
||||
|
||||
bSizer41 = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
bSizer41.Add((0, 0), 1, wx.EXPAND, 5)
|
||||
bSizer41.Add(wx.Size(0, 0), 1, wx.EXPAND, 5)
|
||||
|
||||
self.m_staticText211 = wx.StaticText(
|
||||
self.bgarray_pannel,
|
||||
|
||||
@@ -158,7 +158,7 @@ def check_update_release(
|
||||
version_renew_tip.format(
|
||||
app=appname, latest=version_content, current=version_now
|
||||
),
|
||||
code_content["release"]["release"]["description"],
|
||||
code_content["release"]["release"]["description"].replace("\r\n", "\n"),
|
||||
):
|
||||
return dict(
|
||||
[
|
||||
|
||||
@@ -25,7 +25,7 @@ class HTMLFrame(wx.Frame):
|
||||
tip_text,
|
||||
web_text,
|
||||
window_title: str = "新版本已发布",
|
||||
bg_colour: tuple = (0, 0, 0),
|
||||
bg_colour: tuple | wx.Colour = (0, 0, 0),
|
||||
window_size: tuple = (800, 480),
|
||||
):
|
||||
"""构造函数"""
|
||||
@@ -36,12 +36,12 @@ class HTMLFrame(wx.Frame):
|
||||
id=wx.ID_ANY,
|
||||
title=window_title,
|
||||
pos=wx.DefaultPosition,
|
||||
size=window_size,
|
||||
size=wx.Size(*window_size),
|
||||
style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL,
|
||||
)
|
||||
|
||||
# self.SetIcon(wx.Icon('', wx.BITMAP_TYPE_ICO))
|
||||
self.SetBackgroundColour(bg_colour)
|
||||
self.SetBackgroundColour(wx.Colour(bg_colour))
|
||||
self.Center()
|
||||
|
||||
self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)
|
||||
|
||||
@@ -11,16 +11,15 @@ Copyright © 2025 EillesWan
|
||||
Terms & Conditions: License.md in the root directory
|
||||
"""
|
||||
|
||||
import requests
|
||||
# import requests
|
||||
import zhDateTime
|
||||
import Musicreater
|
||||
|
||||
from .io import logger, prt
|
||||
from .io import logger
|
||||
|
||||
STANDARD_WHITE = (242, 244, 246)
|
||||
STANDART_BLACK = (18, 17, 16)
|
||||
|
||||
yanlun_fg_colour = STANDARD_WHITE
|
||||
yanlun_bg_colour = STANDART_BLACK
|
||||
|
||||
logger.info("获取 言·论 信息……")
|
||||
|
||||
@@ -40,18 +39,22 @@ elif solar_date == (8, 16):
|
||||
yanlun_texts = ["鱼旧梦 生日快乐~!", "Happy Birthday, ElapsingDreams~!"]
|
||||
|
||||
else:
|
||||
try:
|
||||
yanlun_texts = (
|
||||
requests.get(
|
||||
"https://nd.liteyuki.icu/api/v3/share/content/Xpue?path=null",
|
||||
)
|
||||
.text.strip("\n")
|
||||
.split("\n")
|
||||
)
|
||||
except (ConnectionError, requests.HTTPError, requests.RequestException) as E:
|
||||
logger.warning(f"读取言·论信息发生 互联网连接 错误:\n{E}")
|
||||
yanlun_texts = ["以梦想为驱使 创造属于自己的未来"]
|
||||
# noinspection PyBroadException
|
||||
except BaseException as E:
|
||||
logger.warning(f"读取言·论信息发生 未知 错误:\n{E}")
|
||||
yanlun_texts = ["灵光焕发 深艺献心"]
|
||||
|
||||
yanlun_texts = ["伶伦转换器 - 音·创{}".format(Musicreater.__version__), "Linglun Converter with Musicreater{}".format(Musicreater.__version__),]
|
||||
# try:
|
||||
# yanlun_texts = (
|
||||
# requests.get(
|
||||
# "https://nd.liteyuki.org/api/v3/share/content/Xpue?path=null",
|
||||
# )
|
||||
# .text.strip("\n")
|
||||
# .split("\n")
|
||||
# )
|
||||
# except (ConnectionError, requests.HTTPError, requests.RequestException) as E:
|
||||
# logger.warning(f"读取言·论信息发生 互联网连接 错误:\n{E}")
|
||||
# yanlun_texts = ["以梦想为驱使 创造属于自己的未来"]
|
||||
# # noinspection PyBroadException
|
||||
# except BaseException as E:
|
||||
# logger.warning(f"读取言·论信息发生 未知 错误:\n{E}")
|
||||
# yanlun_texts = ["灵光焕发 深艺献心"]
|
||||
|
||||
logger.info("已获取言·论 {} 条".format(len(yanlun_texts)))
|
||||
|
||||
Reference in New Issue
Block a user