Results 1 to 12 of 12

Thread: Independent command line interface

  1. #1
    Member FatBit's Avatar
    Join Date
    Jan 2012
    Location
    Prague, CZ
    Posts
    189
    Thanks
    0
    Thanked 36 Times in 27 Posts

    Independent command line interface

    Dear colleagues,

    I am establishing the discussion in zpaq thread. Do you think that would be useful/possible to develop/specify/unify operating system and program independent command line interface for compressors/packers and methods of its calling?

    The purpose is to divide high level programing (batches) and compressors/packers itself.

    E.g. how to interpret "*.*" or "*" etc.

    Best regards,

    FatBit

  2. #2
    Programmer Bulat Ziganshin's Avatar
    Join Date
    Mar 2007
    Location
    Uzbekistan
    Posts
    4,497
    Thanks
    733
    Thanked 659 Times in 354 Posts
    A long time ago in a galaxy far, far away FreeArc was started with exactly that purpose. Last 7 years it even offers CLS API so anyone can get a full-featured cmdline/gui archiver just by developing CLS-compliant DLL. There is also cmdline compressor FAZip. In my internal versions, i added 64-bit DLL support and plan to add Linux SO support. I also started development of CELS - extended API for compressors with all the same features as FreeArc internal compression wrapper classes (limiting memory usage and so on).

    7-zip provides its own compression algorithm API, so you can compile your own "extended 7-zip" executable or just provide plugin DLL with your compression algo.

    Finally, there is squash compression API.

  3. #3
    Member FatBit's Avatar
    Join Date
    Jan 2012
    Location
    Prague, CZ
    Posts
    189
    Thanks
    0
    Thanked 36 Times in 27 Posts
    I mean something a bit different. To stabilize/unify command line "names" like add, delete, extract, move, purge, refresh, synchronize, update etc. to simplify cmd programing/understanding.

    Best regards, FatBit

  4. #4
    Programmer Bulat Ziganshin's Avatar
    Join Date
    Mar 2007
    Location
    Uzbekistan
    Posts
    4,497
    Thanks
    733
    Thanked 659 Times in 354 Posts
    i suggest using ARC-established standard that is also employed by lha, arj, rar, 7-zip, freearc... in particular, in arjz i closely followed arj, and in freearc i mirror the rar cmdline

  5. #5
    Member
    Join Date
    Dec 2013
    Location
    Italy
    Posts
    342
    Thanks
    12
    Thanked 34 Times in 28 Posts
    Quote Originally Posted by Bulat Ziganshin View Post
    i suggest using ARC-established standard that is also employed by lha, arj, rar, 7-zip, freearc... in particular, in arjz i closely followed arj, and in freearc i mirror the rar cmdline
    I think that RAR is about "the" standard for command line

  6. #6
    Expert
    Matt Mahoney's Avatar
    Join Date
    May 2008
    Location
    Melbourne, Florida, USA
    Posts
    3,255
    Thanks
    306
    Thanked 778 Times in 485 Posts
    My apologies for a too creative zpaq CLI

    I think an interesting CLI would be to view an archive as a folder and to access using familiar shell commands like cp, mv, ls (or copy, move, dir). For example:

    zpaq mv file1 file2 arc.zpaq/dir/ (add dir/file1 and dir/file2 to arc.zpaq, then delete file1, file2)
    zpaq cp arc.zpaq/dir tmp (extract tmp/file1 and tmp/file2)
    zpaq ls arc.zpaq (show dir/file1 and dir/file2)

  7. #7
    Member
    Join Date
    May 2008
    Location
    brazil
    Posts
    163
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by Matt Mahoney View Post
    My apologies for a too creative zpaq CLI

    I think an interesting CLI would be to view an archive as a folder and to access using familiar shell commands like cp, mv, ls (or copy, move, dir). For example:

    zpaq mv file1 file2 arc.zpaq/dir/ (add dir/file1 and dir/file2 to arc.zpaq, then delete file1, file2)
    zpaq cp arc.zpaq/dir tmp (extract tmp/file1 and tmp/file2)
    zpaq ls arc.zpaq (show dir/file1 and dir/file2)
    Why not replace CLI with GUI?

    People insist to write code using command line interfaces.

  8. #8
    Member
    Join Date
    Dec 2013
    Location
    Italy
    Posts
    342
    Thanks
    12
    Thanked 34 Times in 28 Posts
    Quote Originally Posted by Matt Mahoney View Post
    My apologies for a too creative zpaq CLI

    I think an interesting CLI would be to view an archive as a folder and to access using familiar shell commands like cp, mv, ls (or copy, move, dir). For example:

    zpaq mv file1 file2 arc.zpaq/dir/ (add dir/file1 and dir/file2 to arc.zpaq, then delete file1, file2)
    zpaq cp arc.zpaq/dir tmp (extract tmp/file1 and tmp/file2)
    zpaq ls arc.zpaq (show dir/file1 and dir/file2)
    i do not agree because this will be way too slow.
    on zpaq for example listing and extracting can take minutes, so
    this could run for example with uncompressed nonsolid zip.
    in fact filesystems/on/file already exists as component for delphi (and maybe other too)

  9. #9
    Member
    Join Date
    Aug 2008
    Location
    Planet Earth
    Posts
    772
    Thanks
    63
    Thanked 270 Times in 190 Posts
    Quote Originally Posted by FatBit View Post
    Do you think that would be useful/possible to develop/specify/unify operating system and program independent command line interface for compressors/packers and methods of its calling?
    Some years ago when I worked on winzpaq I had the problem that every time Matt changed the zpaq command line interface or output I needed to rewrite winzpaq and test also all old zpaq versions to keep it backwards compatible, after a while I gave up updating winzpaq.

    For some time I had already a solution in mind and started developing a universal archiver interface (UAI) syntax specifications like the universal chess interface (UCI) http://download.shredderchess.com/div/uci.zip It could be added next to the already existing interface in any archiver, you type archiver -uai and it switch to the UAI mode (so archiver do not exit after that till the UAI command quit), after that with the UAI command option it send back the options (like compression levels, max threads, password protected, delete files/folders etc) it support.

    I started to create a list of basic commands to create and extract an archive and wanted to add UAI support to my own archivers for test, but then I realized I was not the right person to write this paper with all the options needed for most archivers, to discuss the drafts before final release and to keep it updated in the future and write example code (UAI server and client) in most used languages so it could be added easy to any project.

    But for the right person feel free to create it

  10. #10
    Expert
    Matt Mahoney's Avatar
    Join Date
    May 2008
    Location
    Melbourne, Florida, USA
    Posts
    3,255
    Thanks
    306
    Thanked 778 Times in 485 Posts
    > Why not replace CLI with GUI?

    I haven't found a GUI that I like. Basically you have to put the same information into a GUI but using mouse clicks. And you can't run it from a script for testing or timing or routine backups. A GUI is supposed to make software easier to use, but for me it just makes it harder.

    A GUI I would like to see would be for an archive to look just like a folder where you could drag files in and out and open them as usual. The compression should be transparent. But Windows already has compressed folders (with weak compression so it is fast enough). It's hard to see what value I would be adding. I don't like to use Explorer to move files either.

  11. #11
    Member
    Join Date
    Aug 2014
    Location
    Argentina
    Posts
    464
    Thanks
    202
    Thanked 81 Times in 61 Posts
    A fine solution to me so far when it comes to GUI are WCX plugins for *commander programs. I personally use Unreal Commander and Freecommander. In the past I used other, like TotalCommander. By this means, you treat an archiver mostly like any folder, combining the power of your favourite explorer and all its tools with the packer of your choice. The only drawback is most times WCX plugin has fewer options than the base program itself, but this can be fixed, of course.

  12. #12
    Member
    Join Date
    Dec 2013
    Location
    Italy
    Posts
    342
    Thanks
    12
    Thanked 34 Times in 28 Posts
    Quote Originally Posted by Matt Mahoney View Post
    > Why not replace CLI with GUI?

    I haven't found a GUI that I like. Basically you have to put the same information into a GUI but using mouse clicks. And you can't run it from a script for testing or timing or routine backups. A GUI is supposed to make software easier to use, but for me it just makes it harder.
    I agree on compressing, but NOT on expanding, where a GUI is often useful, and much better if can make search (like my own little program )
    It can be very time consuming to extract some files from CLI on millions, just to choose the right subfolder
    Turning back to the thread, here's 7z commands (almost the same of RAR)
    Code:
    <Commands>
      a : Add files to archive
      b : Benchmark
      d : Delete files from archive
      e : Extract files from archive (without using directory names)
      h : Calculate hash values for files
      i : Show information about supported formats
      l : List contents of archive
      rn : Rename files in archive
      t : Test integrity of archive
      u : Update files to archive
      x : eXtract files with full paths
    I think that a,e,l,t,x should be present in all packers, with the same semantics.
    So something like
    Code:
    pippo a c:\mynewfile d:\*.*
    should always work

Similar Threads

  1. Help!!! Need Recompression Command line for Precomp 0.4.3
    By Manjunath in forum Data Compression
    Replies: 9
    Last Post: 13th April 2014, 05:43
  2. Command Line Process Profiling Tool
    By david_werecat in forum Download Area
    Replies: 38
    Last Post: 30th December 2013, 18:12
  3. Replies: 4
    Last Post: 2nd December 2012, 03:55
  4. command-line calculator for Windows?
    By Alexander Rhatushnyak in forum The Off-Topic Lounge
    Replies: 5
    Last Post: 30th January 2012, 00:40
  5. DARK - a new BWT-based command-line archiver
    By encode in forum Forum Archive
    Replies: 138
    Last Post: 23rd September 2006, 21:42

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •