User:Nnino/Scripts

From The Document Foundation Wiki
Jump to: navigation, search

Collection of utilities and scripts around LibreOffice

QA

Converting list of fixed bugs to Wiki Markup

sed script (just put it in a file named SCRIPTFILE and execute cat list_of_fixes.txt | sed -f SCRIPTFILE):

s/fdo *# *\([0-9]\+\)/{{fdo|\1}}/g
s/\(i\|OOo *issue\) *# *\([0-9]\+\)/{{issue|\2}}/g
s/bnc *# *\([0-9]\+\)/{{bnc|\1}}/g
s/lp *# *\([0-9]\+\)/{{lp|\1}}/g
s/rhbz *# *\([0-9]\+\)/{{rhbz|\1}}/g
s/^\+ \(.*\)$/=== \1 ===/
s/^    . /* /

Launching LibO for testing

Preconditions:

  • libreoffice test version installed in parallel
  • the following symlinks and file names in my ~/bin directory:
nino@chef:~/bin$ ls -l l*
lrwxrwxrwx 1 nino nino   5 2011-07-18 21:21 libo -> libo3
lrwxrwxrwx 1 nino nino   6 2011-07-18 21:20 libo3 -> libo34
lrwxrwxrwx 1 nino nino   7 2011-07-18 21:20 libo34 -> libo341
lrwxrwxrwx 1 nino nino   8 2011-07-18 21:17 libo341 -> libo3413
lrwxrwxrwx 1 nino nino 110 2011-07-18 21:16 libo3413 -> /home/nino/Downloads/LibO_3.4.1rc3_Linux_x86_install-deb_en-US/DEBS/install/opt/libreoffice3.4/program/soffice
lrwxrwxrwx 1 nino nino 110 2011-07-18 21:13 libo3421 -> /home/nino/Downloads/LibO_3.4.2rc1_Linux_x86_install-deb_en-US/DEBS/install/opt/libreoffice3.4/program/soffice
lrwxrwxrwx 1 nino nino   8 2011-07-18 21:24 libo-test -> libo3421
lrwxrwxrwx 1 nino nino  11 2011-07-18 21:25 libotest -> libotest.sh
-rwxr-xr-x 1 nino nino 657 2011-07-18 21:31 libotest.sh

The sript libotest.sh:

#!/bin/bash
# 
# first launches kate for quick annotations 
# then launches LibreOffice test instance,  

SCRIPTNAME="`basename $0`"
PROTFILE=/home/nino/libolog
TIMESTAMP=`date +%Y-%m-%d_%H:%M:%S`
VERSION="`libo-test --version`"

echo -n "### $SCRIPTNAME: calling \"kate \$PROTFILE &\" ... "

( echo "$TIMESTAMP ######### STARTING $VERSION #########" >> $PROTFILE && \
kate $PROTFILE &) && echo "done" || echo "failed"

echo -n "### $SCRIPTNAME: calling \"/home/nino/bin/libo-test \$1 \$2 \$3 ...\" "
(/home/nino/bin/libo-test $1 $2 $3 &) && echo "done" || echo "failed"