[Koha-bugs] [Bug 18817] Screenshots not appearing in the manual linked to the Help tab
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Aug 14 21:28:45 CEST 2017
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18817
--- Comment #14 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Automatic replacement has been done with:
use Modern::Perl;
use File::Slurp;
# examplelistemail:18_miscellaneous.html#example-email-from-list
my $mappings;
for my $line ( split "\n", read_file('mappings.txt') ) {
chomp $line;
next unless $line;
my ( $old_anchor, $link ) = split ':', $line;
$mappings->{$old_anchor} = $link;
}
my @files = `git grep -l manual.koha-community.org`;
for my $file ( @files ) {
chomp $file;
next if $file =~ 'misc/release_notes'; # FIXME What do we do with release
notes?
say $file;
my $content = read_file( $file );
my @content;
for my $line ( split "\n", $content ) {
chomp $line;
# http://manual.koha-community.org/[% helpVersion %]/en/aboutkoha.html
if ( $line =~ m|manual.koha-community.org/\[% helpVersion
%\]/en/.*\.html#([^"]+)"| ) {
my $old_anchor = $1;
if ( exists $mappings->{$old_anchor} ) {
my $new_anchor = $mappings->{$old_anchor};
$line =~ s|manual.koha-community.org/\[% helpVersion
%\]/en/[^"]+"|koha-community.org/manual/[% helpVersion %]/html/$new_anchor"|g;
} else {
warn "$old_anchor DOES NOT HAVE A MAPPING";
}
}
push @content, $line;
}
write_file( $file, join( "\n", @content ) . "\n" );
}
Just for the record.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list