引入第三方插件

This commit is contained in:
WindyMadman 2023-07-07 15:44:55 +00:00
parent ca04391615
commit bd52232131
5 changed files with 32 additions and 1 deletions

4
.gitignore vendored
View File

@ -10,4 +10,6 @@ package-lock.json
Dockerfile.*
.DS_Store
config.log
autobackup.json
autobackup.json
lib/LANraragi/Plugin/Scripts/ETagConverter.pm
lib/LANraragi/Plugin/Metadata/ETagCN.pm

6
.gitmodules vendored
View File

@ -1,3 +1,9 @@
[submodule "tools/build/windows/Karen"]
path = tools/build/windows/Karen
url = https://github.com/WindyCloudCute/Karen
[submodule "customize/ETagConverter"]
path = customize/ETagConverter
url = https://github.com/zhy201810576/ETagConverter
[submodule "customize/ETagCN"]
path = customize/ETagCN
url = https://github.com/zhy201810576/ETagCN

1
customize/ETagCN Submodule

@ -0,0 +1 @@
Subproject commit a5c447309c6b847778af5ebd566ed6c32c1e552c

@ -0,0 +1 @@
Subproject commit fc9f97ae8ce9982b8f2365e092ccdf4a82524f16

View File

@ -7,6 +7,7 @@ use open ':std', ':encoding(UTF-8)';
use Cwd;
use Config;
use utf8;
use File::Copy;
use feature qw(say);
use File::Path qw(make_path);
@ -187,6 +188,14 @@ if ( $front || $full ) {
}
#install Customize Plugin ETagCN
cp_customize_plugin("/customize/ETagCN/ETagCN.pm","/lib/LANraragi/Plugin/Metadata/ETagCN.pm","ETagCN");
#install Customize Plugin ETagConverter
cp_customize_plugin("/customize/ETagConverter/ETagConverter.pm","/lib/LANraragi/Plugin/Scripts/ETagConverter.pm","ETagConverter");
#Done!
say("\r\n一切就绪您可以通过输入以下命令来启动 LANraragi: \r\n");
say(" ╭─────────────────────────────────────╮");
@ -228,3 +237,15 @@ sub install_package {
say("$package 包已安装,继续...");
}
}
sub cp_customize_plugin {
my ( $plugin_file, $plugin_path ,$plugin_name) = @_;
$plugin_file = getcwd . $plugin_file;
$plugin_path = getcwd . $plugin_path;
say("\r\n安装插件: $plugin_name \r\n");
say("\r\n正在复制 $plugin_file \r\n to $plugin_path");
copy($plugin_file,$plugin_path) or die "将 $plugin_file 复制到 $plugin_path 失败\n";
}