VrrtepCLI

Started by Tirea Aean, May 22, 2011, 03:40:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Swoka Ikran

Quote from: Tirea Aean on May 23, 2011, 10:58:20 PM
I'm on windows now so I think while I'm here on this partition I will take care of the formatting issues on the windows version so the Readme, license and all are readable and not one,two, or three-liners. I hate that.
*nix line-endings and Windows don't play well together (have had to Wordpad the files several times to fix them), so not a bad idea...

Anyway, here's the latest: http://swokaikran.skxawng.lu/files/vcli_win.zip

The standalone and python versions are in the zip. There's probably bugs in it, but it works on both systems I tested on (both running WinXP SP3)

Changes:
* Installer/Uninstaller updated.
* Vrrtepcli.cmd updated: Looping function restored, headers updated.
* New path updater (pathtool.exe) to eliminate need for files in system32 (Irayo Kä'eng for the info on this!). Tested on WinXP ONLY. Probably lacks 64-bit support (I have no way to test).
* EXE recompiled
* Admin rights no longer needed for installation.
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!


 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Tirea Aean

#61
Cool. I'll get to testing this on win7. edit to come.

EDIT: it works(sorta). the standalone version, you have to simply open the cmd prompt and cd .vrrtepcli and then use vrrtepcli.cmd (I used tab-complete) and it works from there. after installing, it did not recognize vrrtepcli as a command so opening a cmd and typing vrrtepcli did not work. (Win 7)

now for non-standalone.

DOUBLE EDIT:

the python-using version is very nice. I downloaded Python, added it to my path, and installed vrrtepcli from the folder, opened up a cmd, and off it went. nice.

Swoka Ikran

Quote from: Tirea Aean on May 23, 2011, 11:13:54 PM
Cool. I'll get to testing this on win7. edit to come.

EDIT: it works. the standalone version, you have to simply open the cmd prompt and cd .vrrtepcli and then use vrrtepcli.cmd (I used tab-complete) and it works from there. after installing, it did not recognize vrrtepcli as a command so opening a cmd and typing vrrtepcli did not work. (Win 7)

now for non-standalone.
Did you see "Updating path...success" when you ran the installer? If not, then run the install as an admin.

Is your OS 64 bit?
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!


 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Tirea Aean

Quote from: Swoka Ikran on May 23, 2011, 11:24:57 PM
Quote from: Tirea Aean on May 23, 2011, 11:13:54 PM
Cool. I'll get to testing this on win7. edit to come.

EDIT: it works. the standalone version, you have to simply open the cmd prompt and cd .vrrtepcli and then use vrrtepcli.cmd (I used tab-complete) and it works from there. after installing, it did not recognize vrrtepcli as a command so opening a cmd and typing vrrtepcli did not work. (Win 7)

now for non-standalone.
Did you see "Updating path...success" when you ran the installer? If not, then run the install as an admin.

Is your OS 64 bit?

Yes, both times. though it hung for a whlle on the standalone version. is it supposed to do that? after the success message.

all my OS are 32 bit.

Swoka Ikran

#64
Quote from: Tirea Aean on May 23, 2011, 11:40:45 PM
Yes, both times. though it hung for a whlle on the standalone version. is it supposed to do that? after the success message.
No it should not. There's a system call to WM_SETTINGCHANGE after the ...success. It probably failed and had to time out. If that call fails, vrrtepCLI won't be recognized in your path until you log off or reboot.

Can you try installing the standalone again rutxe? Try this:
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!


 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Tirea Aean

Aye I have followed the test procedure you posted exactly.

Lo it still be a bug. :\

Swoka Ikran

#66
Quote from: Tirea Aean on May 24, 2011, 12:41:23 AM
Aye I have followed the test procedure you posted exactly.

Lo it still be a bug. :\
Weird. It works on 3 4 different XP systems for me. As for that lag after "success"...I installed the SA version on my main system (which has never had it installed before, I do the dev work in a VM)...it hung for ~20sec, but it installed properly and worked.

The standalone and Python version use the same installer (install.cmd and pathtool.exe are both identical). Since the installers are identical, I'd expect both versions to be equally broken. Yet the Python version works...

With standalone installed, can you open regedit and tell me the value of PATH, rutxe? Navigate to HKEY_CURRENT_USER\Environment. Double-click PATH in the list, and copy/paste its value here.

EDIT: Gonna hit the sack. It's 2:12am.
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!


 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Tirea Aean

#67
maybe it's something with Win 7. I'm in my linux partition as usual.. I'll reboot, do that stuff and get back. edit to come.

EDIT: Windows 7 has separate paths for system path and user path. before, my user path was ONLY C:\Python27. After installing the standalone, it has now become (copypasta):

C:\Users\Corey\.vrrtepcli;C:\Python27;

so it added it to my user's "PATH". the system "Path"is:

C:\Program Files\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\Windows Live\Shared;C:\Program Files\QuickTime\QTSystem\

DOUBLE EDIT: for sake of randomness, I decided to try opening a CMD and typing vrrtepcli. it worked. problem solved? I do believe.

TRIPLE EDIT: does this mean that

QuoteAnyway, here's the latest: http://swokaikran.skxawng.lu/files/vcli_win.zip
is good to go?

Swoka Ikran

Quote from: Tirea Aean on May 24, 2011, 10:02:41 AM
EDIT: Windows 7 has separate paths for system path and user path. before, my user path was ONLY C:\Python27. After installing the standalone, it has now become (copypasta):

C:\Users\Corey\.vrrtepcli;C:\Python27;
That's what it's supposed to do :) In the folder with Install.cmd, you can make it add the path manually if you want: Run pathtool /i to add the "%userprofile%\.vrrtepcli" to your user path, or pathtool /u to remove it. (un)install.cmd uses those 2 commands to do it.

