How to transfer Telewriter files?

A place to discuss everything Dragon related that doesn't fall into the other categories.
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: How to transfer Telewriter files?

Post by sixxie »

Slightly baffling - 53 is the SDL scancode that backtick generates on my (US-UNIX) keyboard. I'd have assumed that acted as CLEAR... Will have to do more experiments.
User avatar
snarkhunter
Posts: 241
Joined: Fri Apr 03, 2009 7:16 pm
Location: France

Re: How to transfer Telewriter files?

Post by snarkhunter »

My keyboard is an AZERTY one and I use a MS-DOS system (WIN 10 at work, XP Home... at home!).
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: How to transfer Telewriter files?

Post by sixxie »

Yeah but it generates a specific scancode that my SDL code checks and really should be mapping to CLEAR :) Harumph! Once working day is over I'll experiment with munging my keymap and see what happens.
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: How to transfer Telewriter files?

Post by sixxie »

So I set my own keyboard map to French, and ran with -debug-ui -1 -keymap fr -kbd-translate. I get this:

Code: Select all

sdl.key press   scan= 53   sym=000000b2   mod=0000   unicode=00b2   name=²
sdl.key release scan= 53   sym=000000b2   mod=0000   unicode=0000   name=²
And pressing the '²' key clears the screen. I'm completely at a loss for why it should not do so for you!
User avatar
snarkhunter
Posts: 241
Joined: Fri Apr 03, 2009 7:16 pm
Location: France

Re: How to transfer Telewriter files?

Post by snarkhunter »

... But it does! (at least under Dragon DOS) I've just tried once more to make sure)

Does this mean there are no changes needed and I may try the same under TW?
I will have a go right now.
User avatar
snarkhunter
Posts: 241
Joined: Fri Apr 03, 2009 7:16 pm
Location: France

Re: How to transfer Telewriter files?

Post by snarkhunter »

... Ok, using the following shortcut command:

C:\Users\ldepeux\Downloads\Dragon\XROAR64\xroar.exe -machine dragon32 -keymap fr -kbd-translate -lp-file XRoar-prtout.txt


I could get a loaded TW document printed as "prtout.txt" in the same folder as the XRoar executable.
The only thing that is annoying now is the fact there are several CR sent out between each line of TW text (I counted 9 of those), which makes rather lonnnnnng documents!

Maybe there is a trick to manage this, but thank you so much already, Ciaran, for your amazing help! (as always)

Lionel
User avatar
snarkhunter
Posts: 241
Joined: Fri Apr 03, 2009 7:16 pm
Location: France

Re: How to transfer Telewriter files?

Post by snarkhunter »

Hello Ciaran,

Sorry about bothering you again about this, but would you by any chance have an idea and/or a solution to the issue I explained last time (when transfering Telewriter - disk version - files to PC text files)? Every line of text is followed by at least 9 CR codes, which would take a huge time if I was to manually remove them?

… Asking just in case, and thank you very much in advance for any help you might be able to provide here.
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: How to transfer Telewriter files?

Post by sixxie »

snarkhunter wrote: Thu Nov 05, 2020 3:54 pm
Sorry about bothering you again about this, but would you by any chance have an idea and/or a solution to the issue I explained last time (when transfering Telewriter - disk version - files to PC text files)? Every line of text is followed by at least 9 CR codes, which would take a huge time if I was to manually remove them?
You could try the following little awk command:

Code: Select all

awk '{ print; print ""; }' RS="" filename
"" is a special record separator value that means any run of newlines, so that will print each "record" (up to a newline) followed by a single extra newline. Just redirect the output into a new file.
User avatar
snarkhunter
Posts: 241
Joined: Fri Apr 03, 2009 7:16 pm
Location: France

Re: How to transfer Telewriter files?

Post by snarkhunter »

Thank you very much for this tip, Ciaraan. I had never heard about that AWK command, so I will have to try it and see what result I'll be getting. I will let you know when I'm done.
sixxie
Posts: 1346
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: How to transfer Telewriter files?

Post by sixxie »

Awk's great - Perl kinda swallowed most of its use cases, but the way it matches stuff still often makes it the simpler tool for a job. Generally Unix tool, but I gather that these days Windows gets all the basic Unix stuff.
Post Reply