Jump to content

EdwinW

Member
  • Posts

    7
  • Joined

  • Last visited

Recent Profile Visitors

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

EdwinW's Achievements

Helping Hand

Helping Hand (3/5)

1

Reputation

  1. 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. omg,I've been trying to just press ‘’backspace",that's my bad😂
  3. 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. Can you modify it so that I can input a specific time, instead of automatically closing after 60 seconds?Thank u!
×
×
  • Create New...