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.

Tirea Aean

Hello all. As you may know, I have been away for a while. While gone, I have been studying Python at the university for a class in computer science. I have also been messing with learning more about programming, and linux etc.

So today, I present to you all what I have been working on while I was gone: a way to keep my studies AND Na'vi fresh at the same time as using/learning mysql, python and bash, among other things.

VrrtepCLI: a Quick Multilingual Na'vi Dictionary Reference/Rhyming Dictionary/Scramble Game/Quiz Game For Linux/Mac AND Windows users.

Unfortunately, I know nothing about Windows CMD.exe and how to get it to play nice with UTF-8. That's why it's mac/linux only at this point.

more info, and screenshots at http://tirea.skxawng.lu/source
EDIT: Screenshots at my Gallery album

Now on GOOGLE CODE GitHub!
Users may download the current version on the downloads page.
Developers, PM me with your Google account address to become a member of the dev team.

SO... any Mac/Linux OR Windows users (especially 64 bit users of any OS) out there wanna provide feedback? Any Windows programmers out there who can help translate this into a more usable product for windows?

EDIT: STEPS TO DOWNLOAD, INSTALL, AND RUN:

Quote from: Tirea Aean on October 19, 2013, 01:54:32 PM
It works for me too. :)

Steps to make it work, from beginning:

1) Install Python 2.7.x from http://python.org/download
   a) make sure it installs to C:\Python27
2) Add Python to your Path
   a) (Windows key)+[Pause Break]
   b) Click Advanced System Settings on left sidebar
   c) Click [Environment Variables] button
   d) Click the first [Edit] button
   e) Click and add C:\Python27; to the Variable value box
   f) Click OK,OK,OK
3) Download VrrtepCLI Win from GitHub
4) Unzip VrrtepCLI
   a) Go to where the zip from step 3 downloaded
   b) right click on it and extract all, ok
5) Install VrrtepCLI
   a) double-click install.cmd (as administrator if you want to install for everyone)
   b) wait until it says you should close the cmd window
6) Run VrrtepCLI
   a) Click (Start) button
   b) type in cmd (or cmd.exe) then hit Enter
   c) a command prompt should pop up. (black screen with text, like the good old days)
   d) Pin this program to task bar (because it's so awesome and you want to easily access it)
   e) in the cmd prompt, type: vrrtepcli -v
   f) step 6e shows you current dictionary version. To update the dictionary, type vrrtepcli -u
   g) for more, read the README.txt file that came with the vrrtepcli download.

EDIT: Irayo! :D Glad you like it! For a much more challenging game, try -s (Scramble game) ;D

Swoka Ikran

#1
Nice! :) Been looking for something like this. Works great :D Irayo for this!

Since I run Windows, I've added basic UTF-8 support to it and converted the shell scripts to CMDs. :) If anyone wants it, I'll pack it up and post it.

On Windows, the -ipa option won't work, and support for translating Na'vi->non-English language isn't quite perfect, but it's otherwise completely usable.

EDIT: Fixed typo...
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

#2
Quote from: Swoka Ikran on May 22, 2011, 08:32:38 PM
Nice! :D Been looking for something like this. Works great :)

Since I run Windows, I've added basic UTF-8 support to it and converted all the shell scripts to CMDs. :) If anyone wants it, I'll pack it up and post it.

On Windows, the -ipa option won't work, and support for translating Na'vi->non-English language isn't quite perfect, but it's otherwise completely usable.

I was hoping you would come along! PLEASE DO send me that (as well as instructions to get utf8 on cmd) so I can add it to my site and credit you. Thank you SO much man! :D +1

Tìsung: How did you like the games?

Swoka Ikran

Here's my converted version: http://swokaikran.skxawng.lu/files/vrrtepcli_win.zip Ready to use, but untested (except on the dev system). Probably won't work on Vista/7 without running CMD as an Administrator. Unpack, run install.cmd. Then, in CMD: cd "%userprofile%\.vrrtepcli" to switch to its folder, then use it exactly like the linux version. The updater even works!

As for UTF-8...the trick to getting UTF-8 to display in CMD is to...actually output UTF-8 to CMD. Your version was putting out plain ASCII.

The easy way to support UTF-8: When you type a PRINT command, think if the variable being printed could possibly have a Na'vi or other non-English word in it. If it can, use PRINT unicode(variable, "utf-8") instead of PRINT variable.

Much of what I did was done the "easy way". The only exception is vrrtepcli.py, where I added the unicode()'s inside of loctrans()...
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

Oh. see it outputs ì and ä, and whatever else IPA stuff on bash without a problem. This is because (as far as I know) because of the # -*- coding: utf-8 -*- at the top of the file. anyway, thanks for that. ;D

Swoka Ikran

Quote from: Tirea Aean on May 22, 2011, 09:41:41 PM
Oh. see it outputs ì and ä, and whatever else IPA stuff on bash without a problem. This is because (as far as I know) because of the # -*- coding: utf-8 -*- at the top of the file. anyway, thanks for that. ;D
You're welcome :)
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

I updated the version on the site. try it out.

http://tirea.skxawng.lu/source

ALso, I hereby(if it wasnt already implied) declare this thread a place to report bugs. :D

Swoka Ikran

