Author Topic: TIConvert  (Read 12722 times)

0 Members and 1 Guest are viewing this topic.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
TIConvert
« on: February 24, 2011, 07:47:53 pm »
EDIT:
This project has been renamed to Croquette:
Visit http://ourl.ca/12272 instead for the latest updates.

You can download the latest versions at https://code.google.com/p/croquette/p/



I made a python script that turns an Axe source file (8xp) into a text file!  It can add indenting and everything!

Later, I want to try and enhance it so it can convert TI-Basic to text, and text to either TI-Basic or Axe (although it wouldn't probably be able to compile).

...

It's a command-line sort of thing, and it's sort of redundant given Tokens and Runer's mod, but I always wanted to make one.

Also, does anybody know if it's possible in any way to turn a Python 3.2 script into an executable?

Edit:
The attached doesn't even work, so I'm going to remove it before more people download.
« Last Edit: August 01, 2011, 02:41:19 pm by Michael_Lee »
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline ruler501

  • Meep
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2475
  • Rating: +66/-9
  • Crazy Programmer
    • View Profile
Re: TIConvert
« Reply #1 on: February 24, 2011, 10:08:51 pm »
yes it is but it would be easier if you could convert it into a python 2.6 script. That way py2exe could run on it
« Last Edit: February 24, 2011, 10:09:04 pm by ruler501 »
I currently don't do much, but I am a developer for a game you should totally try out called AssaultCube Reloaded download here https://assaultcuber.codeplex.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: TIConvert
« Reply #2 on: February 24, 2011, 10:40:49 pm »
Yeah, it was only after I was about halfway done that I learned that Python 3.X has compatibility issues.  I'll probably start converting it tomorrow.
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: TIConvert
« Reply #3 on: February 24, 2011, 10:46:26 pm »
Interesting, I don't have Python installed so I can't try it now but I will probably try it later.

What features does it have that most other softwares don't, by the way?

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: TIConvert
« Reply #4 on: February 24, 2011, 11:02:43 pm »
Well, the main thing is that it automatically adds indents to the code.  It's always irritated me that no other program did that for me (at least, I think) because I find it really helpful for understanding my code. 
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: TIConvert
« Reply #5 on: February 24, 2011, 11:05:27 pm »
I think SourceCoder does, but I do not remember if it does Axe token conversion yet. Also some people might like an offline program from time to time (no internet access at home and such things)

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: TIConvert
« Reply #6 on: February 24, 2011, 11:05:36 pm »
This sounds pretty cool.  I like the auto indent idea. :D Nice job! ;D

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: TIConvert
« Reply #7 on: February 25, 2011, 12:46:00 pm »
I just realized that I uploaded an incorrect version - I had set it up to detokenize a certain file automatically for testing purposes and forgot to change it back.

So to the one person who downloaded this, here's a fix.
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: TIConvert
« Reply #8 on: February 25, 2011, 12:50:05 pm »
Wa-a-a-i-i-i-t? Does this read Assembly Axe programs and turns them to .txt? Or is it Axe Source Files?

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: TIConvert
« Reply #9 on: February 25, 2011, 12:57:56 pm »
It reads Axe source files and turns it into .txt

And I also discovered a bunch of minor bugs, so it might not function as expected.  (Fixing time!)
I should have tested more, I guess.
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: TIConvert
« Reply #10 on: February 25, 2011, 01:14:00 pm »
It reads Axe source files and turns it into .txt

And I also discovered a bunch of minor bugs, so it might not function as expected.  (Fixing time!)
I should have tested more, I guess.


It'd be awesome otherwise, but still nice. I use Tokens for this matter.
* Scout <3 TokenIDE.
« Last Edit: February 25, 2011, 03:35:59 pm by squidgetx »

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: TIConvert
« Reply #11 on: February 25, 2011, 01:16:49 pm »
nice :D Its cool that we have an offline version that can do this for us ^^ Might there be a way to turn off indenting?  Some people might not like it, its always good to have options ^^

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: TIConvert
« Reply #12 on: February 25, 2011, 01:27:02 pm »
Indenting is off by default.  (I was learning about command line options, and threw in a bunch to practice :))

And @Scout:
Yeah, it would be pretty cool if this could disassemble assembly into Axe.  But I'd have to learn assembly first  ;D
« Last Edit: February 25, 2011, 01:27:24 pm by Michael_Lee »
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: TIConvert
« Reply #13 on: February 25, 2011, 03:01:00 pm »
Indenting is off by default.  (I was learning about command line options, and threw in a bunch to practice :))

And @Scout:
Yeah, it would be pretty cool if this could disassemble assembly into Axe.  But I'd have to learn assembly first  ;D

I think only Quigibo could do it, in fact, I think it'd be really really hard, I'd say impossible.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: TIConvert
« Reply #14 on: February 26, 2011, 12:52:43 pm »
*Sigh*

After much consternation and experimentation, I finally managed to turn it into an exe.

I tested this on two other computers, so I think it should work, at least on Windows computers (although the included batch file failed to run on my admittedly antiquated XP laptop).

I fixed some issues with ElseIf and ReturnIf, and rewrote the parsing part because I didn't like my older design.
« Last Edit: February 26, 2011, 12:55:38 pm by Michael_Lee »
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.