Your ROOT_URL in app.ini is https://scm.trinitydesktop.org/gitea/ but you are visiting https://scm.trinitydesktop.net/gitea/TDE/tdevelop/blame/commit/5af24c40137c80c4de65f63ce816f77ef8b7bea3/doc/tools/index-python You should set ROOT_URL correctly, otherwise the web may not work correctly.
tdevelop/doc/tools/index-python

48 lines
1001 B

#!/usr/bin/perl
use Getopt::Long;
my $prefix = '';
GetOptions( 'prefix=s' => \$prefix ) || die "Wrong options\n";
$file = $ARGV[0];
open(FILE, "$file") || die "File not found: $file\n";
print "<conceptindex>\n";
$ingroup = 0;
while (<FILE>) {
if (/\<dt\>\<a href=\'(.+)'\>(.+)\<\/a\>/) {
# print "Index: $1, $2, $ingroup\n";
if ($ingroup) {
$name = "$ingroup, $2";
} else {
$name = $2;
}
$url = "$prefix/$1";
print "<entry name=\"$name\" url=\"$url\"/>\n";
} elsif (/\<dt\>(.+)/) {
# print "Ingroup: $1\n";
$ingroup = $1;
} elsif (/\s+\<\/dl>/) {
$ingroup = 0;
}
}
print "</conceptindex>\n";
close(FILE);
sub dehtml
{
my ( $str ) = @_;
$str =~ s/\<CODE\>//g;
$str =~ s/\<\/CODE\>//g;
$str =~ s/\<TT\>//g;
$str =~ s/\<\/TT\>//g;
return $str;
}