Re: help with bash script to translate @ref{} items in translated manuals

2017-04-25 Thread Federico Bruni
Wait, I didn't give any input.. Now I've run: ./node.pl *.itely and it prints everything. Anyway I think I'll have to figure it out by myself with something I know how to use. Il giorno mar 25 apr 2017 alle 7:58, Federico Bruni ha scritto: Hi Andrew Thank you, but it

Re: help with bash script to translate @ref{} items in translated manuals

2017-04-24 Thread Federico Bruni
Hi Andrew Thank you, but it hangs forever and nothing happens. Il giorno sab 22 apr 2017 alle 5:37, Andrew Bernard ha scritto: Hi Federico, I believe you are trying to automate a set of translations, correct? If so, here's a way to do it in perl that avoids all

Re: help with bash script to translate @ref{} items in translated manuals

2017-04-22 Thread karl
Federico Bruni: > Il giorno ven 21 apr 2017 alle 7:08, Federico Bruni > ha scritto: > > I guess I'll have to revert to my almost manual replacement I've used > > so far. > > Or I may try a different approach and script a replacement from a file > like: > > @ref{Different

Re: help with bash script to translate @ref{} items in translated manuals

2017-04-21 Thread Andrew Bernard
Hi Federico, I believe you are trying to automate a set of translations, correct? If so, here's a way to do it in perl that avoids all the shell convolutions. I assume you do know perl. If not, always worth knowing for this sort of quick work. Just add the translations to the hash table in the

Re: help with bash script to translate @ref{} items in translated manuals

2017-04-21 Thread Flaming Hakama by Elaine
> From: Federico Bruni > To: Dev > Date: Thu, 20 Apr 2017 08:20:26 +0200 > Subject: help with bash script to translate @ref{} items in translated > manuals > Hi all > > I recently realized that @ref{} links should be translated otherwise PDF > links

Re: help with bash script to translate @ref{} items in translated manuals

2017-04-21 Thread Jean-Charles Malahieude
Le 21/04/2017 à 17:59, Federico Bruni a écrit : Il giorno ven 21 apr 2017 alle 15:54, k...@aspodata.se ha scritto: You already have such an replacement file in Documentation/po/it.po: $ fgrep -C2 'Different editions from one source' Documentation/po/it.po #. @node in

Re: help with bash script to translate @ref{} items in translated manuals

2017-04-21 Thread Federico Bruni
Il giorno ven 21 apr 2017 alle 15:54, k...@aspodata.se ha scritto: It is expecting something from stdin. You didn't tell us where the replacement data comes from, so I guessed you run your script as cat repl.txt | your_script Actually in my first attempt I thought I'd have entered the

Re: help with bash script to translate @ref{} items in translated manuals

2017-04-21 Thread Federico Bruni
Il giorno ven 21 apr 2017 alle 15:54, k...@aspodata.se ha scritto: Federico Bruni: Il giorno ven 21 apr 2017 alle 7:08, Federico Bruni ha scritto: > I guess I'll have to revert to my almost manual replacement I've used > so far. Or I may try a different approach

Re: help with bash script to translate @ref{} items in translated manuals

2017-04-21 Thread karl
Federico Bruni: > Il giorno ven 21 apr 2017 alle 7:08, Federico Bruni > ha scritto: > > I guess I'll have to revert to my almost manual replacement I've used > > so far. > > Or I may try a different approach and script a replacement from a file > like: > > @ref{Different

Re: help with bash script to translate @ref{} items in translated manuals

2017-04-21 Thread karl
Frederico Bruni: > Il giorno gio 20 apr 2017 alle 11:22, k...@aspodata.se ha scritto: > > Frederico Bruni: > > ... > >> Enter Documentation/it/notation and run this: > >> > >> #!/bin/bash > >> LIST="$(grep -oh -e @ref{.*} *.itely | sort -u)" > >> for i in $LIST; do > >> echo $i > >> #

Re: help with bash script to translate @ref{} items in translated manuals

2017-04-20 Thread Federico Bruni
Il giorno ven 21 apr 2017 alle 7:08, Federico Bruni ha scritto: I guess I'll have to revert to my almost manual replacement I've used so far. Or I may try a different approach and script a replacement from a file like: @ref{Different editions from one

Re: help with bash script to translate @ref{} items in translated manuals

2017-04-20 Thread Federico Bruni
Il giorno gio 20 apr 2017 alle 11:22, k...@aspodata.se ha scritto: Frederico Bruni: ... Enter Documentation/it/notation and run this: #!/bin/bash LIST="$(grep -oh -e @ref{.*} *.itely | sort -u)" for i in $LIST; do echo $i #echo -n "Replace" $i "with the translated node: " #

Re: help with bash script to translate @ref{} items in translated manuals

2017-04-20 Thread Andrew Bernard
Hi All, All good answers, but so much easier in perl! Andrew ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel

Re: help with bash script to translate @ref{} items in translated manuals

2017-04-20 Thread karl
Frederico Bruni: ... > Enter Documentation/it/notation and run this: > > #!/bin/bash > LIST="$(grep -oh -e @ref{.*} *.itely | sort -u)" > for i in $LIST; do > echo $i > #echo -n "Replace" $i "with the translated node: " > #read NODE > #if $NODE=""; then exit > #else > #

Re: help with bash script to translate @ref{} items in translated manuals

2017-04-20 Thread David Kastrup
Federico Bruni writes: > #!/bin/bash > LIST="$(grep -oh -e @ref{.*} *.itely | sort -u)" > for i in $LIST; do This splits $LIST at separators contained in the shell variable IFS . One can temporarily override it to just split on newlines, but it is more straightforward to