wiki:Documentation tips

Documentation tips

Change an URL in all files with Perl

For example this url "https://docs.kde.org/trunk5/en/kdeedu/marble/index.html" is not working anymore, we want to redirect to "https://marble.kde.org/" which is working.

Perl syntax is perl -pi -e 's/before/after/g' file

So we need to use that for several files:

  • English quickstart
  • English overview
  • translated quickstarts and overviews

To fix the url in English files, do the following :

perl -pi -e 's/docs\.kde\.org\/trunk5\/en\/kdeedu\/marble\/index.html/marble\.kde\.org/' doc/quickstart/*

perl -pi -e 's/docs\.kde\.org\/trunk5\/en\/kdeedu\/marble\/index.html/marble\.kde\.org/' doc/overview/*

For the translations do this:

perl -pi -e 's/docs\.kde\.org\/trunk5\/en\/kdeedu\/marble\/index.html/marble\.kde\.org/' locale/*/LC_MESSAGES/quickstart/*

perl -pi -e 's/docs\.kde\.org\/trunk5\/en\/kdeedu\/marble\/index.html/marble\.kde\.org/' locale/*/LC_MESSAGES/overview/*

Last modified 4 years ago Last modified on 04/13/21 14:06:39
Note: See TracWiki for help on using the wiki.