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

[1.3] Midcraft Commander 0.5.0.3 - An Orthodox File Manager

Started by MewK, 19 February 2012 - 08:50 PM
MewK #1
Posted 19 February 2012 - 09:50 PM
Midcraft Commander

Created by:
MewK

Version:
0.5.0.3

Description

An orthodox file manager for CraftOS. Inspired by GNU Midnight Commander.

Features:
  • GUI:
    • Scalable
    • Two file system panels
    • Scrolling lists
    • Proper handling for long filenames
  • Functions:
    • Copy, cut, paste & rename for files and directories
    • Run & edit for files/programs
    • New folder & new empty file functions
    • Format for folders and discs
    • Lists, plays & stops music discs
    • Extended file info
  • Usability:
    • Multi-select files & folders (use Space key)
    • Menu/Sub-menu structure (use Ctrl key)
    • Integrated shell (use Tab key)
    • Menu shortcuts (use Ctrl key + shortcut key)
      • r - Run…
      • e - Edit
      • c - Copy
      • x - Cut
      • v - Paste
      • d - Delete
      • f - Format
      • i - Info
    • Path-sesitive file handling
      • Opens files in /rom/help with help viewer (customizable)
      • Opens files in /rom/api whit editor (customizable)
      • All other files are passed to shell.run
  • Config file:
    • Customize editor path
    • Customize help viewer path
    • Set the filetype for specific folders to change the start action
      • 1 - program file
      • 2 - text file
      • 4 - help file
If you have any feedback please post it below.

Especially if you have bug reports and ideas for new features!


Usage

midcraft-commander [-h|?]

Download

cc-get: cc-get install midcraft-commander

GitHub: ZIP-file

If you've downloaded the ZIP-file, just put all files in '/bin'.

Screenshots

Spoiler
These screenshots are outdated!







luza #2
Posted 20 February 2012 - 09:02 AM
looks better than cookiecraft, I think.
I'll test it later today.
FuzzyPurp #3
Posted 20 February 2012 - 02:04 PM
Nice - i'm actually coding something like this now. I may dip in your sauce ;)/>/>
Mandrake Fernflower #4
Posted 20 February 2012 - 04:29 PM
Very very nice!
MewK #5
Posted 20 February 2012 - 08:49 PM
Nice - i'm actually coding something like this now. I may dip in your sauce ;)/>/>

Shouldn't we try to work on it together? I want Midcraft Commander to be the #1 choice for CraftOS and will extend it accordingly.
I'm open to almost everything and don't see a reason for rivaling projects. Plus, working together is more fun and more open source like :)/>/>


PS: I'm working on a ftp-like protocol right now to use Midcraft Commander to remote access other computers filesystems. T
The problem is that both computers would need to activly run Midcraft Commander.
Does Redworks maybe have a functional network-stack i can use which allows me to access the filesystem?
FuzzyPurp #6
Posted 20 February 2012 - 10:49 PM
Nice - i'm actually coding something like this now. I may dip in your sauce ;)/>/>

Shouldn't we try to work on it together? I want Midcraft Commander to be the #1 choice for CraftOS and will extend it accordingly.
I'm open to almost everything and don't see a reason for rivaling projects. Plus, working together is more fun and more open source like :)/>/>


PS: I'm working on a ftp-like protocol right now to use Midcraft Commander to remote access other computers filesystems. T
The problem is that both computers would need to activly run Midcraft Commander.
Does Redworks maybe have a functional network-stack i can use which allows me to access the filesystem?

Sounds good, you should join Redworks(you can still work on your own projects). And no not at the moment, but we can build one, if it hasnt been created yet.
What other ideas you have in mind?
MewK #7
Posted 20 February 2012 - 11:46 PM
Sounds good, you should join Redworks(you can still work on your own projects).

Sure, why not. Should I create my own Github rep. or do you have a
redworks rep. i shall use?

And no not at the moment, but we can build one, if it hasnt been created yet.
What other ideas you have in mind?

Well, I guess the topic networking will wait until the 1.3 release.
I want to see what new stuff we have available. My goal would be
something like a SSH demon to remote control other computers.
But that would need some kind of multitasking. Is a multitasking
stack already implemented in redworks? If not, that would
probably be my next project.
FuzzyPurp #8
Posted 21 February 2012 - 12:45 AM
Sounds good, you should join Redworks(you can still work on your own projects).

Sure, why not. Should I create my own Github rep. or do you have a
redworks rep. i shall use?

And no not at the moment, but we can build one, if it hasnt been created yet.
What other ideas you have in mind?

Well, I guess the topic networking will wait until the 1.3 release.
I want to see what new stuff we have available. My goal would be
something like a SSH demon to remote control other computers.
But that would need some kind of multitasking. Is a multitasking
stack already implemented in redworks? If not, that would
probably be my next project.

