This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Konlab's profile picture

Lattix - File Browser Remixed

Started by Konlab, 20 July 2019 - 09:17 AM
Konlab #1
Posted 20 July 2019 - 11:17 AM
Hey folks,
This program can browse files. Don't worry it's simple to use, just read this short post (2 mins if you skip the "Documentation" part)
Story?
A long time ago I created Lattice, a file browser inspired by irl file browsers that could provide functionality not accessible by basic shell operations. But I lost motivation, leaving an unfinished, sometimes unstable work in progress behind. (You can check it out here: http://www.computerc...rowser-lattice/ pls ignore my past over-ambitiousness)
And now I procrastinated my real life duties by indulging in the nostalgia of CC and wrote a file browser inspired by Lattice, but this time it should be way more stable. Some functions that were present in Lattice still didn't make it here, but possibly will in hypothetical future updates if I procrastinate more.
Enough talk, here is a screenie:

How to use it, short version:


More pics:

Main features:
  • All basic operations possible through shell included
  • The copy and move functionality is replaced by a clipboard - Copy/Cut files and folders and Paste them elsewhere
  • Awesome search function
  • Appeal to visual people - see your folders and check file sizes
  • Intuitive interface (once you get the menu buttons)
  • Four folders can be opened and browsed at the same time - in so called sessions
  • The file/folder clipboard is global. You can copy from one session and paste into another
  • File extension recognition (configurable)
  • Config at the beginning of the program for OS creators
If you wonder why the program looks so stable and unflickery, then it's CrazedProgrammer's work. He created the powerful Surface API that Lattix uses.
You can find it here: http://www.computerc...urface-api-162/
Lattix automatically loads it if it is installed in the root folder as "surface" (configurable, see the beginning of the file), or installs it if it isn't found. If it's loaded by an OS or a custom startup it goes along with it.
To download Lattix go here: https://pastebin.com/w9Z5v1pT
or run this command:

pastebin get BZ9RDzNL Lattix
Changelog ( + pastebin codes):
Spoilera0.3 BZ9RDzNL
Added a bunch of more text commands (yay for basic computers)
Fixed commands
Better pastebin and wget functions

a0.2 w9Z5v1pT
Added clipboard functionality (ctrl+v) to text dialogs
Added arrow key support and enter support
Refresh functionality fixed
Removed non-insert mode from text dialogs
a0.1.1 KaQ2E6Lv
hotfix
a0.1 084yUpng
Initial release
Documentation:
SpoilerCommands:

If you press letters when browsing files, you can see that you can enter commands into the bottom bar. This is the main way that you can interact with Lattix on Regular computers, and some users may prefer to use this on advanced computers as well. I have tried to make it as simple as possible, however a list of commands may prove useful. Not all commands are available at all times, some need some conditions to be true.
Arguments: {arg} - means that if the argument is not given Lattix will ask you to complete it
[arg] - means that this arg is neccessary, if not present then the command may fail or a different command with the same name but without this argument may run
[string:arg] - see above, but it has to be a string or number if it's [number:arg]

Commands available at all times
Spoilerrun {file} - runs {file} from the files listed

goto {string:path} - goes to folder chosen from the files listed or absolute path (alias: cd; if folder not listed, will auto try absolute path; you can force absolute path by adding a "/" at the beginning)

gotodir {path} - same as goto, but implemented differently

deselect - deselects

select - if no args present, it deselects

select 0 - also deselects

select [number:N] - selects the Nth element in the listing

select [string:name] - selects the item with name in the listing

count - displays how many items (dirs/files) are listed (alias: #)

up - goes to the parent folder (alias: ..)

root - goes to the root folder (alias: /)

quit - quits Lattix (aliases: exit, x)

back - goes back in history

switch - switches to the next session

switch [number:N] - switches to session N, where N is in the interval 1-4

help - to be honest just sends you here

findfile {wildcard} - same as menu -> find file (aliases: find, search)

version - displays lattix version (alias: about)

Commands available when browsing a folder (so you are not viewing search results)
Spoilernewdir {name} (alias mkdir)

paste - pastes file that has been copied/cut

pastebin {code} {filename}

wget {link} {filename}

If a folder is selected:
Spoileropen - opens selected folder

rename {new name} - renames selected folder to new name

copy - copies selected folder to clipboard (internal clipboard in lattix, not the pc one)

cut - copies selected folder to clipboard (internal clipboard in lattix, not the pc one). If it's pasted then the original is deleted

delete - deletes selected folder

If a file is selected:
Spoilerrename {new name} - renames selected file to new name

copy - copies selected file to clipboard (internal clipboard in lattix, not the pc one)

cut - copies selected file to clipboard (internal clipboard in lattix, not the pc one). If it's pasted then the original is deleted

delete - deletes selected file

Note: run has already been documented in the "always available" command list

Fixed bugs:
The text commands didn't work in a0.2, as EveryOS pointed out (thanks! :D/>). It was fixed in a0.3.

Known bugs:
Run w/ args doesn't work
If you find any bugs, report them and if I am able to reproduce/fix then you get your own spot in the credits section for your help. All of your feedback is much appreciated
Edited on 28 August 2019 - 01:44 PM
EveryOS #2
Posted 04 August 2019 - 02:21 AM

Just run a command

EDIT: you can probably fix it by moving the list of commands to above pressEnter, or by removing the local and then adding a local decleration at the top of the file.
Edited on 06 August 2019 - 05:30 PM
Konlab #3
Posted 28 August 2019 - 03:42 PM
<image>
Just run a command

EDIT: you can probably fix it by moving the list of commands to above pressEnter, or by removing the local and then adding a local decleration at the top of the file.

Thanks for pointing it out, fixed