Quote from: Tirea Aean on May 24, 2011, 10:02:41 AM
TRIPLE EDIT: does this mean that

QuoteAnyway, here's the latest: http://swokaikran.skxawng.lu/files/vcli_win.zip
is good to go?
Since it's working, it should be fine to publish that version :D

No clue if the installer will work on 64-bit OSes though (neither of us have one to test with...).
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!


 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Tirea Aean

righto. So I've done some testing earlier, and updated the files. I also made the files you need to read readable, as intended. it all checks out so far and has been uploaded to http://tirea.skxawng.lu/source

let the bug-reporting begin.

As that comes, I think I will FINALLY start on the prefix/suffix recognition code.

Swoka Ikran

Quote from: Tirea Aean on May 24, 2011, 07:57:35 PM
righto. So I've done some testing earlier, and updated the files. I also made the files you need to read readable, as intended. it all checks out so far and has been uploaded to http://tirea.skxawng.lu/source
Looks good to me :)
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!


 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Tirea Aean

Thanks for your help, Swoka Ikran, and all others who posted here with ideas and experiences. Much appreciation. :D

Swoka Ikran

Quote from: Tirea Aean on May 24, 2011, 08:13:27 PM
Thanks for your help, Swoka Ikran, and all others who posted here with ideas and experiences. Much appreciation. :D
You're welcome :)

Oh...just realized I got myself a palulukan. This is my 1000th post :D :D :D
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!


 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Tirea Aean

Quote from: Swoka Ikran on May 24, 2011, 08:26:01 PM
Quote from: Tirea Aean on May 24, 2011, 08:13:27 PM
Thanks for your help, Swoka Ikran, and all others who posted here with ideas and experiences. Much appreciation. :D
You're welcome :)

Oh...just realized I got myself a palulukan. This is my 1000th post :D :D :D

WOOOT! Seykxel sì nitram. :D :D

Swoka Ikran

Quote from: Tirea Aean on May 24, 2011, 08:29:48 PM
Quote from: Swoka Ikran on May 24, 2011, 08:26:01 PM
Quote from: Tirea Aean on May 24, 2011, 08:13:27 PM
Thanks for your help, Swoka Ikran, and all others who posted here with ideas and experiences. Much appreciation. :D
You're welcome :)

Oh...just realized I got myself a palulukan. This is my 1000th post :D :D :D

WOOOT! Seykxel sì nitram. :D :D
Irayo! :)
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!


 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Blue Elf

