Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
guilherssousa committed Mar 1, 2023
1 parent 730d93b commit c8630c6
Show file tree
Hide file tree
Showing 29 changed files with 46 additions and 46 deletions.
4 changes: 2 additions & 2 deletions API-Reference/Flow.Launcher.Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
| class [FlowLauncherQueryEventArgs](./Flow.Launcher.Plugin/FlowLauncherQueryEventArgs.md) | |
| record [GlyphInfo](./Flow.Launcher.Plugin/GlyphInfo.md) | Text with FontFamily specified |
| interface [IAsyncPlugin](./Flow.Launcher.Plugin/IAsyncPlugin.md) | Asynchronous Plugin Model for Flow Launcher |
| interface [IAsyncReloadable](./Flow.Launcher.Plugin/IAsyncReloadable.md) | This interface is to indicate and allow plugins to asyncronously reload their in memory data cache or other mediums when user makes a new change that is not immediately captured. For example, for BrowserBookmark and Program plugin does not automatically detect when a user added a new bookmark or program, so this interface's function is exposed to allow user manually do the reloading after those new additions. The command that allows user to manual reload is exposed via Plugin.Sys, and it will call the plugins that have implemented this interface. |
| interface [IAsyncReloadable](./Flow.Launcher.Plugin/IAsyncReloadable.md) | This interface is to indicate and allow plugins to asynchronously reload their in memory data cache or other mediums when user makes a new change that is not immediately captured. For example, for BrowserBookmark and Program plugin does not automatically detect when a user added a new bookmark or program, so this interface's function is exposed to allow user manually do the reloading after those new additions. The command that allows user to manual reload is exposed via Plugin.Sys, and it will call the plugins that have implemented this interface. |
| interface [IContextMenu](./Flow.Launcher.Plugin/IContextMenu.md) | |
| interface [IFeatures](./Flow.Launcher.Plugin/IFeatures.md) | Base Interface for Flow's special plugin feature interface |
| interface [IPlugin](./Flow.Launcher.Plugin/IPlugin.md) | Synchronous Plugin Model for Flow Launcher |
| interface [IPluginI18n](./Flow.Launcher.Plugin/IPluginI18n.md) | Represent plugins that support internationalization |
| interface [IPublicAPI](./Flow.Launcher.Plugin/IPublicAPI.md) | Public APIs that plugin can use |
| interface [IReloadable](./Flow.Launcher.Plugin/IReloadable.md) | This interface is to indicate and allow plugins to synchronously reload their in memory data cache or other mediums when user makes a new change that is not immediately captured. For example, for BrowserBookmark and Program plugin does not automatically detect when a user added a new bookmark or program, so this interface's function is exposed to allow user manually do the reloading after those new additions. The command that allows user to manual reload is exposed via Plugin.Sys, and it will call the plugins that have implemented this interface. |
| interface [IResultUpdated](./Flow.Launcher.Plugin/IResultUpdated.md) | |
| interface [ISavable](./Flow.Launcher.Plugin/ISavable.md) | Save addtional plugin data. Inherit this interface if additional data e.g. cache needs to be saved, Otherwise if LoadSettingJsonStorage or SaveSettingJsonStorage has been callded, plugin settings will be automatically saved (see Flow.Launcher/PublicAPIInstance.SavePluginSettings) by Flow |
| interface [ISavable](./Flow.Launcher.Plugin/ISavable.md) | Save additional plugin data. Inherit this interface if additional data e.g. cache needs to be saved, Otherwise if LoadSettingJsonStorage or SaveSettingJsonStorage has been called, plugin settings will be automatically saved (see Flow.Launcher/PublicAPIInstance.SavePluginSettings) by Flow |
| interface [ISettingProvider](./Flow.Launcher.Plugin/ISettingProvider.md) | |
| class [PluginInitContext](./Flow.Launcher.Plugin/PluginInitContext.md) | |
| class [PluginMetadata](./Flow.Launcher.Plugin/PluginMetadata.md) | |
Expand Down
2 changes: 1 addition & 1 deletion API-Reference/Flow.Launcher.Plugin/IAsyncPlugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public interface IAsyncPlugin

