Omnimaga

Calculator Community => TI Calculators => Lua => Topic started by: cyanophycean314 on May 14, 2012, 09:31:03 pm

Title: Transferring Lua Projects from Calc to Computer [Solved]
Post by: cyanophycean314 on May 14, 2012, 09:31:03 pm
I've kinda asked about this before, but I never really found an easy way that works right now (notepad is in the future  :().

So what would be the easiest way to transfer a Lua project started on the Nspire to the computer?

P.S. I have TiLP and nspire_emu, no Student Software.

Edit: Solved! :D
Spoiler For "My (long) method":
Current method to put Lua file from Calc to Comp.
1. Install ndless.
2. Use TNS2XML by excale to turn TI-Notepad document into two .xml files. http://tiplanet.org/forum/viewtopic.php?t=9295&p=124483
3. Send the problem.xml to your computer.
4. Use http://bwns.be/jim/xml2lua.html to delete extra stuff.
5. Add newlines and check for correct code
6. Done! 
Title: Re: Transferring Lua Projects from Calc to Computer
Post by: Lionel Debroux on May 15, 2012, 01:09:21 am
What you'd like to do is to retrieve the Lua source for a TNS, right ?
Title: Re: Transferring Lua Projects from Calc to Computer
Post by: Jim Bauwens on May 15, 2012, 03:18:44 am
It's not the most easy thing to do if you don't have the student software. You need TI's code (for now) to unencrypt the document.
This can be in nspire_emu, the student software, or the online document player. If you are on windows/mac, try to see if you can copy your source with the online document player.
Title: Re: Transferring Lua Projects from Calc to Computer
Post by: Adriweb on May 15, 2012, 07:08:54 am
I think he meant from ocLua to a proper .lua file on the computer ?

Then just save the source inside a Notes app for example and grab the .tns from your computer.

Then you have several choices :
- simply use TINCS (which you don't have so I'm not gonna explain)
- load it onto nspire_emu and dump the memory
- post the .tns here so we can extract it for you :P
Title: Re: Transferring Lua Projects from Calc to Computer
Post by: Sebasu on May 15, 2012, 02:14:30 pm
if you don't have the ti-software, you can download the trial here:
http://education.ti.com/html/nspire/te.html
as you can see it is the teacher edition, it has 90 days trial, while the student soft has 30 days trial
a plus time to experiment
I hope this can help you
Title: Re: Transferring Lua Projects from Calc to Computer
Post by: cyanophycean314 on May 15, 2012, 05:14:38 pm
What you'd like to do is to retrieve the Lua source for a TNS, right ?

I have it typed up in a notes file on the calculator, which I can send around as a tns. I just want to get the source out of there.

It's not the most easy thing to do if you don't have the student software. You need TI's code (for now) to unencrypt the document.
This can be in nspire_emu, the student software, or the online document player. If you are on windows/mac, try to see if you can copy your source with the online document player.
The online document player is pretty cool! Except I still can't copy code out of there...

I think he meant from ocLua to a proper .lua file on the computer ?

Then just save the source inside a Notes app for example and grab the .tns from your computer.

Then you have several choices :
- simply use TINCS (which you don't have so I'm not gonna explain)
- load it onto nspire_emu and dump the memory
- post the .tns here so we can extract it for you :P
- :P
- How would you do that?
- That's a little inconvenient...

if you don't have the ti-software, you can download the trial here:
http://education.ti.com/html/nspire/te.html
as you can see it is the teacher edition, it has 90 days trial, while the student soft has 30 days trial
a plus time to experiment
I hope this can help you
I've already used that for a while, so I can't get trial software back again. I actually have the disk that came with the Nspire, but it's refusing to work.
Title: Re: Transferring Lua Projects from Calc to Computer
Post by: cyanophycean314 on May 17, 2012, 09:19:02 pm
*Bump*
Could somebody explain how to dump the nspire_emu memory?

Thanks
Title: Re: Transferring Lua Projects from Calc to Computer
Post by: Adriweb on May 18, 2012, 07:31:28 am
It's possible within the debug commands I think, but people like Lionel/goplat/Excale/Levak etc. could tell you more.
Title: Re: Transferring Lua Projects from Calc to Computer
Post by: Levak on May 18, 2012, 09:44:16 am
Here is the working scripted dumper for TI-Nspire basic 3.0.1
You'll need to wait a bit so  that I'll search for the other addresses (OS dependant)
http://ourl.ca/12404/246559
Title: Re: Transferring Lua Projects from Calc to Computer
Post by: Adriweb on May 18, 2012, 09:45:23 am
Well, what about TNS2XML

(oops I just leaked some info :P)

It should be posted soon tho