Kaltxì ma mesmukan,
thanks for this tool, I hope it helps me to learn better. I tried it just now to play scramble and encountered error - it occurs when I use "ans" reply in the game. Anyway - some help for the game should be good as I had to go into sources (and I don't know anything about Python ;D)
Attaching complete prompt output: my machine is WinXP 32bit, with Czech locale


C:\Documents and Settings\raszka>vrrtepcli -s

C:\Documents and Settings\raszka>echo off
Vrrtep CLI v1.9 by Tirea Aean. run 'vrrtepcli -h' for usage.
Windows version by Swoka Ikran
Standalone version

word: pue'n

vrrtep:> ans
pe'un
score: -1

word: xyte

vrrtep:> txey

Srane! >:D score: 0

Traceback (most recent call last):
  File "vrrtepcli.py", line 297, in <module>
  File "vrrtepcli.py", line 284, in main
  File "scramble.pyc", line 82, in game
  File "encodings\cp852.pyc", line 12, in encode
UnicodeEncodeError: 'charmap' codec can't encode character u'\xec' in position 9
: character maps to <undefined>

C:\Documents and Settings\raszka>vrrtepcli -s

C:\Documents and Settings\raszka>echo off
Vrrtep CLI v1.9 by Tirea Aean. run 'vrrtepcli -h' for usage.
Windows version by Swoka Ikran
Standalone version

word: fwle

vrrtep:> fwel

Srane! >:D score: 1

word: otuet

vrrtep:> tuteo

Srane! >:D score: 2

word: o'noxkg

vrrtep:> 'ongokx

Srane! >:D score: 3

word: ulxt'l

vrrtep:> txll'u

Srane! >:D score: 4

word: nnrgpguro

vrrtep:> ans
ngrrpongu
score: 3

Traceback (most recent call last):
  File "vrrtepcli.py", line 297, in <module>
  File "vrrtepcli.py", line 284, in main
  File "scramble.pyc", line 82, in game
  File "encodings\cp852.pyc", line 12, in encode
UnicodeEncodeError: 'charmap' codec can't encode character u'\xec' in position 6
: character maps to <undefined>

C:\Documents and Settings\raszka>

Rutxe, nilyìn tsat

even:
QuoteC:\Documents and Settings\raszka>vrrtepcli -l look

C:\Documents and Settings\raszka>echo off
Vrrtep CLI v1.9 by Tirea Aean. run 'vrrtepcli -h' for usage.
Windows version by Swoka Ikran
Standalone version

Query matches:
vtr. Traceback (most recent call last):
  File "vrrtepcli.py", line 297, in <module>
  File "vrrtepcli.py", line 272, in main
  File "encodings\cp852.pyc", line 12, in encode
UnicodeEncodeError: 'charmap' codec can't encode character u'\xec' in position 1
: character maps to <undefined>

C:\Documents and Settings\raszka>
Oe lu skxawng skxakep. Slä oe nerume mi.
"Oe tasyätxaw ulte koren za'u oehu" (Limonádový Joe)


Tirea Aean

#76
Quote from: Blue Elf on May 25, 2011, 06:45:13 AM
Kaltxì ma mesmukan,
thanks for this tool, I hope it helps me to learn better. I tried it just now to play scramble and encountered error - it occurs when I use "ans" reply in the game. Anyway - some help for the game should be good as I had to go into sources (and I don't know anything about Python ;D)
Attaching complete prompt output: my machine is WinXP 32bit, with Czech locale


I don't get this error. I downloaded the latest windows build and did a clean install. I typed the same commands as you and did not get any errors, it worked as it should. tested on both win xp 32 bit and win 7 32 bit.

You say you went into sources. did you change anything? if so, does it work and what did you do?

In other news, I found someone with 64 bit win 7. he said his PATH did get changed correctly, but he is still forced to use cd .vrrtepcli before running. apparently, he said he has another program in his PATH that the cmd doesnt recognize.

Swoka Ikran

Quote from: Blue Elf on May 25, 2011, 06:45:13 AM
Kaltxì ma mesmukan,
thanks for this tool, I hope it helps me to learn better. I tried it just now to play scramble and encountered error - it occurs when I use "ans" reply in the game. Anyway - some help for the game should be good as I had to go into sources (and I don't know anything about Python ;D)
Attaching complete prompt output: my machine is WinXP 32bit, with Czech locale


Traceback (most recent call last):
  File "vrrtepcli.py", line 297, in <module>
  File "vrrtepcli.py", line 284, in main
  File "scramble.pyc", line 82, in game
  File "encodings\cp852.pyc", line 12, in encode
UnicodeEncodeError: 'charmap' codec can't encode character u'\xec' in position 9
: character maps to <undefined>
That's a character set error. It's because you're using Czech Windows.

Fix: When you open the CMD, run chcp 437 in the CMD window before using vrrtepCLI.

I'll add codepage detection code to do this automatically in the next version...

Quote from: Tirea Aean on May 25, 2011, 09:35:46 AM
I don't get this error. I downloaded the latest windows build and did a clean install. I typed the same commands as you and did not get any errors, it worked as it should. tested on both win xp 32 bit and win 7 32 bit.
To reproduce the error on USA Windows: Run CHCP 852 to switch the CMD window to eastern european locale, then do vrrtepCLI -l look and watch it crash.

Quote from: Tirea Aean on May 25, 2011, 09:35:46 AM
In other news, I found someone with 64 bit win 7. he said his PATH did get changed correctly, but he is still forced to use cd .vrrtepcli before running. apparently, he said he has another program in his PATH that the cmd doesnt recognize.
Looks like user-path is just broken on 64-bit OSes...maybe add a note to docs indicating this?
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!


 
Avatray | NWOTD Sigbars | Sacred's Sigbar Tool | My collection of Avatar merchandise

Blue Elf

Thanks, it is better now, however I have problems with displaying and entering some characters. See the output:
word: ?pxaks -> this ? doesn't appears in console, but it should be ì

vrrtep:> ans
pxas?k -> again, ? is not displayed, but space
score: 0

word: vä'

vrrtep:> vä' -> although entered Alt+0228, evaluated as incorrect

Kehe. :\ score: -1

I'll try to set default locale to English, if it helps...

Some suggestions:
- is it possible to add some options to scramble game? First for: when user's reply  is correct, print also english meaning
Second for: when scrambled word is printed, print also english meaning  ?
- is it possible to add another game? Program prints word in English/Na'vi, player must enter that word translated. It would be very helpful, as other programs like SoL have limited numbers of lessons available (and this program operates on current dictionary!)

Many thanks to both of you, I like those simple, but useful tools
Oe lu skxawng skxakep. Slä oe nerume mi.
"Oe tasyätxaw ulte koren za'u oehu" (Limonádový Joe)


Tirea Aean

Quote from: Blue Elf on May 25, 2011, 03:20:57 PM
Thanks, it is better now, however I have problems with displaying and entering some characters. See the output:
word: ?pxaks -> this ? doesn't appears in console, but it should be ì

vrrtep:> ans
pxas?k -> again, ? is not displayed, but space
score: 0

word: vä'

vrrtep:> vä' -> although entered Alt+0228, evaluated as incorrect

Kehe. :\ score: -1

I'll try to set default locale to English, if it helps...

Some suggestions:
- is it possible to add some options to scramble game? First for: when user's reply  is correct, print also english meaning
Second for: when scrambled word is printed, print also english meaning  ?
- is it possible to add another game? Program prints word in English/Na'vi, player must enter that word translated. It would be very helpful, as other programs like SoL have limited numbers of lessons available (and this program operates on current dictionary!)

Many thanks to both of you, I like those simple, but useful tools


I'm not 100% sure what would be causing that issue. and this is ONLY for the scramble game? Linux had that problem before, but that was Python's fault and I fixed it. it was scrambling the components of ì and ä. (ì is actually \xc3\xac to python, two characters in one. and ä is \xc3\xa4)

as for the options, I can look into printing the local language translation of the currently scrambled word.

Actually, already, you are able to play the quiz game in both directions:
na'vi question, local language answers OR local language question, na'vi answers. you can play in any language. for example, try running:

(note that if you use the -l parameter with no language flag, -eng is the default)

vrrtepcli -l -q (english questions, na'vi answers)

vrrtepcli -de -q (na'vi questions, german answers)

this is all in the README