WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Request Midnight Commander File Manager  (Read 59064 times)

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Request Midnight Commander File Manager
« on: June 01, 2012, 05:42:51 AM »
This has stood the test of time well and remains very useful.  I find the "User Menu" function particularly helpful to script and execute my repetive tasks.
   

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Request Midnight Commander File Manager
« Reply #1 on: June 02, 2012, 10:02:37 PM »
I will aim to package it in the next day or so.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Request Midnight Commander File Manager
« Reply #2 on: June 06, 2012, 11:02:38 PM »
Built and packaged from source, tested out ok here, and uploaded.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Request Midnight Commander File Manager
« Reply #3 on: June 06, 2012, 11:22:55 PM »
Fixed typo that prevents browsing tar files, uploading again.

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: Request Midnight Commander File Manager
« Reply #4 on: June 07, 2012, 06:17:32 AM »
...uploading again.
Thanks for this, initial tests look good.

One issue to report at present.  The info file indicates "bzip2    - 1.0.6" is included.  When attempting to compress a file the mc console reports:
Code: [Select]
bzip2: error while loading shared libraries: libbz2.so.1.0: cannot open shared object file: No such file or directory
Producing and extracting .gz and tar.gz files works OK.
   

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Request Midnight Commander File Manager
« Reply #5 on: June 07, 2012, 10:54:38 AM »
Ok, I will look into it tonight.  I never really used MC, preferring either the command line or a graphical app like rox or emelfm2, so my testing of it was limited.

I am away from TC today, but my hunch is that I may need to create a wrapper for the bzip2 binaries in /apps/mc/localbin, or preferably to just re build bzip2 as static to keep it simpler without needing a wrapper for every one of it's invocations.

Offline spence91

  • Jr. Member
  • **
  • Posts: 80
Re: Request Midnight Commander File Manager
« Reply #6 on: June 07, 2012, 12:31:50 PM »
This has stood the test of time well and remains very useful.  I find the "User Menu" function particularly helpful to script and execute my repetive tasks.
 

Can you script in mc? Is it something similar to what vim/emacs is capable of?

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: Request Midnight Commander File Manager
« Reply #7 on: June 07, 2012, 02:01:27 PM »
Can you script in mc?
The included user manual has guidance on its scripting capabilities which is quite helpful.  Examples of the structure can be found in ~/.mc/menu.  There are also many sites with helpful information.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Request Midnight Commander File Manager
« Reply #8 on: June 07, 2012, 09:10:52 PM »
Should be working now, with static bzip2.

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: Request Midnight Commander File Manager
« Reply #9 on: June 08, 2012, 02:38:48 AM »
Should be working now, with static bzip2.
Confirming it now works as expected.  Thanks.

I will now request a series of scm command line apps I regularly use via the MC User Menu facility.

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 550
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: Request Midnight Commander File Manager
« Reply #10 on: June 11, 2012, 08:31:46 PM »
i might be wrong but seems mc.scm should include
grep, gawk and isoinfo to view iso-images content
lynx to view html-files and groff to view man-files
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: Request Midnight Commander File Manager
« Reply #11 on: June 12, 2012, 03:37:54 AM »
i might be wrong but seems mc.scm should include
grep, gawk and isoinfo to view iso-images content
lynx to view html-files and groff to view man-files
A quick scan of the files and dependencies for the tcz version show they are not included for that format either.  This raises a question, probably one of many that may occur as the scm format matures. 

Where an app exists in both tcz and scm types should they both offer ther same range of capabilities?

