Giter Club home page Giter Club logo

Comments (5)

a2geek avatar a2geek commented on July 20, 2024

Those numbers actually are internal pointers withing the ProDOS disk... but you're right, the timestame is not shown.

The code that is currently being used is actually for the GUI and the ProDOS code is here if you're curious.

If you're processing this, what format would work for you for scripting? I typically do a lot with JSON and jq but I'm not certain what other folks use. Maybe a CSV type format? I'm thinking this free-form text isn't really appropriate.

It might be time to add another list option!

from applecommander.

gray-space avatar gray-space commented on July 20, 2024

Just about any format would do... short of a raw binary blob. CSV would be easy to split up. A simple text string is fine too, as there are libraries to parse most of the commonly-used formats. JSON would also work.

from applecommander.

a2geek avatar a2geek commented on July 20, 2024

Went a little overboard, so hopefully this helps out. Also introducing some CSV and JSON goodness.

For ProDOS, I added the timestamp to the -ll format.

% ac -ll ~/Downloads/ProDOS_2_4_2.dsk                                                 
/Users/rob/Downloads/ProDOS_2_4_2.dsk /PRODOS.2.4.2/
  VIEW.README  Destroy Read Rename Write BAS  001 09/15/2016 09:26 01/13/2018 09:09 512 A=$0801 0002 0116 Seedling Changed 0 36
* BITSY.BOOT  Read  SYS  001 09/15/2016 09:49 01/13/2018 09:09 365 A=$2000 0002 003D Seedling Changed 0 36
<snip>

Also, throwing a v on the end yields CSV:

% ac -llv ~/Downloads/ProDOS_2_4_2.dsk
/Users/rob/Downloads/ProDOS_2_4_2.dsk,/PRODOS.2.4.2/
" ",Name,Deleted?,Permissions,Filetype,Directory?,Blocks,Modified,Created,Length,Aux. Type,Dir. Header,Key Block,Key Type,Changed,Min. ProDOS Ver.,ProDOS Ver.
" ",VIEW.README,,Destroy Read Rename Write,BAS,,001,09/15/2016 09:26,01/13/2018 09:09,512,A=$0801,0002,0116,Seedling,Changed,0,36
*,BITSY.BOOT,,"Read ",SYS,,001,09/15/2016 09:49,01/13/2018 09:09,365,A=$2000,0002,003D,Seedling,Changed,0,36

And finally, coupling the ac -llj <image> with jq allows some additional selection capabilities... I continued to just use the output of the other commands instead of reimplementing that portion. Meaning they are strings and not their actual data types as well as being formatted for the listing and viewing commands.

% ac -llj ~/Downloads/ProDOS_2_4_2.dsk | jq -r '.disks[0].files[] | select(.name == "README")'
{
  "locked": " ",
  "name": "README",
  "deleted": "",
  "permissions": "Destroy Read Rename Write",
  "type": "TXT",
  "directory": "0002",
  "blocks": "001",
  "modified": "01/18/2018 06:54",
  "created": "01/13/2018 09:09",
  "size": "497",
  "auxType": "$0000",
  "keyBlock": "0117",
  "keyType": "Seedling",
  "changed": "Changed",
  "minimumProdosVersion": "0",
  "prodosVersion": "36"
}

from applecommander.

a2geek avatar a2geek commented on July 20, 2024

It's dumb that we can't attach a .jar but we can a .zip? Sample in the zip file.
AppleCommander-ac-1.7.0pre.jar.zip

from applecommander.

gray-space avatar gray-space commented on July 20, 2024

Got this working perfectly,. I now have a short python script that calls AppleCommander to figure out what files have been altered locally, and then update them in an image. This will save me considerable time when editing outside the image and compiling inside it. Thanks!

from applecommander.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.