Zim

Comment 24 for bug 333204

Revision history for this message
Worrier Poet (worrier-poet-deactivatedaccount) wrote : Re: [Bug 333204] Re: Support page templates in new page dialog

It's very kind of you to share this with the community. Thank you!

On 07/27/2012 09:13 AM, scholi wrote:
> I did'nt find an edit button. Small corrections:
> I forgot the "/" in the ROOT and you can add tail-n+5 insread of cat in order to remove the useless header of the file that you don't want to be pasted!
>
> #!/bin/bash
>
> DIALOG="Xdialog"
> ROOT="$2/Templates/"
>
> T="`ls $ROOT | awk '{print $0" "$0}'`"
> R=`$DIALOG --no-tags --menubox "Select a template" 20 50 10 $T 2>&1`
>
> tail -n+5 $ROOT$R >> $1
>