Jump to content

kpw

Member
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

kpw's Achievements

Helping Hand

Helping Hand (3/5)

2

Reputation

  1. This isn't currently working for me. Checking or unchecking the box seems to have no effect when importing collection. All snippets on import file are unchecked. Specifically the "Mac symbols" collection. Latest macOS Sonoma 14.1
  2. 1) homebrew python would be fine. 2) give script executable permission in terminal with “chmod +x scriptfilename.py” 3) can be run from any location with “path-to-script/scriptname.py”
  3. You can right-click on the snippet collection you are interested in and choose "Export". Then this python3 script should print the details out (change "snippetExportFile" with your exported filename). #!/usr/bin/env python3 from zipfile import ZipFile import os import json snippetExportFile = '/Users/kpw/Desktop/kpw.alfredsnippets' with ZipFile(snippetExportFile, 'r') as zip: files = zip.filelist for zipfile in files: if zipfile.filename.endswith(".json"): with zip.open(zipfile.filename) as myfile: snippetFileJson = myfile.read() alfredDict = json.loads(snippetFileJson.decode('utf-8')) snippetDict = alfredDict["alfredsnippet"] print(f'Name:\t\t{snippetDict["name"]}') print(f'Keyword:\t{snippetDict["keyword"]}') snippetText = snippetDict["snippet"].replace("\n", "\\n") print(f'Snippet:\t{snippetText}') print("-" * 80)
  4. zeitlings dialog works great. Thanks!
×
×
  • Create New...