EdwinW
-
Posts
7 -
Joined
-
Last visited
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Posts posted by EdwinW
-
-
This is the address of the project : https://github.com/huamang/SiYuan-Search-workflow
This is the specific log of debug
[16:04:23.260] SiYuan[Script Filter] Queuing argument 's' [16:04:23.384] SiYuan[Script Filter] Script with argv '(null)' finished [16:04:23.389] ERROR: SiYuan[Script Filter] Code 1: Traceback (most recent call last): File "/Users/edwinwang/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A73C9D10-C775-4B59-9699-E72DE2DBFE81/search.py", line 57, in <module> main() File "/Users/edwinwang/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A73C9D10-C775-4B59-9699-E72DE2DBFE81/search.py", line 53, in main parseRes(resJson) File "/Users/edwinwang/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A73C9D10-C775-4B59-9699-E72DE2DBFE81/search.py", line 37, in parseRes for block in resJson["data"]["blocks"]: KeyError: 'data'
This is the specific content of the script
import json import sys import requests def fullTextSearchBlock(q): searchJson = {} searchJson["query"] = q searchJson["method"] = 0 type = {} type["blockquote"] = True type["codeBlock"] = True type["document"] = True type["embedBlock"] = True type["heading"] = True type["htmlBlock"] = True type["list"] = True type["listItem"] = True type["mathBlock"] = True type["paragraph"] = True type["superBlock"] = True type["table"] = True searchJson["type"] = type searchJson["path"] = [] searchJson["groupBy"] = 0 searchJson["orderBy"] = 0 data = json.dumps(searchJson) url = "http://127.0.0.1:6806/api/search/fullTextSearchBlock" res = requests.post(url, data) resJson = json.loads(res.text) return resJson def parseRes(resJson): itemList = [] uid = 1 for block in resJson["data"]["blocks"]: item = {} item["uid"] = uid item["title"] = block["content"].replace("<mark>", "").replace("</mark>", "")[:50] item["subtitle"] = block["hPath"] item["arg"] = "siyuan://blocks/" + block["id"] itemList.append(item) uid += 1 items = {} items["items"] = itemList items_json = json.dumps(items) sys.stdout.write(items_json) def main(): alfredQuery = str(sys.argv[1]) resJson = fullTextSearchBlock(alfredQuery) parseRes(resJson) if __name__ == '__main__': main()
-
-
2 minutes ago, Stephen_C said:
When you highlight a clipboard history item Fn + backspace will delete it.
Stephen
omg,I've been trying to just press ‘’backspace",that's my bad😂
-
1.Give the interface several icons to classify the content in the clipboard, such as text, pictures, links.Sometimes too many things are copied and it is not very clear.
2.Can you update and choose to delete a certain clipboard content, not all recent content, sometimes you copy a wrong sentence, but there is no way to delete it
Thank u!
-
4 minutes ago, vitor said:
Welcome @EdwinW,
As per the instructions:
You can set it for the number of seconds you want. I don’t intend to add a feature to tell the machine to turn off at a specific hour:minute because that wouldn’t be reliable: it wouldn’t work if the Mac were asleep and it would require enhanced permissions.
alright!thank u!
-
Can you modify it so that I can input a specific time, instead of automatically closing after 60 seconds?Thank u!
A problem encountered when using the workflow of siyuan note
in Workflow Help & Questions
Posted
thank you all !