Jump to content

drompono

Member
  • Content Count

    7
  • Joined

  • Last visited

  1. thanks! items.append({ 'title': d['content'], 'subtitle': datetime.fromtimestamp(d['creationDate']).strftime('%d.%m.%y - %H:%M'), 'arg': d['localkey'] })
  2. Fantastic! Thats working! One last question, the modificationDate in subtitle are in Unix Timestamp like 1587040951.0199919 - How can I convert them to %d.%m.% - %H:%M ?
  3. Hi! Im using Simplenote and found out there is a CLI available. Now I want to create a workflow to search through my notes. I´m just starting to use the Script Filter more and still I don´t know how I can use json output from the cli to display the results in alfred. If I type something with the Script Filter: /usr/local/bin/sncli -n export {query} debugging shows me: ERROR: Simplenote Search[Script Filter] Unable to decode JSON results, top level type is not dictionary in JSON: [ { "tags": [], "deleted": false, "shareURL": "", "pub
  4. ah ok seems the edit in Numbers App changed the seperators from , to ; so I changed for row in csv.DictReader(fp, delimiter=';'): but now I get this error: [18:02:26.322] ERROR: Search Shopify CSV[Script Filter] Code 1: [fuzzy] . [fuzzy] cmd=['/usr/bin/python', 'fuzzylist.py'], query='', session_id=None [fuzzy] running command ['/usr/bin/python', 'fuzzylist.py'] ... Traceback (most recent call last): File "fuzzylist.py", line 51, in <module> convert(INFILE, OUTFILE) File "fuzzylist.py", line 37, in conv
  5. yes thats it! Thank you very much, thats exactly what I was looking for! Ok I will check what will be better for filterung the results One last question, I replaced the dummy csv with my actual csv list, which is much more lager. I deleted the .json file and triggered the workflow, but then I get this error here: [17:26:11.560] ERROR: Search Shopify CSV[Script Filter] Code 1: [fuzzy] . [fuzzy] cmd=['/usr/bin/python', 'fuzzylist.py'], query='', session_id=None [fuzzy] running command ['/usr/bin/python', 'fuzzylist.py'] ... Traceback (most recent call last): File "f
  6. Thanks nfor your quick reply! Ah ok, sorry here the link to my actual workflow: https://dsc.cloud/93b597/Search-Shopify-CSV the included .csv file has 14 rows - row with the fieldname "shipping_address.name" and "total_price" should appear in the alfred json title, "shipping_address.city" and "shipping_address.country" should appear in the subtitle - But If I do a search from Alfred all rows should be included, so if Im searching for an email address, the email row should be searched - is this possible? So should I just add to the for
  7. Hey there! Im using the fuzzylist workflow template to display results from an .csv file, this here is the fuzzylist.py: #!/usr/bin/python from __future__ import print_function theFile="test.csv" fieldnames=["title","arg","subtitle"] json_filename = theFile.split(".")[0]+".json" import csv import sys import json import os def convert(csv_filename, json_filename, fieldnames): f=open(csv_filename, 'r') csv_reader = csv.DictReader(f,fieldnames, restkey=None, restval=None) jsonf = open(json_filename,'w') jsonf.write('{"items":[') data="" for
×
×
  • Create New...