tmxt
tmxt copied to clipboard
Writing different language to different files or chunks of file
Hi there,
Thanks for creating such a wonderful tool! I was wondering if it is possible to write to separate txt files based on language codes, or write them into different chunks of text (instead of \t separated)?
Best
Say if we have two languages (represented by a and b) Currently the output would be:
aaaaaa bbbbb
aaaaaa bbbbb
I was wondering if it's possible to write as"
aaaaa
aaaaa
bbbbb
bbbbb
You can do it easily with bash. For
aaaaa
aaaaa
bbbbb
bbbbb
you can simply do:
python tmxt.py --codelist=a,b file.a-b.tmx | tr '\t' '\n' >file.a-b.txt
Or for separated files:
python tmxt.py --codelist=a,b file.a-b.tmx | tee $(cut -f1 >file.a.txt) | cut -f2 >file.b.txt