From 3456ed000c81ed81c5f77e42a16436dd471ddbfe Mon Sep 17 00:00:00 2001 From: ultramagnus_tcv Date: Thu, 10 Dec 2015 10:32:51 -0600 Subject: [PATCH] Removed unnecessary files --- Beginning.py | 38 --------------------------- output.csv => EXAMPLE.OUTPUT.csv | 0 SOSCFFA.DRIVER => EXAMPLE.SOS.DRIVER | Bin Goals.txt | 20 -------------- Problems.txt | 5 ---- Struct_decode.py | 15 ----------- 6 files changed, 78 deletions(-) delete mode 100644 Beginning.py rename output.csv => EXAMPLE.OUTPUT.csv (100%) rename SOSCFFA.DRIVER => EXAMPLE.SOS.DRIVER (100%) delete mode 100644 Goals.txt delete mode 100644 Problems.txt delete mode 100644 Struct_decode.py diff --git a/Beginning.py b/Beginning.py deleted file mode 100644 index 9a15265..0000000 --- a/Beginning.py +++ /dev/null @@ -1,38 +0,0 @@ -from struct import unpack -import os - -#Clear SCREEN -print("\033c"); - -# Ask for the DSK filename then open it -dskname = raw_input("Welcome to the Apple /// SOS.Driver.Slurper.\nAppleCommander _must_ exist in the same directory as this script.\n\nYou must have JAVA on your system. \n\nEnter CaSe-SeNsItIvE DSK filename: ") -if len(dskname) < 1 : - print '\nSorry, you must enter a disk name.' - exit() -else: - try: - dskopen = open(dskname) #Checks to see if DSK exists. - sosdrivername = raw_input('\nEnter the name of the SOS driver file you wish exported [SOS.DRIVER]: ') - if len(sosdrivername) < 1 : - sosdrivername = 'SOS.DRIVER' - print "DEBUG: Taking the default IF. sosdrivername is: " + sosdrivername - os.popen("java -jar AppleCommander-1.3.5.13-ac.jar -g %s %s >%s.SOS.DRIVER" % (dskname, sosdrivername,dskname)) - else: - print 'DEBUG: Taking the else...' - os.popen("java -jar AppleCommander-1.3.5.13-ac.jar -g %s %s >%s.SOS.DRIVER" % (dskname, sosdrivername,dskname)) - except: - print '\n\nI cannot find that disk file. Check path and/or name.\n\n' - exit() -#Is File a SOS DRIVER file? -SOSfile = open('SOSCFFA.DRIVER', 'rb') -SOS = SOSfile.read(10) -filetype, offset = unpack('< 8s H', SOS) -print "Filetype is: %s. Offset is: %04x" % (filetype, offset) - -#Seek to first driver -SOSfile.seek(offset,1) -SOS = SOSfile.read(2) # Read two bytes -marker = unpack('< H', SOS) -# if marker == \x0000 : #Saving for later... - -SOSfile.close() diff --git a/output.csv b/EXAMPLE.OUTPUT.csv similarity index 100% rename from output.csv rename to EXAMPLE.OUTPUT.csv diff --git a/SOSCFFA.DRIVER b/EXAMPLE.SOS.DRIVER similarity index 100% rename from SOSCFFA.DRIVER rename to EXAMPLE.SOS.DRIVER diff --git a/Goals.txt b/Goals.txt deleted file mode 100644 index f9899e0..0000000 --- a/Goals.txt +++ /dev/null @@ -1,20 +0,0 @@ -1. Obtain the name of the .dsk image from the command-line (like: python my_script.py my_disk_image.dsk) -2. For each driver: - a. File offset - b. List the name of the driver - c. Whether it's char or block device - d. Manufacturer id - e. Version number - -If it were to print it all on one line, delimited with commas or something, it might help later when it's used to troll through a directory. - -So maybe: - -$ python my_script.py my_disk_image.dsk -0530,FMT_D1,BLOCK,01,1.1 -096e,FMT_D2,BLOCK,01,1.1 -0990,FMT_D3,BLOCK,01,1.1 -09B2,FMT_D4,BLOCK,01,1.1 -0a00,SILENTYPE,CHAR,01,4.0c -0b00,DMP,CHAR,01,1.0 -0c00,CONSOLE,CHAR,01,1.0 diff --git a/Problems.txt b/Problems.txt deleted file mode 100644 index 05203be..0000000 --- a/Problems.txt +++ /dev/null @@ -1,5 +0,0 @@ -Problems to Solve: - -1. How to march through the file. -2. How to load a number of bytes at a specific offset? (e.g. Load 2 bytes from 0x04dc) -3. How to write to a file. diff --git a/Struct_decode.py b/Struct_decode.py deleted file mode 100644 index 8347c38..0000000 --- a/Struct_decode.py +++ /dev/null @@ -1,15 +0,0 @@ -from struct import unpack - -#Is File a SOS DRIVER file? -SOSfile = open('SOSCFFA.DRIVER', 'rb') -SOS = SOSfile.read(10) -filetype, offset = unpack('< 8s H', SOS) -print "Filetype is: %s. Offset is: %04x" % (filetype, offset) - -#Seek to first driver -SOSfile.seek(offset,1) -SOS = SOSfile.read(2) # Read two bytes -marker = unpack('< H', SOS) -if marker == \x0000 : - -SOSfile.close()