refactor: 脚本及配置文件命名统一用 _ 分隔

将 .sh/.bat 脚本与 .js/.plist/.Dockerfile 等文件中以 - 分隔的文件名
改为 _ 分隔,dcloud-renew 目录改为 dcloud、script_nuance 目录改为
nuance,并同步更新脚本内部引用与 README 路径。

Co-Authored-By: AtomCode (deepseek-v4-flash) <noreply@atomgit.com>
This commit is contained in:
luk
2026-08-25 15:11:50 +08:00
parent 42ef5b87a6
commit 9742f6dab2
156 changed files with 15 additions and 101 deletions

84
nuance/tools/rem-token.pl Normal file
View File

@@ -0,0 +1,84 @@
#####################################################################################################################################
# Script to remove DM-related tokens that cause log not to load into OSI due to max nested levels.
# The SWIdmst and SWIphnd tokens will be replaced with SWIprst to print the relevant information
#####################################################################################################################################
#!/usr/bin/perl -w
use strict;
use Getopt::Long;
my ($help, $inputfile, $outputfile);
GetOptions ('-help' => \$help,
'-h' => \$help,
'-input=s' => \$inputfile,
'-output=s' => \$outputfile
);
if ($help) {
die("\nUsage: perl $0 [-help] -input <i/p file> -output <o/p file> \n"); }
if ($inputfile eq "" || $outputfile eq "" ) {
die("\nUsage: perl $0 [-help] -input <i/p file> -output <o/p file> \n"); }
open( INPUT_FILE, "< $inputfile" ) #open input file for reading;
or die( "Cannot open input file \"$inputfile\" : $!" );
open( OUTPUT_FILE, ">$outputfile" ) #open output file for writing;
or die( "Cannot open output file \"$outputfile\" : $!");
#my $type = "APNM";
#my $channum = "";
#my $orgchantext = "phone.-1.mps.-1.chan";
while ( my $string = <INPUT_FILE> ) {
chomp($string);
# my $outputstring = $string;
# Replace the Problematic SWIdmst and SWIdmnd with SWIprst to print the relevant information
if ( $string =~ m/SWIdmst/ || $string =~ m/SWIdmnd/
|| $string =~ m/SWIphst/ || $string =~ m/SWIphnd/
|| $string =~ m/SWIstst/ || $string =~ m/SWIstnd/) {
# print ("$string\n" );
# SWIdmst
if ( $string =~ m/SWIdmst/ ) {
$string =~ s/SWIdmst/SWIprst/;
$string =~ s/DMTP=/PRNM=<DMTP>/;
$string =~ s/DMNM=/PRTX=<DMNM>/;
print (OUTPUT_FILE "$string\n" );
}
# SWIphnd - use this instead of SWIdmnd since it has HYPO of DTMF
if ( $string =~ m/SWIphnd/ ) {
$string =~ s/SWIphnd/SWIprst/;
$string =~ s/TSTT=/PRNM=<TSTT>/;
$string =~ s/MODE=/PRTX=<MODE=/;
my ($pre, $mid) = split( /\|UCPU/ , $string);
my ($pre1, $pre2) = split( /MODE/ , $pre);
$pre2 =~ s/\|/\!/g;
my $newstring = $pre1."MODE".$pre2.">|UCPU".$mid;
# my $newstring = $pre.">|UCPU".$mid;
print (OUTPUT_FILE "$newstring\n" );
}
# SWIdmnd
# if ( $string =~ m/SWIdmnd/ ) {
# $string =~ s/SWIdmnd/SWIprst/;
# $string =~ s/TSTT=/PRNM=<TSTT>/;
# $string =~ s/TRTT=/PRTX=<TRTT>/;
# print (OUTPUT_FILE "$string\n" );
# }
}
else {
print (OUTPUT_FILE "$string\n" );
}
#endif
} #end of WHILE;
#close the Input and Output files;
close( INPUT_FILE )
or die( "Cannot close \"$inputfile\" : $!" );
close( OUTPUT_FILE )
or die( "Cannot close \"$outputfile\" : $!" );
print "COMPLETE\n\n\n\n";
#####################################################################################################################################