Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: hoffa on June 02, 2012, 05:16:10 pm

Title: Ndless Commander 0.4 -- TI-Nspire File Browser
Post by: hoffa on June 02, 2012, 05:16:10 pm
I'm dumping here one quick hack I put together one night for whoever who might find it interesting. It's called Ndless Commander (à la Midnight Commander), a Ndless file browser. Well actually browsing files and having a preview of the file is the only thing it can do, as I never really finished it (as said in the nSDL thread, I'm leaving soon so I won't have the time to take care of it myself). If anyone's up for the task, be my guest. You can basically venture into the dark abyss of your TI-Nspire's memory.

Screenshots, as usual:

(http://webgel.net/bf/nc1.png)

(http://i.imgur.com/I1cq0.png)

(http://i.imgur.com/x88FA.png)

Download's attached (TNS & source code). (oh and it uses nSDL for those who want to play around with the source)
Title: Re: Ndless Commander -- TI-Nspire File Browser
Post by: Jim Bauwens on June 02, 2012, 05:17:09 pm
Very nice!
Title: Re: Ndless Commander -- TI-Nspire File Browser
Post by: Adriweb on June 02, 2012, 05:19:27 pm
Indeed, thanks :D

The preview feature is awesome \o/
Title: Re: Ndless Commander -- TI-Nspire File Browser
Post by: Nick on June 02, 2012, 05:19:43 pm
hmm, those screenshots are from the nspire prototype? or does it work for every version? i'll try it soon :)
Title: Re: Ndless Commander -- TI-Nspire File Browser
Post by: hoffa on June 02, 2012, 05:21:53 pm
hmm, those screenshots are from the nspire prototype? or does it work for every version? i'll try it soon :)
Works on every version. You can access the TI-Nspire's root directory using the program, that's what's lurking there.
Title: Re: Ndless Commander -- TI-Nspire File Browser
Post by: TheNlightenedOne on June 02, 2012, 07:57:27 pm
There's CX compatibility right? (just double-checking)
Title: Re: Ndless Commander -- TI-Nspire File Browser
Post by: apcalc on June 02, 2012, 08:27:09 pm
Looks nice, can't wait to download! :)
Title: Re: Ndless Commander -- TI-Nspire File Browser
Post by: TheNlightenedOne on June 02, 2012, 09:23:47 pm
Bug: on a CX CAS, OS 3.1.0.392; went to /phoenix/syst/poweroff and got a reboot...

EDIT: Wait, maybe it's supposed to do that? idk
Title: Re: Ndless Commander -- TI-Nspire File Browser
Post by: hoffa on June 03, 2012, 05:22:45 am
Bug: on a CX CAS, OS 3.1.0.392; went to /phoenix/syst/poweroff and got a reboot...

EDIT: Wait, maybe it's supposed to do that? idk
Did you move the cursor on a certain file or did it reboot right after opening the directory?
Title: Re: Ndless Commander -- TI-Nspire File Browser
Post by: Adriweb on June 03, 2012, 06:57:31 am
Also a bug report, only on the /ndless/ folder tho (so far), when I go down the list of files, the list doenst follow (I mean, it doesnt scroll), so we don't see the cursos anymore, since it's offscreen.
Title: Re: Ndless Commander -- TI-Nspire File Browser
Post by: hoffa on June 03, 2012, 07:10:31 am
Also a bug report, only on the /ndless/ folder tho (so far), when I go down the list of files, the list doenst follow (I mean, it doesnt scroll), so we don't see the cursos anymore, since it's offscreen.
I didn't bother to implement scrolling because of lack of time. The code is very short and it shouldn't be that hard to implement however. As I mentioned up there, it's an unfinished work, and it's nowhere near being a fully functional file browser (and something I won't be updating myself).

(In other news, I wonder if the exammode/ folder could be altered somehow to modify the PTT mode...)
Title: Re: Ndless Commander -- TI-Nspire File Browser
Post by: Adriweb on June 03, 2012, 12:49:23 pm
OK :)
Too bad you won't be continuing..
Title: Re: Ndless Commander -- TI-Nspire File Browser
Post by: hoffa on June 06, 2012, 02:44:53 pm
Alrighty finished my French exam today (there's nothing I hate more than that, the French style dissertations are completely useless poetic babbling, pseudo-philosophy, write-as-much-as-you-can bullshit analysis on some oh-so-deep subject ("elaborate the similarity between universality and originality with close reference to [...]" and other crap like that), doesn't suit the Finnish mind; but enough of the rant, that's another matter) and decided to speedcode and improve whatever I could. Unfortunately fgetc() (and consequently, fgets() & co.) is buggy and so I couldn't finish writing the full screen file content viewer. Deleting folders worked well (assuming the folder was empty) but it for some reason did not let me remove any files except a few (themes.csv?) so I left that also out. So at the end I only implemented file list scrolling and used some quick hacks to get around the fgets() bug, so it shouldn't reboot anymore.

Screenshot as usual:
(http://i.imgur.com/I1cq0.png)
Title: Re: Ndless Commander -- TI-Nspire File Browser
Post by: hoffa on June 07, 2012, 08:58:14 am
New version. This one allows you to copy a file to your My Documents folder by pressing Tab. That means you can copy and files inside the drive to your computer and check them out there. (\exammode\syst\savedsettings.data, I'm looking at you)

(http://i.imgur.com/ilL3u.png)
Title: Re: Ndless Commander 0.4 -- TI-Nspire File Browser
Post by: hoffa on June 07, 2012, 10:02:09 am
Aaand, in less than an hour, another quick update. In the preview it showed some weird character at the end of every line, that's gone. I also removed the message box as it caused some weird behavior (or inconvenient) so I replaced it with a home-made message box. There's also some colors because everybody loves colors:

(http://i.imgur.com/x88FA.png)

Download in first post (I removed the older ones).

(Please don't behead me for the double post)
Title: Re: Ndless Commander 0.4 -- TI-Nspire File Browser
Post by: AzNg0d1030 on June 07, 2012, 08:12:29 pm
Lol you mean triple post.  Good job though :P
Title: Re: Ndless Commander 0.4 -- TI-Nspire File Browser
Post by: ajorians on June 23, 2013, 01:36:50 am
I found your program really useful!  I desired to delete some files that were created at the root (at '/' not '/documents') and I didn't know of a program that could delete them.  So I made a super quick modification to your program to accomplish such a thing.  And I tried to be very careful.  If I have time I'd like to add just a tad of UI like what you did when a file is copied; as well as fix any bugs related to the change.

I have the program ask the user if they are sure before deleting.  After I delete visible in My Documents view, such as a file in /documents/ , I still see it listed when I exit the program.  So I just press the On key and then go back into My Documents and it is gone as expected.

Below are the modified source files.  I figure that if somebody needs to use the delete functionality they probably know how to compile ndless programs.  Though if people want I'll upload the Nspire TNS file.

Have a great day!
Title: Re: Ndless Commander 0.4 -- TI-Nspire File Browser
Post by: excale on June 23, 2013, 06:18:16 am
Not that I want to advertise my program, but here is another way to achieve this: http://tiplanet.org/forum/viewtopic.php?t=9430 :)
Title: Re: Ndless Commander 0.4 -- TI-Nspire File Browser
Post by: ajorians on June 23, 2013, 08:19:34 am
Hi excale,

Actually thanks for sharing this!  I was looking for that and didn't know if it already existed.  I bet others (if not today, then some day in the future) will need it.

Have a great day!
Title: Re: Ndless Commander 0.4 -- TI-Nspire File Browser
Post by: AlexisVieira on June 23, 2013, 01:24:16 pm
Not that I want to advertise my program, but here is another way to achieve this: http://tiplanet.org/forum/viewtopic.php?t=9430 :)
btw, I think that rootdoc is great :)
Title: Re: Ndless Commander 0.4 -- TI-Nspire File Browser
Post by: lkj on June 29, 2013, 10:28:23 am
I have the program ask the user if they are sure before deleting.  After I delete visible in My Documents view, such as a file in /documents/ , I still see it listed when I exit the program.  So I just press the On key and then go back into My Documents and it is gone as expected.
There's a libndls function to refresh the document screen called refresh_osscr() ;)
Title: Re: Ndless Commander 0.4 -- TI-Nspire File Browser
Post by: Levak on July 10, 2013, 04:46:11 pm
There's a libndls function to refresh the document screen called refresh_osscr() ;)
Also notice that this function is time critical if the user has a lot of documents.
In other words, it is as slow as doing Home+2
Title: Re: Ndless Commander 0.4 -- TI-Nspire File Browser
Post by: CleanUser2020 on April 20, 2016, 11:39:39 am
.
Title: Re: Ndless Commander 0.4 -- TI-Nspire File Browser
Post by: SpiroH on April 29, 2016, 09:56:29 am
....
can we get the TNS. file ? ;)

Well, maybe  :-\

Procedure:
1. Download this ndless version that still works on windows: ndless-v3.6-beta-r990-sdk.zip
which i've just uploaded here: http://s000.tinyupload.com/index.php?file_id=13615468116496279843
Is a bit old but should be more than enough.

2. Go to this topic's first page and download 'nc0.4.zip' https://www.omnimaga.org/ti-nspire-projects/ndless-commander-0-4-ti-nspire-file-browser/msg304508/#msg304508

3. Install ndless sdk v3.6-beta, try to compile one or two samples, and later recompile nc to regenerate NC.tns It should be straightforward (if we have the very basics in programming)

4. If all goes well, your are just about ready to also (re)compile ajorians's files, making a project copy and replacing the files with the same name.

Let us know about your progress.
Good luck,  ;)



Title: Re: Ndless Commander 0.4 -- TI-Nspire File Browser
Post by: Vogtinator on April 29, 2016, 02:36:26 pm
Quote
1. Download this ndless version that still works on windows: ndless-v3.6-beta-r990-sdk.zip
which i've just uploaded here: http://s000.tinyupload.com/index.php?file_id=13615468116496279843

The latest SDK works on Windows just fine. There are no binaries though.
Title: Re: Ndless Commander 0.4 -- TI-Nspire File Browser
Post by: ajorians on May 01, 2016, 02:11:49 pm
Hey Jaroslav,

Yes!  I attached a .zip file containing the nc.prg.tns file that has the delete capability that I added (via the backspace key).  It is version 0.4 of Hoffa's Ndless Commander + my little addition.  I updated it to work with the latest NDless SDK (it was just a simple is_cx to has_colors replacement), and I updated the Makefile to use Genzehn.  Give it a try when you get a chance (of course be careful with deleting files).

Ikj: I didn't add the refresh_osscr() function call.  But I probably should; it would be nice.

By the way I am working on a TI-Nspire game as we speak (it is a puzzle game).  I have been busy this past year and was unable to create anything new; but I'm still here!  This will always be a hobby on mine! :)

Well have a great day!
Title: Re: Ndless Commander 0.4 -- TI-Nspire File Browser
Post by: Legimet on May 01, 2016, 09:14:18 pm
Please don't add refresh_osscr. It is really slow if you have a lot of documents.
Title: Re: Ndless Commander 0.4 -- TI-Nspire File Browser
Post by: lkj on May 02, 2016, 03:23:27 pm
It is very slow, but it's also quite confusing when changes are just not displayed until the OS calls refresh_osscr itself (I always forget about that :P). But yeah, it seems that there's more or less a consensus that the slowness is the more annoying of the two.

Nice to see that you're still around and doing Nspire programming ;)