Created
July 12, 2023 21:36
-
-
Save rodnt/1b47cf85abc7fc316fb2f11fd960ee3a to your computer and use it in GitHub Desktop.
Parser for .ds_store files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- encoding: utf-8 -*- | |
from ds_store import DSStore | |
from tqdm import tqdm | |
import argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument("-p", "--path", help="Path to the DS_Store file", required=True) | |
parser.add_argument("-t", "--type", help="Type : Iloc, bwsp, lsvp, lsvP, icvp", default='Iloc') | |
args = parser.parse_args() | |
dsstore = DSStore.open(args.path, 'r+') | |
for data in tqdm(dsstore): | |
data = str(data) | |
entry = data.translate(None, "<>") | |
entry = entry.split(' ') | |
if(entry[1] == args.type): | |
print(entry[0]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment