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": "",
"publishURL": "",
"content": "gmail",
"systemTags": [
"markdown"
],
"modificationDate": 1599312951.145001,
"creationDate": 1569875316,
"key": "XXX",
"version": 58,
"syncdate": 1600667523.891809,
"localkey": "XXX",
"savedate": 1602487240.5917828
},
{
"tags": [],
"deleted": 0,
"shareURL": "",
"publishURL": "",
"content": "gmail 2",
"systemTags": [
"markdown"
],
"modificationDate": 1587040951.0199919,
"creationDate": 1587031436.520257,
"key": "XXX",
"version": 23,
"syncdate": 1587154334.194783,
"localkey": "XXX",
"savedate": 1602487240.5917828
}
]
How is it possible to create an item for each search result, for example with title: content, subtitle: creationDate, argument: localkey?