In my view, the two formats are aimed at different goals and have different download sizes.  It seems appropriate that they might also offer different capabilities, contain different versions and be updated at different frequencies (scm less often than tcz).
   

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 550
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: Request Midnight Commander File Manager
« Reply #12 on: June 12, 2012, 04:18:50 AM »
i think it was too quick scan :)
you can try to look at iso, html or man by using mc
and then see which messages shows up in mc
or do the following
Code: [Select]
$ egrep -rw '(gawk|grep|isoinfo)' /apps/mc/libexec/mc/extfs.d
/apps/mc/libexec/mc/extfs.d/README:that mc can use.  Currently awk (or gawk) is used because nearly all systems
/apps/mc/libexec/mc/extfs.d/audio:    cdparanoia -Q -d "$1" 2>&1 | grep '^[ 0-9][ 0-9][ 0-9]\.' | while read A B C
/apps/mc/libexec/mc/extfs.d/audio:        RESPONSE=`wget -q -T $CDDB_TIMEOUT -O - "$CDDB_SERVER/~cddb/cddb.cgi?cmd=cddb+query+$DISCID&$CDDB_HANDSHAKE" | tee "$3" | gawk '/^200/ { print $2,$3; }'`
/apps/mc/libexec/mc/extfs.d/audio: wget -q -T $CDDB_TIMEOUT -O - "$CDDB_SERVER/~cddb/cddb.cgi?cmd=cddb+read+$RESPONSE&$CDDB_HANDSHAKE" | grep -v "^#" >> "$3"
/apps/mc/libexec/mc/extfs.d/deba:       chop($debd = `dpkg -s $qarchive | grep -i ^Version | sed 's/^version: //i'`);
/apps/mc/libexec/mc/extfs.d/deba:       chop($deba = `apt-cache show $qarchive | grep -i ^Version | sed 's/^version: //i'`);
/apps/mc/libexec/mc/extfs.d/debd:       chop($status = `dpkg -s $qarchive | grep ^Status`);
/apps/mc/libexec/mc/extfs.d/dpkg+:       system("if dpkg -s $qname | grep ^Status | grep -qs config-files; \
/apps/mc/libexec/mc/extfs.d/hp48+:AWK=gawk
/apps/mc/libexec/mc/extfs.d/iso9660:# tested to comply with isoinfo 2.0's output
/apps/mc/libexec/mc/extfs.d/iso9660: CHARSET=`locale 2>/dev/null | /usr/local/bin/grep LC_CTYPE | sed -n -e 's/.*\.\(.*\)"$/\1/p'`
/apps/mc/libexec/mc/extfs.d/iso9660: isoinfo -j $CHARSET -i /dev/null 2>&1 | /usr/local/bin/grep "Iconv not yet supported\|Unknown charset" >/dev/null && CHARSET=
/apps/mc/libexec/mc/extfs.d/iso9660:    ISOINFO="isoinfo -R"
/apps/mc/libexec/mc/extfs.d/iso9660:    ISOINFO_D_I="`isoinfo -d -i "$1" 2>/dev/null`"
/apps/mc/libexec/mc/extfs.d/iso9660:    echo "$ISOINFO_D_I" | /usr/local/bin/grep "UCS level 1\|NO Joliet" > /dev/null || ISOINFO="$ISOINFO $JOLIET_OPT"
/apps/mc/libexec/mc/extfs.d/iso9660:    if [ `echo "$ISOINFO_D_I" | /usr/local/bin/grep "Joliet with UCS level 3 found" | wc -l` = 1 \
/apps/mc/libexec/mc/extfs.d/iso9660:        -a `echo "$ISOINFO_D_I" | /usr/local/bin/grep "NO Rock Ridge" | wc -l` = 1 ] ; then
/apps/mc/libexec/mc/extfs.d/iso9660:$ISOINFO -l -i "$1" 2>/dev/null | gawk -v SEMICOLON=$SEMICOLON '
/apps/mc/libexec/mc/extfs.d/lslR:AWK=gawk
/apps/mc/libexec/mc/extfs.d/rpm:    if test "`echo supportedTags | grep -c CONFLICTS`" -eq 1; then
/apps/mc/libexec/mc/extfs.d/trpm:    $RPM -q --qf "[%{REQUIRENAME}\n]" -- "$1" | grep "(none)" > /dev/null ||
/apps/mc/libexec/mc/extfs.d/trpm:    $RPM -q --qf "[%{OBSOLETES}\n]" -- "$1" | grep "(none)" > /dev/null ||
/apps/mc/libexec/mc/extfs.d/trpm:    $RPM -q --qf "[%{PROVIDES}\n]" -- "$1" | grep "(none)" > /dev/null ||
/apps/mc/libexec/mc/extfs.d/trpm:    $RPM -q --qf "[%{CONFLICTS}\n]" -- "$1" | grep "(none)" > /dev/null ||
/apps/mc/libexec/mc/extfs.d/trpm:    $RPM -qlv -- "$1" | grep '^[A-Za-z0-9-]'
/apps/mc/libexec/mc/extfs.d/u7z: $P7ZIP l "$1" "$2" | grep -q "0 files, 0 folders" && \
/apps/mc/libexec/mc/extfs.d/u7z: $P7ZIP l "$1" "$2" | grep -q "0 files, 0 folders" && \
/apps/mc/libexec/mc/extfs.d/u7z: $P7ZIP d "$1" "$EXFNAME" 2>&1 | grep -q E_NOTIMPL > /dev/null 2>&1 && \
/apps/mc/libexec/mc/extfs.d/u7z: $P7ZIP l "$1" "$2" | grep -q "0 files, 0 folders" && \
/apps/mc/libexec/mc/extfs.d/u7z: $P7ZIP d "$1" "$EXFNAME"/ 2>&1 | grep -q E_NOTIMPL > /dev/null 2>&1 && \
/apps/mc/libexec/mc/extfs.d/uace:    $ACE_LIST "$1" | gawk -v uid=$UID '
/apps/mc/libexec/mc/extfs.d/ualz: $UNALZ -l "$1" | gawk -v uid=`id -nu` -v gid=`id -ng` '
/apps/mc/libexec/mc/extfs.d/uarc:    $ARC_LIST "$1" | gawk -v uid=$UID '
/apps/mc/libexec/mc/extfs.d/uarj: $ARJ v "$1" | gawk -v uuid=$(id -ru) '
/apps/mc/libexec/mc/extfs.d/uc1541:    $C1541 "$1" -list | gawk -v uid=$UID '
/apps/mc/libexec/mc/extfs.d/ucab:    $CAB -l "$1" | gawk -v uid=`id -un` -v gid=`id -gn` '
/apps/mc/libexec/mc/extfs.d/uha:    $HA lf "$1" 2>/dev/null | gawk -v uid=$(id -ru)  '
/apps/mc/libexec/mc/extfs.d/ulha:# Tested with mc 3.5.18 and gawk 3.0.0 on Linux 2.0.0
/apps/mc/libexec/mc/extfs.d/ulha:AWK=gawk
/apps/mc/libexec/mc/extfs.d/urar:     $UNRAR v -c- -cfg- "$1" | gawk -v uid=`id -u` -v gid=`id -g` '
/apps/mc/libexec/mc/extfs.d/uzoo:    $ZOO lq "$ARCHIVE" | gawk -v uid=$(id -ru)  '
Code: [Select]
$ egrep -rw '(lynx|groff)' /apps/mc/etcfiles/mc
/apps/mc/etcfiles/mc/mc.ext: Open=(if test -n "" && test -n "$DISPLAY"; then ( file://%d/%p &) 1>&2; else links %f || lynx -force_html %f || ${PAGER:-more} %f; fi) 2>/dev/null
/apps/mc/etcfiles/mc/mc.ext: View=%view{ascii} links -dump %f 2>/dev/null || w3m -dump %f 2>/dev/null || lynx -dump -force_html %f
/apps/mc/etcfiles/mc/sfs.ini:uhtml/1 lynx -force_html -dump %1 > %3
/apps/mc/etcfiles/mc/sfs.ini:uman/1 groff -Tascii -man %1 > %3
/apps/mc/etcfiles/mc/sfs.ini:url:2 lynx -source `echo "%2" | sed 's-|-/-g'` > %3
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: Request Midnight Commander File Manager
« Reply #13 on: June 12, 2012, 05:04:45 AM »
i think it was too quick scan :)...
It seems that we are communicating at crossed purposes.  I was referring to the information in the repo rather than a local installation.  In TC the info as displayed in Apps-->Cloud-->Browse-->mc  under the "Files" and "Depends" tabs.
   

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 550
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: Request Midnight Commander File Manager
« Reply #14 on: June 12, 2012, 07:31:48 AM »
yes i understood
but what do you think about the possibility to view iso, html and man by using mc?
yet it would be nice if it were possible to look 7z, rar and zip archives
ie p7zip.tcz, unrar.tcz and zip-unzip.tcz should be also included
however based on my experience is not enough to include zip-unzip.tcz to view zip
need something else which i still have not been able to determine...

proceeding from the fact that tinycore does not provide these tools by default
and self-contained module contain instruments for disclosing its capabilities
then it seems that the above-mentioned tools must be included to mc.scm
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)