DO you use irc - most of us hang out there in the computercraft channel. My github links are on Redworks thread, and yea you should set one up.
A 1.3 candidate release may be coming out in a few hours, hop in irc channel
luza #9
Posted 21 February 2012 - 01:13 PM
Just tested it out. GREAT!
but can you make it possible to select multiple files?
MewK #10
Posted 21 February 2012 - 01:43 PM
Just tested it out. GREAT!

Thanks :)/>/>

but can you make it possible to select multiple files?

Good idea! I will work on it. I guess it will be released on Sunday, it's not a feature which is done in 30min. If you have further ideas, please post them^^
FuzzyPurp #11
Posted 21 February 2012 - 02:30 PM
Dude…let's join forces :)/>/>

Bug: none of the help files work, this is with CC 1.3rc1
debug shows -> bios:206: [string "dj"]: '=' expected - shows that for running any type of help file from the explorer
MewK #12
Posted 21 February 2012 - 09:58 PM
Dude…let's join forces :)/>/>

Bug: none of the help files work, this is with CC 1.3rc1
debug shows -> bios:206: [string "dj"]: '=' expected - shows that for running any type of help file from the explorer

Well, I guess I have to wait until 1.3 is released to fix that :huh:/>/>
FuzzyPurp #13
Posted 21 February 2012 - 11:27 PM
I think it MAY be a 1.3 issue.
MewK #14
Posted 22 February 2012 - 12:18 AM
I think it MAY be a 1.3 issue.

Ah now i understand what you mean. it's actually not an error.
If you press enter it runs a file, if you want to view a file you have to use the menu->edit

there is no good way to check whether a file is a program or not. not even craftos can d that.
just type "rom/help/list" on the shell and you'll see the same error.

an easy way to solve this problem would be the use of extensions like. lua and .txt and only .lua files are executable.
but as long as the default files dont have an extension i cant implement that.
luza #15
Posted 22 February 2012 - 03:19 PM
there is no good way to check whether a file is a program or not. not even craftos can d that.
just type "rom/help/list" on the shell and you'll see the same error.

yes, there is.
fs.isDir( path )
Espen #16
Posted 22 February 2012 - 06:06 PM
there is no good way to check whether a file is a program or not. not even craftos can d that.
just type "rom/help/list" on the shell and you'll see the same error.

yes, there is.
fs.isDir( path )
I think what he meant was that there is no easy way of checking if a file is a Lua program or not.
FuzzyPurp #17
Posted 22 February 2012 - 06:23 PM
there is no good way to check whether a file is a program or not. not even craftos can d that.
just type "rom/help/list" on the shell and you'll see the same error.

yes, there is.
fs.isDir( path )
I think what he meant was that there is no easy way of checking if a file is a Lua program or not.

I assume that is what he meant as well.
MewK #18
Posted 22 February 2012 - 11:47 PM
The point is that isDir can only tell you if it is a directory. It can't tell you if it is a LUA program or just a random text file or even a zip file. Windows for example only uses the file extension to decide that. Your browser uses mime-types and some apps use magic numbers to identify file types. Linuix uses an executable flag. craftos has nothing like that. i hope thats clear enough :)/>/>

The two options available for CraftOS would be:
  • using file extensions like .txt and .lua
  • or using something like shell scripts have: #!/bin/sh to define the interpreter
FuzzyPurp #19
Posted 24 February 2012 - 10:08 AM
MewK #20
Posted 25 February 2012 - 09:16 AM
I've released a new version!

Changelog:
  • Multi-select (use space to select/deselect entries)
  • Lists music disc in a virtual folder (/music)
  • And can play music discs too :P/>/>
  • I've refactored the whole code. Now it's ready for future updates.
Edit 1:

I've added even more:
  • Menu shortcuts
  • File info
  • Format disks
  • Open help files
  • Config file for:
    • Editor path
    • Folder default action (defines the 'enter' action: run, edit or help)
Edit 2:
I've fixed a small bug that broke things if cc-get was used to install mcom. So feel free to use cc-get again!
Airbus101 #21
Posted 24 April 2012 - 05:50 AM
This looks really cool...

HOWEVER, I'm playing on a server that I don't have access to paste stuff in the Bin.

I do use an auto typer and have added your entire midcraft-commander file to the PC.

But I still need to know How would I add congif, drawing, and filesystem ?? I've looked at them in Notepad ++ but unsure if I can rename files in Computer craft.
I'm kinda a noobie with it but learning fast. I just can't code…


Ok, I figured it out, I created files for each of your files in your zip with the approperate names on the computer in game, and used the auto typer to fill in the data in game.
I used notepad ++ so that it used the correct format, then pasted that into the auto typer.


My observation as a new user with no idea how it works yet...
looks really cool, once I learn to navatage it. any tips? ( a video with you going thur each option and the key used to go there would be AWSOME!)

the D Key needs an ARE YOU SURE…. trying to learn your commands I deleted all my files on my pc :)/>/>

ok, system restored… I Figured out that CRTL key operates the "Flie, System. Exit" Menus on the bottom

still my only complaint is the "D" key deletes automatically with no prompt., I'll test more tomorrow.