| name | description |
| --- | --- |
| [InitAsync](IAsyncPlugin/InitAsync.md)(…) | Initialize plugin asynchrously (will still wait finish to continue) |
| [InitAsync](IAsyncPlugin/InitAsync.md)(…) | Initialize plugin asynchronously (will still wait finish to continue) |
| [QueryAsync](IAsyncPlugin/QueryAsync.md)(…) | Asynchronous Querying |

## See Also
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# IAsyncPlugin.InitAsync method

Initialize plugin asynchrously (will still wait finish to continue)
Initialize plugin asynchronously (will still wait finish to continue)

```csharp
public Task InitAsync(PluginInitContext context)
Expand Down
2 changes: 1 addition & 1 deletion API-Reference/Flow.Launcher.Plugin/IAsyncReloadable.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# IAsyncReloadable interface

This interface is to indicate and allow plugins to asyncronously reload their in memory data cache or other mediums when user makes a new change that is not immediately captured. For example, for BrowserBookmark and Program plugin does not automatically detect when a user added a new bookmark or program, so this interface's function is exposed to allow user manually do the reloading after those new additions. The command that allows user to manual reload is exposed via Plugin.Sys, and it will call the plugins that have implemented this interface.
This interface is to indicate and allow plugins to asynchronously reload their in memory data cache or other mediums when user makes a new change that is not immediately captured. For example, for BrowserBookmark and Program plugin does not automatically detect when a user added a new bookmark or program, so this interface's function is exposed to allow user manually do the reloading after those new additions. The command that allows user to manual reload is exposed via Plugin.Sys, and it will call the plugins that have implemented this interface.

```csharp
public interface IAsyncReloadable : IFeatures
Expand Down
2 changes: 1 addition & 1 deletion API-Reference/Flow.Launcher.Plugin/IPlugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Synchronous Plugin Model for Flow Launcher

If the Querying or Init method requires high IO transmission or performaing CPU intense jobs (performing better with cancellation), please try the IAsyncPlugin interface
If the Querying or Init method requires high IO transmission or performing CPU intense jobs (performing better with cancellation), please try the IAsyncPlugin interface

```csharp
public interface IPlugin : IAsyncPlugin
Expand Down
2 changes: 1 addition & 1 deletion API-Reference/Flow.Launcher.Plugin/IPlugin/Query.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Querying when user's search changes

This method will be called within a Task.Run, so please avoid synchrously wait for long.
This method will be called within a Task.Run, so please avoid synchronously wait for long.

```csharp
public List<Result> Query(Query query)
Expand Down
10 changes: 5 additions & 5 deletions API-Reference/Flow.Launcher.Plugin/IPublicAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ public interface IPublicAPI
| [FuzzySearch](IPublicAPI/FuzzySearch.md)(…) | Fuzzy Search the string with the given query. This is the core search mechanism Flow uses |
| [GetAllPlugins](IPublicAPI/GetAllPlugins.md)() | Get all loaded plugins |
| [GetTranslation](IPublicAPI/GetTranslation.md)(…) | Get translation of current language You need to implement IPluginI18n if you want to support multiple languages for your plugin |
| [HttpDownloadAsync](IPublicAPI/HttpDownloadAsync.md)(…) | Download the specific url to a cretain file path |
| [HttpGetStreamAsync](IPublicAPI/HttpGetStreamAsync.md)(…) | Http download the spefic url and return as stream |
| [HttpGetStringAsync](IPublicAPI/HttpGetStringAsync.md)(…) | Http download the spefic url and return as string |
| [HttpDownloadAsync](IPublicAPI/HttpDownloadAsync.md)(…) | Download the specific url to a certain file path |
| [HttpGetStreamAsync](IPublicAPI/HttpGetStreamAsync.md)(…) | Http download the specific url and return as stream |
| [HttpGetStringAsync](IPublicAPI/HttpGetStringAsync.md)(…) | Http download the specific url and return as string |
| [LoadSettingJsonStorage&lt;T&gt;](IPublicAPI/LoadSettingJsonStorage.md)() | Load JsonStorage for current plugin's setting. This is the method used to load settings from json in Flow. When the file is not exist, it will create a new instance for the specific type. |
| [LogDebug](IPublicAPI/LogDebug.md)(…) | Log debug message Message will only be logged in Debug mode |
| [LogException](IPublicAPI/LogException.md)(…) | Log an Exception. Will throw if in debug mode so developer will be aware, otherwise logs the eror message. This is the primary logging method used for Flow |
| [LogException](IPublicAPI/LogException.md)(…) | Log an Exception. Will throw if in debug mode so developer will be aware, otherwise logs the error message. This is the primary logging method used for Flow |
| [LogInfo](IPublicAPI/LogInfo.md)(…) | Log info message |
| [LogWarn](IPublicAPI/LogWarn.md)(…) | Log warning message |
| [OpenDirectory](IPublicAPI/OpenDirectory.md)(…) | Open directory in an explorer configured by user via Flow's Settings. The default is Windows Explorer |
| [OpenSettingDialog](IPublicAPI/OpenSettingDialog.md)() | Open setting dialog |
| [OpenUrl](IPublicAPI/OpenUrl.md)(…) | Opens the url. The browser and mode used is based on what's configured in Flow's default browser settings. |
| [RegisterGlobalKeyboardCallback](IPublicAPI/RegisterGlobalKeyboardCallback.md)(…) | Register a callback for Global Keyboard Event |
| [ReloadAllPluginData](IPublicAPI/ReloadAllPluginData.md)() | Reloads any Plugins that have the IReloadable implemented. It refeshes Plugin's in memory data with new content added by user. |
| [ReloadAllPluginData](IPublicAPI/ReloadAllPluginData.md)() | Reloads any Plugins that have the IReloadable implemented. It refreshes Plugin's in memory data with new content added by user. |
| [RemoveActionKeyword](IPublicAPI/RemoveActionKeyword.md)(…) | Remove ActionKeyword for specific plugin |
| [RemoveGlobalKeyboardCallback](IPublicAPI/RemoveGlobalKeyboardCallback.md)(…) | Remove a callback for Global Keyboard Event |
| [RestartApp](IPublicAPI/RestartApp.md)() | Restart Flow Launcher |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# IPublicAPI.HttpDownloadAsync method