Quote from: Tirea Aean on May 22, 2011, 10:46:58 PM
I updated the version on the site. try it out.

http://tirea.skxawng.lu/source
Latest works fine on dev, waiting for Python to install in another VM to test a second time...
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

I'm gonna test this on my XP machine. I developed this program largely on my infamous Eee (Ubuntu natty)

Swoka Ikran

Testing finished:

Works, but you need to add Python to your path manually...2.7's installer won't do it for you. :(
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 22, 2011, 11:07:02 PM
Testing finished:

Works, but you need to add Python to your path manually...2.7's installer won't do it for you. :(

How does one do that?

Quote from: tcatipax on May 22, 2011, 11:08:08 PM
You could use Savannah for hosting (bug tracking, revision control, file hosting etc)

I'll check that out. :)

Swoka Ikran

#11
Quote from: Tirea Aean on May 22, 2011, 11:10:36 PM
Quote from: Swoka Ikran on May 22, 2011, 11:07:02 PM
Testing finished:

Works, but you need to add Python to your path manually...2.7's installer won't do it for you. :(

How does one do that?
On Windows XP:
* Control Panel->System Properties->Advanced Tab->Environment Variables.
* Find Path in the bottom list, click Edit. Add ;C:\python27 to the end of what's already there.
* Click OK all the way out.
* Close any open CMDs and open a new one.

I'm looking into ways to make adding it to the path easier (and a way to possibly do away with the need for a python install completely...)
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

#12
sure.

Okay, actually so before you posted that, I found out how to do it, and I got it to run. Still, the IPA fails in Windows where it works on bash. at least now it shows ä and ì where it didn't before.

Further testing reveals that the unicode does not work on windows in the modules ie rhyme, quiz, and scramble. looks like a job for the unicode() function...

Swoka Ikran

#13
Quote from: Tirea Aean on May 22, 2011, 11:25:51 PM
Further testing reveals that the unicode does not work on windows in the modules ie rhyme, quiz, and scramble. looks like a job for the unicode() function...
I thought I fixed all those modules, but they aren't working for me now either  :-\

I'll take a look at it.

EDIT: Fixed them...had unicode() work overtime ;D Fixed version coming soon. Also got it to compile into a native EXE...can you say "Python NOT required"? :)
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

what??

Please do say how you did that? also, how is the IPA not screwed now?

Swoka Ikran

#15
Quote from: Tirea Aean on May 22, 2011, 11:51:53 PM
how is the IPA not screwed now?
It's still broken. The IPA issue doesn't appear correctable AFAIK. If I make the required unicode() change, Python crashes. Not sure why, but it has something to do with the actual IPA data itself...

Here's your 1.8 with the Scramble/Quiz/Rhyme modules fixed: http://swokaikran.skxawng.lu/files/vrrtepcli_win_modfix.zip

Quote from: Tirea Aean on May 22, 2011, 11:51:53 PM
Please do say how you did that?
Look up Py2EXE. :) It turns the program into an EXE and several support files.

Here's the above fixed version compiled with Py2EXE. Functionally identical to above, but doesn't need a Python installation. Install and use like the regular version: http://swokaikran.skxawng.lu/files/vcli_nopython.zip

EDIT: @TA: If you downloaded the above files, download them again, rutxe. I uploaded the wrong version... :-[ (Sorry, almost 2am...and I've been up since 8am...)
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

ah sweet! Nìmun irayo. though the IPA is shot on windows, I guess that's not a super HUGE deal considering most people around here never read the IPA in the actual dictionary. and also, even less people read it and perfect their pronunciation skills for the sake of actually speaking to other people. it's all writing these days I guess.

Swoka Ikran

Quote from: Tirea Aean on May 23, 2011, 12:38:12 AM
ah sweet! Nìmun irayo. though the IPA is shot on windows, I guess that's not a super HUGE deal considering most people around here never read the IPA in the actual dictionary. and also, even less people read it and perfect their pronunciation skills for the sake of actually speaking to other people. it's all writing these days I guess.
You're welcome. As for writing, sran, a lot of us nulnew pamrel sivi nìNa'vi, ulte ke plltxe nìNa'vi...

Also, be sure to note the edit to my last post. I had to reupload them...my first upload was a debug version that was missing a fix in the <infix> code...
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

#18
I noticed a "demoncli" file. what is that?

EDIT: it's an exe. but when I run it, it flashes a terminal super fast. before installing, it asked where meta and local are. that means running that exe file ran the vrrtepcli.py file. but in doing so, cmd kinda just openclosed. weird.

Swoka Ikran

Quote from: Tirea Aean on May 23, 2011, 12:47:07 AM
I noticed a "demoncli" file. what is that?
That's the vrrtepcli.py compiled to an EXE...I had to rename it.

On Windows, if there's a CMD and an EXE with the same name in the same folder (e.g. vrrtepcli.cmd and vrrtepcli.exe), the EXE takes priority and the CMD is ignored.

Since there is a vrrtepcli.cmd (the Windows equivalent of vrrtepcli.sh), I could not name the EXE vrrtepcli.exe. If I did, the updater and help would be broken.

I'm gonna go get some sleep now...if you find any more bugs, let me know and I'll fix them in the morning. :)
2010 was the year of the Na'vi.Vivar 'ivong Na'vi!


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