Edit : I don't know when, it's not fully ready.
(but I dont know since I'm not the author :P)
Title: Re: Transferring Lua Projects from Calc to Computer
Post by: cyanophycean314 on May 19, 2012, 09:45:53 am
Here is the working scripted dumper for TI-Nspire basic 3.0.1
You'll need to wait a bit so  that I'll search for the other addresses (OS dependant)
http://ourl.ca/12404/246559

Ok Thanks. So basically, all I do is put it in a bash file and then run it after I launch my document in nspire_emu?

Well, what about TNS2XML

(oops I just leaked some info :P)

It should be posted soon tho

Edit : I don't know when, it's not fully ready.
(but I dont know since I'm not the author :P)

Um ok. TNS2XML sounds interesting.
Title: Re: Transferring Lua Projects from Calc to Computer
Post by: Adriweb on May 19, 2012, 10:23:49 am
Here :)

http://tiplanet.org/forum/viewtopic.php?t=9295&p=124483


(You can follow the link at the bottom of the post)
Title: Re: Transferring Lua Projects from Calc to Computer
Post by: cyanophycean314 on May 19, 2012, 10:59:18 am
Thanks! That's pretty cool. So now I have the XML file on my computer, but the source is caught up in all sorts of nodes, leafs, words, and whatnot. Is there any easy way to clean up the XML just to get the source?
Title: Re: Transferring Lua Projects from Calc to Computer
Post by: Levak on May 19, 2012, 11:24:34 am
Thanks! That's pretty cool. So now I have the XML file on my computer, but the source is caught up in all sorts of nodes, leafs, words, and whatnot. Is there any easy way to clean up the XML just to get the source?
The link I gave talked about that two posts after :
http://ourl.ca/12404/246580

Title: Re: Transferring Lua Projects from Calc to Computer
Post by: cyanophycean314 on May 19, 2012, 12:04:47 pm
Thanks! That's pretty cool. So now I have the XML file on my computer, but the source is caught up in all sorts of nodes, leafs, words, and whatnot. Is there any easy way to clean up the XML just to get the source?
The link I gave talked about that two posts after :
http://ourl.ca/12404/246580

How exactly do you use that script then? Drag and drop? Terminal?
Title: Re: Transferring Lua Projects from Calc to Computer
Post by: Jim Bauwens on May 19, 2012, 01:32:59 pm
The code is for *nix systems, and I don't think you run that.
I quickly coded a web based version of it:
http://bwns.be/jim/xml2lua.html

Paste the xml code in it, and press the convert button.
It *should* work, but I haven't tested it properly so there might be a little bug somewhere.
Title: Re: Transferring Lua Projects from Calc to Computer
Post by: cyanophycean314 on May 19, 2012, 02:49:15 pm
Thanks, jim.  :D The only thing is that I have to add all the new lines, but that is much easier than eliminating everything else.
Btw, I dual-boot Ubuntu and Windows XP.

Current method to put Lua file from Calc to Comp.
1. Install ndless.
2. Use TNS2XML by excale to turn TI-Notepad document into two .xml files. http://tiplanet.org/forum/viewtopic.php?t=9295&p=124483 (http://tiplanet.org/forum/viewtopic.php?t=9295&p=124483)
3. Send the problem.xml to your computer.
4. Use http://bwns.be/jim/xml2lua.html (http://bwns.be/jim/xml2lua.html) to delete extra stuff.
5. Add newlines and check for correct code
6. Done!  :D

Edit: A few < and > were dropped off. And the sprite had \\ instead of \ in many places.
Title: Re: Transferring Lua Projects from Calc to Computer
Post by: Jim Bauwens on May 19, 2012, 04:09:09 pm
I'll see to improve it another time, need to study now :D
Title: Re: Transferring Lua Projects from Calc to Computer
Post by: Levak on May 19, 2012, 04:23:59 pm
Thanks, jim.  :D The only thing is that I have to add all the new lines,

I think that something else that notepad.exe will display those lines since notepad.exe wants \r\n for line breaks instead of \n only.
Title: Re: Transferring Lua Projects from Calc to Computer [Solved]
Post by: cyanophycean314 on July 04, 2012, 10:07:15 am
I'm having some problems with the XML file. It won't even display as before in Internet Explorer. Now the XML2Lua thing doesn't give me any output either.

The XML is attached for possible debugging.
Title: Re: Transferring Lua Projects from Calc to Computer [Solved]
Post by: Levak on July 04, 2012, 11:19:27 am
Browsers display only valid XML files. Open it with any text editor.
Title: Re: Transferring Lua Projects from Calc to Computer [Solved]
Post by: cyanophycean314 on July 04, 2012, 05:16:39 pm
Yes I have done that, but because Jim Bauwen's XML2Lua no longer will convert, I cannot get the source. I think the XML file is a bit weird because last time I could open the XML file with Internet Explorer and because it starts out with something weird.  ???

I have taken the time to hand type one of the sources into the computer, but for future contests and possibly bigger files, I'd still like a way to do it without TINCS.
Title: Re: Transferring Lua Projects from Calc to Computer [Solved]
Post by: Jonius7 on January 28, 2013, 10:07:32 pm
Necropost :O
What is TINCS?
Title: Re: Transferring Lua Projects from Calc to Computer [Solved]
Post by: Rhombicuboctahedron on January 28, 2013, 10:09:14 pm
Imma gonna guess ti nspire computer software
Title: Re: Transferring Lua Projects from Calc to Computer [Solved]
Post by: Jonius7 on January 28, 2013, 10:24:17 pm
Oh of course, then I'm going to have to look at this TNS2XML thing.

EDIT: tried the http://bwns.be/jim/xml2lua.html . Looks broken. I'm not getting any output text.
Title: Re: Transferring Lua Projects from Calc to Computer [Solved]
Post by: SpiroH on January 28, 2013, 11:06:22 pm
Oh of course, then I'm going to have to look at this TNS2XML thing.
You may as well have a look here: XML2TXT, XML2LUA, TXT2XML, LUA2XML and 2TNS  (http://ourl.ca/17020/316617)
Something I did some months ago (12Sep12). ;)