[kde-doc-english] Error replacing help:foo (local links) on doc.kde.org

Jack ostroffjh at sbcglobal.net
Fri Oct 24 16:25:18 UTC 2014


On 2014.10.24 12:13, Burkhard Lück wrote:
> Hi,
> 
> with Revision 1276619 I applied a patch from T.C. Hollingsworth to  
> generator
> script to replace local links with links to d.k.o
> 
> The expression we use is:
> 
>  sed -r -i "s|help:/*((kioslave/\|kcontrol/)?[A-Za-  
> z]+)/*|/?branch=$branch\&language=$lang\&application=\1\&path=|g"  
> *.html
> 
> But that does not work properly with underscores in names, e.g
> "help:/akonadi_sendlater_agent"
> is replaced with
> https://docs.kde.org/?branch=stable&language=en&application=akonadi&path=_sendlater_agent
> but it should be
> https://docs.kde.org/?branch=stable&language=en&application=akonadi_sendlater_agent
> 
> Anyone knows a solution, my regxexpr fu is really limited?

What about just adding an underscore to the part that recognizes the  
doc (change [A-Za-z] to [A-Za-z_]):

sed -r -i "s|help:/*((kioslave/\|kcontrol/)?[A-Za-  
z_]+)/*|/?branch=$branch\&language=$lang\&application=\1\&path=|g"  
*.html

However, the regexp looks like it should append "&path=" to that.  My  
change will make it append instead of inserting, but it's not clear to  
me where the path part should be, or if it is conditional on something  
else?

Jack


More information about the kde-doc-english mailing list