Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anezih/stardictnet
Rudimentary class lib that can read and write StarDict dictionaries. Also, a Powershell module which acts as a very basic cli StarDict dictionary lookup program.
https://github.com/anezih/stardictnet
cli dictzip powershell stardict
Last synced: about 2 months ago
JSON representation
Rudimentary class lib that can read and write StarDict dictionaries. Also, a Powershell module which acts as a very basic cli StarDict dictionary lookup program.
- Host: GitHub
- URL: https://github.com/anezih/stardictnet
- Owner: anezih
- Created: 2023-04-13T19:13:32.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-27T19:58:52.000Z (8 months ago)
- Last Synced: 2024-05-28T03:30:49.733Z (8 months ago)
- Topics: cli, dictzip, powershell, stardict
- Language: C#
- Homepage:
- Size: 4.75 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# StarDictNet
Rudimentary class lib that can read and write StarDict dictionaries.
Also, a Powershell module which acts as a very basic cli StarDict dictionary lookup program.# Using Powershell Module
- Add full path of *.ifo files of dictionaries to global variables:
```powershell
$Global:Dict1 = Set-Dict "full/path/to/somedict.ifo"
```
- Optionally, add them to arrays in order to create dictionary groups:
```powershell
$Global:English = @($Dict1, $Dict2, $Dict3, $Dict4)
$Global:French = @($Dict5, $Dict6, $Dict7)
```- At lines 100 and 154 add full path of **elinks** if it is not in the **PATH**. elinks enable us to display HTML nicely on the terminal.
- Put StarDict.psm1 and StarDictNet.dll right next to your Microsoft.PowerShell_profile.ps1
- Add these 2 lines to your Microsoft.PowerShell_profile.ps1:
```powershell
Import-Module $PSScriptRoot\StarDict.psm1
Set-DictSession
```* Lookup words:
- Lookup at a single dictionary:
```powershell
$Dict1 | Get-Def Beleaguered -IgnoreCase <# will match beleaguered also #>
$Dict1 | Get-DefRegex "^beleag*" <# get words that starts with beleag #>
$FrenchDict1 | Get-Def "eutes" -IgnoreDiacritics <# instead of eûtes #>
```
- Lookup at multiple dictionaries:
````powershell
$English | Get-BatchDef "daredevil"
$Turkce | Get-BatchDefRegex "^\b(\w+)\s\1$" <# search reduplicative words with regex #>
````
# Screenshots
![Ignore diacritics](/img/ignore_diacritics.png)
*Ignore diacritics while searching.*![Batch lookup](/img/daredevil.png)
*Batch lookup*![Query with regular expressions](/img/regex.png)
*Query with regular expressions*# Note
Windows elinks build is provided as-is, use at your own risk.