Skip to content

Commit fe6ccae

Browse files
authored
Merge pull request #3 from cibere/v2.0.1
v2.0.1
2 parents 58611bf + a18d84e commit fe6ccae

22 files changed

Lines changed: 413 additions & 117 deletions
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,32 @@
1-
name: Publish Release
1+
name: Publish and Release
22

33
on:
4-
push:
5-
branches: [ main ]
6-
paths:
7-
- 'plugin.json'
84
workflow_dispatch:
95

106
jobs:
117
publish:
128
runs-on: ubuntu-latest
139
env:
1410
python_ver: 3.11
11+
permissions:
12+
contents: write
1513

1614
steps:
1715
- uses: actions/checkout@v2
18-
16+
1917
- name: Set up Python ${{ matrix.python-version }}
2018
uses: actions/setup-python@v2
2119
with:
2220
python-version: ${{ matrix.python-version }}
21+
22+
- name: Run generator file
23+
run: python generate_plugin_file.py
2324

2425
- name: get version
2526
id: version
2627
uses: notiz-dev/github-action-json-property@release
2728
with:
28-
path: 'plugin.json'
29+
path: 'data.json'
2930
prop_path: 'Version'
3031

3132
- run: echo ${{steps.version.outputs.prop}}
@@ -38,9 +39,8 @@ jobs:
3839
3940
- name: Publish
4041
if: success()
41-
uses: softprops/action-gh-release@v1
42+
uses: softprops/action-gh-release@v2
4243
with:
4344
files: 'Flow.Launcher.Plugin.WordNikDictionary.zip'
4445
tag_name: "v${{steps.version.outputs.prop}}"
45-
env:
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
body_path: 'CHANGELOG.txt'

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ __pycache__/*
22
venv/*
33
lib/*
44
wordnik.logs
5-
*.pyc
5+
*.pyc
6+
WorknikDictionary/word_list.txt

CHANGELOG.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# v2.1.0
2+
- Rewrite error handling
3+
- Update `change_query` function to get ActionKeyword from `plugin.json`
4+
- Add autocomplete/spellcheck for words that aren't found to check for possible misspellings (can be turned off in settings due to it being kind of slow).
5+
- Make `word_list.txt` not automatically download incase of the use of a custom word list, or not using the feature at all to use less storage.
6+
- Support for custom word lists.
7+
- Add search modifier selector
8+
- Invalid search modifier error now points to this
9+
- Add parts of speech selector
10+
- Remove canonical option due to it not doing anything
11+
- Fix bug with some queries returning errors due to the plugin attempting to log unicode characters with the wrong encoding.
12+
- Add `scrable` search modifier to get the scrable score of a word.
27.2 KB
Loading

Images/scrabble_score_example.png

26.9 KB
Loading

Images/select_pos_menu_example.png

66.3 KB
Loading
59.3 KB
Loading

Images/settings_menu.png

65.3 KB
Loading
72.5 KB
Loading

README.md

Lines changed: 110 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,80 @@
11
# Flow.Launcher.Plugin.WordNikDictionary
2-
This is a plugin for [Flow Launcher](https://github.com/Flow-Launcher/Flow.Launcher) that lets you easily see the definitions of words using [wordnik](https://wordnik.com).
2+
This is an overcomplicated and feature-packed plugin for [Flow Launcher](https://github.com/Flow-Launcher/Flow.Launcher) that lets you easily see the definitions (among other things) of words using [wordnik](https://wordnik.com).
3+
4+
## Table of Contents
5+
1. [Get an API Key](#get-an-api-key)
6+
2. Installation
7+
- [Install via Package Manager](#install-via-package-manager)
8+
- [Manual Installation](#manual-installation)
9+
- [Install from a previous release](#install-from-a-previous-release)
10+
- [Download and build development version](#download-and-build-development-version)
11+
3. [Features](#features)
12+
- [Feature List](#feature-list)
13+
4. [Settings Menu](#settings-menu)
314

415
## Get an API Key
516
To get an API key, head to [developer.wordnik.com](https://developer.wordnik.com/), and create an account. Once you've created your account, you'll be able to fill out a form to request an api key.
617

18+
## Install via Package Manager
19+
20+
To Install Wordnik Dictionary through Flow's Plugin Manager, run the following command: `pm install wordnik dictionary`.
21+
22+
## Manual Installation
23+
> [!WARNING]
24+
> This method is not recommended, only do this if you know what your doing.
25+
### Install from a previous release
26+
27+
1. Download the zipped release file.
28+
29+
To download a previously released version, head to the [releases page](https://github.com/cibere/Flow.Launcher.Plugin.WordNikDictionary/releases), find the version you want, and download the zip file.
30+
31+
2. Extract the zip file into your plugins folder.
32+
33+
You can access your userdata folder through the `Flow Launcher UserData Folder` command in the system commands plugin, from there go into the `Plugins` folder, and create a new folder for your release. Extract the contents of the zip folder into the new folder you've made.
34+
35+
3. Restart Flow Launcher
36+
37+
Finally you want to restart flow launcher. You can do this via the `Restart Flow Launcher` command in the system commands plugin.
38+
39+
### Download and build development version
40+
41+
1. Head to your plugins folder.
42+
43+
You can access your userdata folder through the `Flow Launcher UserData Folder` command in the system commands plugin, from there go into the `Plugins` folder.
44+
45+
2. Clone the repository.
46+
47+
> [!NOTE]
48+
> [git](https://git-scm.com/) must be installed for this
49+
50+
Now you must clone the repository, which can be done with the following command: `git clone https://github.com/cibere/Flow.Launcher.Plugin.WordNikDictionary`.
51+
52+
3. Setup your environment
53+
54+
Head into the newly created folder containing the plugin, and create and activate a venv. Then run the `install_packages.bat` file from that console. That file will update pip, install the runtime libraries, and install the development libraries.
55+
56+
4. Restart Flow Launcher
57+
58+
Finally you want to restart flow launcher. You can do this via the `Restart Flow Launcher` command in the system commands plugin.
59+
60+
761
## Features
862

963
### Feature List
1064
1. [Get the definition of a word](#get-the-definition-of-a-word)
1165
2. [Get information about definition of a word](#get-information-about-definition-of-a-word)
1266
3. [Search Modifiers](#search-modifiers)
1367
- [Filter by parts of speech](#filter-by-parts-of-speech)
68+
- [Parts of Speech Selector](#parts-of-speech-selector)
1469
- [Get the syllables of a word](#get-the-syllables-of-a-word)
1570
- [Get similiar word by category](#get-similiar-word-by-category)
16-
4. [Advanced Error Handler](#advanced-error-handler)
71+
- [Search Modifier Selection Menu](#search-modifier-selection-menu)
72+
- [Get Scrabble Score](#get-scrabble-score)
73+
4. [Autocomplete Miss-spelled Words](#autocomplete-miss-spelled-words)
74+
5. [Advanced Error Handler](#advanced-error-handler)
1775
- [Expected Errors](#expected-errors)
1876
- [Unexpected Errors](#unexpected-errors)
77+
- [Invalid Search Modifier](#invalid-search-modifier)
1978

2079
### Get the definition of a word
2180
Get a list of definitions for your word from various sources. Syntax: `def word`
@@ -33,15 +92,32 @@ List of acceptable parts of speech modifiers:
3392
noun, adjective, verb, adverb, interjection, pronoun, preposition, abbreviation, affix, article, auxiliary-verb, conjunction, definite-article, family-name, given-name, idiom, imperative, noun-plural, noun-posessive, past-participle, phrasal-prefix, proper-noun, proper-noun-plural, proper-noun-posessive, suffix, verb-intransitive, verb-transitive
3493
```
3594
![Example showing the useage of the parts of speech search modifier with the `def vague!noun` query](Images/filter_by_part_of_speech_example.png)
95+
#### Parts of Speech Selector
96+
To select a part of speech from the list of acceptable ones, you can use the `def word!select-pos` command.
97+
![](Images/select_pos_menu_example.png)
3698
#### Get the syllables of a word
3799
We can use the `syllables` search modifier to get the syllables of a word. Syntax: `def word!syllables`
38100
![Example showing the result of the search `def developer!syllable`](Images/get_syllables_example.png)
39101
#### Get categories of similiar words
40102
To find the categories of avalible similiar words for a given word, use the following command: `def word!similiar`. To see all of the words in a given category, see the section below.
103+
41104
![](Images/find_similiar_word_categories_example.png)
42105
#### Get similiar word by category
43106
To find all of the words that are similiar to a word in a specific category, use the following command: `def word!rel-category`. For a list of avalible categories for a given word, see the above section.
44107
![](Images/find_similiar_words_by_category_example.png)
108+
#### Search Modifier Selection Menu
109+
To see a list of available search modifiers available, use the `def word!select-modifier` command. From there you have quick access to the various modifiers, and the [Parts of Speech Selector Menu](#parts-of-speech-selector).
110+
![](Images/select_search_modifier_menu.png)
111+
#### Get Scrabble Score
112+
You can get the scrabble score of a word by using the `scrabble` modifier like so: `def word!scrabble`. If a word is invalid or not found, a score of `0` is shown.
113+
![](Images/scrabble_score_example.png)
114+
115+
### Autocomplete Miss-spelled Words
116+
If you misspell a word, wordnik dictionary uses a list of over 370 thousand words to try and figure out what you were trying to spell, and ranks them by how certain it is. Though the source for the list of words and definitions are different! So there may be differences in the data.
117+
> [!NOTE]
118+
> When attempting to use this feature for the first time, you will be prompted to either open up the settings menu to choose the path of a custom word list file, or download one from [dwyl on github](https://github.com/dwyl/english-words).
119+
120+
![](Images/unknown_word_spellcheck_example.png)
45121

46122
### Advanced Error Handler
47123

@@ -52,4 +128,35 @@ Expected errors will return a short, simple, and stylish error message.
52128
#### Unexpected Errors
53129
When unexpected errors occur, our error handler redirects it to the logs and prompts you to notify us by creating a github issue or discord thread with the logfile.
54130

55-
https://github.com/cibere/Flow.Launcher.Plugin.WordNikDictionary/raw/refs/heads/v2/Images/unexpected_error_handler_showcase.mp4
131+
https://github.com/cibere/Flow.Launcher.Plugin.WordNikDictionary/raw/refs/heads/main/Images/unexpected_error_handler_showcase.mp4
132+
133+
### Invalid Search Modifier
134+
When an invalid advanced search modifier is given, a simple error message is shown, with quick access to the [Search Modifier Selection Menu](#search-modifier-selection-menu)
135+
![](Images/invalid_search_modifier_example.png)
136+
137+
## Settings Menu
138+
1. Action Keyword
139+
140+
The keyword that activates the plugin, defaults to `def` with the stable release, and `ddef` with the dev version.
141+
> [!WARNING]
142+
> Changing this is NOT recommended. Currently, many QOL features require these keywords to stay at the default, otherwise some query changing options will not work properly.
143+
144+
2. Wordnik API Key
145+
146+
Head to https://developer.wordnik.com to get your API key.
147+
148+
3. Number of results to display.
149+
150+
Number of results to display. Defaults to 20, you must give an integer.
151+
152+
4. Autocomplete Miss-spelled Words
153+
154+
If marked yes, wordnik dictionary will attempt to find which word you were trying to spell if a word was not found. This is toggleable because it can be really slow, and you may just want to know if a word was found or not.
155+
Defaults to checked.
156+
157+
5. Location of word list file
158+
159+
If you want to use a custom list of words for the autocomplete misspelling feature, you can. Just put the path to the file here, and reload plugin data. Make sure each word is on it's on line.
160+
Default is blank, and blank means the default file is used. This setting on does anything if the [Autocomplete miss-spelled words setting](#autocomplete-miss-spelled-words) is checked.
161+
162+
![](Images/settings_menu.png)

0 commit comments

Comments
 (0)