Skip to content

Commit 6542531

Browse files
committed
update score explanation
1 parent 97715de commit 6542531

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

nodejs-write-code.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ if (method === "query") {
2020
"method": "do_something_for_query",
2121
"parameters": ["https://github.com/Flow-Launcher/Flow.Launcher"]
2222
},
23-
"IcoPath": "Images\\app.png"
23+
"IcoPath": "Images\\app.png",
24+
"score" : 0
2425
}]
2526
}
2627
));
@@ -57,7 +58,10 @@ SET plugin_dir=%~dp0%
5758
node %plugin_dir%/main.js %*
5859
```
5960

60-
### 6. Your plugin.json
61+
### 6 Result score
62+
The `score` field provides the ability to assign a weight to your score, the higher the score is, the higher the result from the plugin would show in flow's result list. The range in which you assign the score is usually between 0-100. You can keep it as 0 if your plugin generally uses an action keyword to trigger, but if you are using a global action keyword - `*` then the average weight for a plugin would be 50. Additionally users can also tweak the score via Flow's plugin setting as well.
63+
64+
### 7. Your plugin.json
6165
You will also need to if not yet already, create a plugin.json file that will instruct Flow on how to load your plugin.
6266

6367
This file should be placed in the top level folder.

py-write-code.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class HelloWorld(FlowLauncher):
2929
"method": "open_url",
3030
"parameters": ["https://github.com/Flow-Launcher/Flow.Launcher"]
3131
},
32-
"score": 0 # An integer indicate the priority of the result
32+
"score": 0
3333
}
3434
]
3535

@@ -43,7 +43,7 @@ class HelloWorld(FlowLauncher):
4343
"method": "open_url",
4444
"parameters": ["https://github.com/Flow-Launcher/Flow.Launcher.Plugin.HelloWorldPython"]
4545
},
46-
"score" : 0 # An integer indicate the priority of the result
46+
"score" : 0
4747
}
4848
]
4949

@@ -75,7 +75,10 @@ This method creates a context menu for your results, where the user can carry ou
7575

7676
To attach a method to your context menu result, do the same as for normal results where you define a JsonRPCAction item with the method and parameters you want to call and pass through. In this case the context menu will simply open the HelloWorldPython plugin's GitHub repo.
7777

78-
### 6. Your plugin.json
78+
### 6 Result score
79+
The `score` field provides the ability to assign a weight to your score, the higher the score is, the higher the result from the plugin would show in flow's result list. The range in which you assign the score is usually between 0-100. You can keep it as 0 if your plugin generally uses an action keyword to trigger, but if you are using a global action keyword - `*` then the average weight for a plugin would be 50. Additionally users can also tweak the score via Flow's plugin setting as well.
80+
81+
### 7. Your plugin.json
7982

8083
You will also need to if not yet already, create a plugin.json file that will instruct Flow on how to load your plugin.
8184

0 commit comments

Comments
 (0)