Download the specific url to a cretain file path
Download the specific url to a certain file path

```csharp
public Task HttpDownloadAsync(string url, string filePath, CancellationToken token = default)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# IPublicAPI.HttpGetStreamAsync method

Http download the spefic url and return as stream
Http download the specific url and return as stream

```csharp
public Task<Stream> HttpGetStreamAsync(string url, CancellationToken token = default)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# IPublicAPI.HttpGetStringAsync method

Http download the spefic url and return as string
Http download the specific url and return as string

```csharp
public Task<string> HttpGetStringAsync(string url, CancellationToken token = default)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# IPublicAPI.LogException method

Log an Exception. Will throw if in debug mode so developer will be aware, otherwise logs the eror message. This is the primary logging method used for Flow
Log an Exception. Will throw if in debug mode so developer will be aware, otherwise logs the error message. This is the primary logging method used for Flow

```csharp
public void LogException(string className, string message, Exception e,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# IPublicAPI.ReloadAllPluginData method

Reloads any Plugins that have the IReloadable implemented. It refeshes Plugin's in memory data with new content added by user.
Reloads any Plugins that have the IReloadable implemented. It refreshes Plugin's in memory data with new content added by user.

```csharp
public Task ReloadAllPluginData()
Expand Down
2 changes: 1 addition & 1 deletion API-Reference/Flow.Launcher.Plugin/ISavable.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ISavable interface

Save addtional plugin data. Inherit this interface if additional data e.g. cache needs to be saved, Otherwise if LoadSettingJsonStorage or SaveSettingJsonStorage has been callded, plugin settings will be automatically saved (see Flow.Launcher/PublicAPIInstance.SavePluginSettings) by Flow
Save additional plugin data. Inherit this interface if additional data e.g. cache needs to be saved, Otherwise if LoadSettingJsonStorage or SaveSettingJsonStorage has been called, plugin settings will be automatically saved (see Flow.Launcher/PublicAPIInstance.SavePluginSettings) by Flow

```csharp
public interface ISavable : IFeatures
Expand Down
4 changes: 2 additions & 2 deletions API-Reference/Flow.Launcher.Plugin/Query.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ public class Query
| [SecondToEndSearch](Query/SecondToEndSearch.md) { get; } | strings from second search (including) to last search |
| [ThirdSearch](Query/ThirdSearch.md) { get; } | Return third search split by space if it has |
| override [ToString](Query/ToString.md)() | |
| const [ActionKeywordSeparator](Query/ActionKeywordSeparator.md) | User can set multiple action keywords seperated by ';' |
| const [ActionKeywordSeparator](Query/ActionKeywordSeparator.md) | User can set multiple action keywords separated by ';' |
| const [GlobalPluginWildcardSign](Query/GlobalPluginWildcardSign.md) | '*' is used for System Plugin |
| const [TermSeparator](Query/TermSeparator.md) | Query can be splited into multiple terms by whitespace |
| const [TermSeparator](Query/TermSeparator.md) | Query can be splitted into multiple terms by whitespace |

## See Also

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Query.ActionKeywordSeparator field

User can set multiple action keywords seperated by ';'
User can set multiple action keywords separated by ';'

```csharp
public const string ActionKeywordSeparator;
Expand Down
2 changes: 1 addition & 1 deletion API-Reference/Flow.Launcher.Plugin/Query/TermSeparator.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Query.TermSeparator field

Query can be splited into multiple terms by whitespace
Query can be splitted into multiple terms by whitespace

```csharp
public const string TermSeparator;
Expand Down
2 changes: 1 addition & 1 deletion _coverpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
> Fast and fluid productivity tool of choice that helps your workflow.
- Search Everything
- Plugin Suppport
- Plugin Support
- Native Shell Support

[GitHub](https://github.com/Flow-Launcher/Flow.Launcher)
Expand Down
14 changes: 7 additions & 7 deletions develop-dotnet-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ Flow is written in C#, so plugins written in .Net platform can directly communic

## Initialization

For C# Plugins, We recommand you use the [dotnet template](https://github.com/Flow-Launcher/dotnet-template) to generate a plugin template.
For C# Plugins, We recommend you use the [dotnet template](https://github.com/Flow-Launcher/dotnet-template) to generate a plugin template.

In order to be recongized as a Flow DotNet plugin, the directory needs to have at least two files
In order to be recognized as a Flow DotNet plugin, the directory needs to have at least two files
1. [`plugin.json`](plugin.json.md)
2. A Dotnet Assembly that implements **[IPlugin](API-Reference/Flow.Launcher.Plugin/iplugin.md)** or **[IAsyncPlugin](API-Reference/Flow.Launcher.Plugin/iasyncplugin.md)** (remember to refrence [Flow.Launcher.Plugin](https://www.nuget.org/packages/Flow.Launcher.Plugin/) by Nuget). The plugin template will add the reference and create a `Main.cs` that implements `IPlugin`.
2. A Dotnet Assembly that implements **[IPlugin](API-Reference/Flow.Launcher.Plugin/iplugin.md)** or **[IAsyncPlugin](API-Reference/Flow.Launcher.Plugin/iasyncplugin.md)** (remember to reference [Flow.Launcher.Plugin](https://www.nuget.org/packages/Flow.Launcher.Plugin/) by Nuget). The plugin template will add the reference and create a `Main.cs` that implements `IPlugin`.

Find our API Reference [here](API-Reference/)

Expand All @@ -21,13 +21,13 @@ The `Main`class that implements **[IPlugin](API-Reference/Flow.Launcher.Plugin/i
1. `void Init(PluginInitContext context)`
- [PluginInitContext](https://github.com/Flow-Launcher/Flow.Launcher/blob/master/API-Reference/Flow.Launcher.Plugin/PluginInitContext.cs) exposes some API from Flow and an metadata object for your plugin.
- It will be invoked before the invocation of `Query`, so you can do some preparation here.
- We recommand you do expensive operations in this method instead of Object Constructor because this method will be executed in parallel with other plugins.
- We recommend you do expensive operations in this method instead of Object Constructor because this method will be executed in parallel with other plugins.
2. `List<Result> Query(Query query)`
- `Query` will be invoked when user activate this plugin with specific ActionKeyword.
- A `List` of [Result](/API-Reference/Flow.Launcher.Plugin/result.md) object should be returned.

**[IAsyncPlugin](API-Reference/Flow.Launcher.Plugin/iasyncplugin.md)** is the async version of **[IPlugin](API-Reference/Flow.Launcher.Plugin/iplugin.md)**
- Instead of implmenting `Init` and `Query`, you will need to implement `InitAsync`and `QueryAsync`, which use `Task`,`Task<List<Result>` as return value to allow using `async/await` strategy
- Instead of implementing `Init` and `Query`, you will need to implement `InitAsync`and `QueryAsync`, which use `Task`,`Task<List<Result>` as return value to allow using `async/await` strategy
- `QueryAsync` provides a `CancellationToken token` to allow you to check whether user has typed a new query.


Expand All @@ -48,8 +48,8 @@ The return value of `LoadContextMenus` is similar to Results from `Query/QueryAs

### [IPluginI18n](/API-Reference/Flow.Launcher.Plugin/iplugini18n.md)

**IPluginI18n** means the plugin has been internationalized. Therefore, Flow will load the additional lauguage resources from `/Languages` when loading the plugin.
By implementing this interface with additional language files, Flow will be able to load plugin-sepcified localized language resources. You will be able to get the translated text with `IPublicAPI.GetTranslation(string key)`.
**IPluginI18n** means the plugin has been internationalized. Therefore, Flow will load the additional language resources from `/Languages` when loading the plugin.
By implementing this interface with additional language files, Flow will be able to load plugin-specific localized language resources. You will be able to get the translated text with `IPublicAPI.GetTranslation(string key)`.

#### Language Resource

Expand Down
2 changes: 1 addition & 1 deletion json-rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ API is located [here](https://github.com/Flow-Launcher/Flow.Launcher/blob/master
- `Flow.Launcher.StopLoadingBar`: stop loading animation in flow launcher
- `Flow.Launcher.ReloadAllPluginData`: reload all flow launcher plugins

### JSON RPC Formating
### JSON RPC Formatting

```json
{
Expand Down
4 changes: 2 additions & 2 deletions nodejs-develop-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ Although not a hard requirement, this guide will use Node.js to run the TypeScri
When building a Node.js plugins there are several things to be mindful of:

* The most important thing is we do not expect users to have to manually install the dependencies via npm because we aim to provide a seamless experience for them. This can be achieved by adding the following three things to your project:
1. Add a GitHub workflow- use a GitHub workflow that will install all your plugin's depedencies including the modules inside a folder called 'node_modules'.
1. Add a GitHub workflow- use a GitHub workflow that will install all your plugin's dependencies including the modules inside a folder called 'node_modules'.
2. Publish all as a zip- zip up your project including a lib directory that contains the modules and publish it to GitHub Releases page.
3. Point your module path to the node_modules directory- reference all the modules to that directory.

* Users can use their system-installed Node.js with Flow Launcher, but in most circumstances, they will most likely be using Flow Launcher's download of [Node.js](https://nodejs.org/dist/v16.18.0/node-v16.18.0-win-x64.zip)). This download of portable Node.js version is isolated from the user's system and can be simply removed.

### Simple Example
Have a look at this simple example plugin [here](https://github.com/Flow-Launcher/Flow.Launcher.Plugin.HelloWorldNodeJS), notice it has a folder called '.github/workflows' and a file called 'Publish Release.yml'. This is the workflow file that GitHub Workflow uses to run the CICD for the project. Moving out of that folder you can go into the [main.js](https://github.com/Flow-Launcher/Flow.Launcher.Plugin.HelloWorldNodeJS/blob/main/main.js) file, this is the entry file for your plugin.
Have a look at this simple example plugin [here](https://github.com/Flow-Launcher/Flow.Launcher.Plugin.HelloWorldNodeJS), notice it has a folder called '.github/workflows' and a file called 'Publish Release.yml'. This is the workflow file that GitHub Workflow uses to run the CI/CD for the project. Moving out of that folder you can go into the [main.js](https://github.com/Flow-Launcher/Flow.Launcher.Plugin.HelloWorldNodeJS/blob/main/main.js) file, this is the entry file for your plugin.
Loading

0 comments on commit c8630c6

Please sign in to comment.