Skip to content

Commit de57f00

Browse files
committed
v4.0.5 (GUI)
1 parent da13d41 commit de57f00

File tree

12 files changed

+359
-23
lines changed

12 files changed

+359
-23
lines changed

Assets/Legacy1_CommandLine.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Configuration
2+
3+
## Search Engines
4+
5+
`-se <engines>` _(parameter)_
6+
7+
Specifies engines with a comma-separated list of search engine names
8+
9+
## Priority Engines
10+
11+
`-pe <engines>` _(parameter)_
12+
13+
Specifies priority engines with a comma-separated list of search engine names
14+
15+
## Filtering
16+
17+
`-f` _(switch)_
18+
19+
Enables filtering of results (omit to disable)
20+
21+
# Input
22+
23+
The last parameter should be the image query.
24+
25+
# Examples
26+
27+
`smartimage -se All -pe SauceNao 'https://litter.catbox.moe/x8jfkj.jpg'`
28+
29+
Runs a search of `https://litter.catbox.moe/x8jfkj.jpg` with `All` search engines, and `SauceNao` as a priority engine.
30+
31+
<br></br>
32+
33+
`smartimage 'C:\Users\<User>\Downloads\image.jpg'`
34+
35+
Runs a search of `C:\Users\<User>\Downloads\image.jpg` with configuration from the config file.

Assets/Legacy1_Configuration.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Settings
2+
3+
**SmartImage** is highly customizable. The following table lists config options.
4+
5+
| Setting | Description |
6+
|--|--|
7+
| Search engines | Engines to use when searching. |
8+
| Priority engines | Engines whose results are opened in the browser.|
9+
| Filtering | Hides low-quality and unsuccessful results. |
10+
| Notification | Displays a toast notification with result information once the search is completed.|
11+
| Notification image | Includes a preview image in the toast notification. |
12+
| Context menu | Integrates **SmartImage** into the context menu (right-click menu). |
13+
14+
These settings can be configured in different ways:
15+
16+
- The main menu
17+
- The command line
18+
19+
20+
# Engines
21+
22+
## Options
23+
24+
Search engine names and configuration:
25+
26+
| Real Name | Option Name |
27+
| --------------- | --------------- |
28+
| (All) | `All` |
29+
| (None) | `None` |
30+
| (Auto) | `Auto` |
31+
| (Artwork) | `Artwork` |
32+
| SauceNao | `SauceNao` |
33+
| ImgOps | `ImgOps` |
34+
| Google Images | `GoogleImages` |
35+
| TinEye | `TinEye` |
36+
| IQDB | `Iqdb` |
37+
| trace.moe | `TraceMoe` |
38+
| Karma Decay | `KarmaDecay` |
39+
| Yandex | `Yandex` |
40+
| Bing | `Bing` |
41+
| Tidder | `Tidder` |
42+
| Ascii2D | `Ascii2D` |
43+
44+
Special options:
45+
- `All`: Use all available engines
46+
- `None`: Use no engines<sup>1</sup>
47+
- `Auto`: Use the best engine result<sup>1</sup>
48+
- `Artwork`: The engines *SauceNao*, *IQDB*, *Ascii2D*
49+
50+
<sup>1</sup> This option can only be used with priority engine options. They cannot be used for the main search engine options.
51+
52+
## Search Engines
53+
54+
These options are the engines used to perform searches.
55+
56+
## Priority Search Engines
57+
58+
These options are the engines whose results will be opened in your browser. If `Auto` is used, the best result is opened. If `None` is used,
59+
no results will be opened in the browser.
60+
61+
62+
# Behavior
63+
64+
Configuration is loaded in this order:
65+
1. Configuration file (`SmartImage.cfg`)
66+
2. Command line parameters (if specified)
67+
68+
Therefore, command line parameters have precedence over the config file. For example, if the config file designates `SauceNao` as a priority engine but the command line argument `-pe Iqdb` is specified, `Iqdb` will take precedence.
69+
70+
This can be useful when you want to run a search with certain settings but want to keep your personalized configuration intact.

Assets/Legacy1_Home.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
```
2+
____ _ ___
3+
/ ___| _ __ ___ __ _ _ __| |_|_ _|_ __ ___ __ _ __ _ ___
4+
\___ \| '_ ` _ \ / _` | '__| __|| || '_ ` _ \ / _` |/ _` |/ _ \
5+
___) | | | | | | (_| | | | |_ | || | | | | | (_| | (_| | __/
6+
|____/|_| |_| |_|\__,_|_| \__|___|_| |_| |_|\__,_|\__, |\___|
7+
|___/
8+
```
9+
10+
Welcome to the **SmartImage** wiki!
11+
12+
# Installation
13+
14+
## Requirements
15+
16+
The only requirements are .NET 6 and Windows. You can check if .NET 6 is installed by running
17+
one of the following commands:
18+
19+
`dotnet --list-runtimes`: <br />
20+
_Output:_ `Microsoft.NETCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]`
21+
22+
`dotnet --list-sdks`: <br />
23+
_Output:_ `6.0.100 [C:\Program Files\dotnet\sdk]`
24+
25+
If the version major number is 6 (i.e., first number in the version), then .NET 6 is installed.
26+
27+
***
28+
29+
**SmartImage** must be added to the system PATH (*`%PATH%`*) environment variable, otherwise context menu integration will not work. **SmartImage** will automatically do this for you. Otherwise, you can read about how to manually do this [here](https://superuser.com/questions/949560/how-do-i-set-system-environment-variables-in-windows-10).
30+
31+
If the IME (system language) is a non-Romance language (e.g., Japanese or Chinese), some features may not work correctly (i.e., keyboard input, context menu integration). To resolve this, set the IME to English.
32+
33+
# Engines
34+
35+
Supported search engines and notes:
36+
37+
- <img src="https://saucenao.com/favicon.ico" width="16" height="16"/> [SauceNao](https://saucenao.com/)
38+
- Multi-service image search
39+
- **Use case:** Finding sauce, usually artwork
40+
- <img src="https://iqdb.org/favicon.ico" width="16" height="16"/> [IQDB](https://iqdb.org/)
41+
- Multi-service image search
42+
- Similar to *SauceNao*
43+
- **Use case:** Finding sauce, usually artwork
44+
- <img src="https://trace.moe/favicon128.png" width="16" height="16"/> [trace.moe](https://trace.moe/)
45+
- Multi-database image search
46+
- **Use case:** Identifying anime from a screenshot
47+
- <img src="http://karmadecay.com/favicon.ico" width="16" height="16"/> [Karma Decay](http://karmadecay.com/)
48+
- Reddit image search
49+
- **Disclaimer:** Very slow
50+
- <img src="http://imgops.com/favicon.ico" width="16" height="16"/> [ImgOps](http://imgops.com/)
51+
- Multi-service image search
52+
- **Use case:** Performing multiple image operations
53+
- **Restrictions:** Max upload size is 5MB
54+
- <img src="https://images.google.com/favicon.ico" width="16" height="16"/> [Google Images](https://images.google.com/)
55+
- General-purpose image search
56+
- <img src="https://tineye.com/favicon.ico" width="16" height="16"/> [TinEye](https://tineye.com/)
57+
- General-purpose image search
58+
- Generally better than *Google Images*
59+
- <img src="https://yandex.com/favicon.ico" width="16" height="16"/> [Yandex](https://yandex.com/images/)
60+
- General-purpose image search
61+
- **Disclaimer:** Russian
62+
- <img src="https://www.bing.com/favicon.ico" width="16" height="16"/> [Bing](https://www.bing.com/images/)
63+
- General-purpose image search
64+
- <img src="http://tidder.xyz/favicon.ico" width="16" height="16"/> [Tidder](http://tidder.xyz/)
65+
- Reddit image search
66+
- Generally better than *Karma Decay*
67+
- <img src="https://ascii2d.net/favicon.ico" width="16" height="16"/> [Ascii2D](https://ascii2d.net/)
68+
- Multi-service image search
69+
- Similar to *SauceNao* and *IQDB*
70+
- **Use case:** Finding sauce, usually artwork
71+
72+
***
73+
74+
75+
# Usage
76+
77+
<b>SmartImage</b> can be used in multiple ways:
78+
79+
- Open the program normally (double click) and you can use the program in a user-friendly way. You can then drag and drop your image into the command prompt and run a search.
80+
81+
<p align="center">
82+
<img src="https://github.com/Decimation/SmartImage/raw/master/Examples/Demo%203.gif" width="636.35" height="370.7">
83+
</p>
84+
85+
- Right-click on an image (once the context menu integration is set up) and select the <b>SmartImage</b> option to immediately perform a search.
86+
87+
<p align="center">
88+
<img src="https://github.com/Decimation/SmartImage/raw/master/Examples/Demo%201.gif" width="640" height="360">
89+
</p>
90+
91+
- Drag and drop an image over the executable to immediately perform a search (functionally the same as right-clicking on an image and using the <b>SmartImage</b> option).
92+
93+
<p align="center">
94+
<img src="https://github.com/Decimation/SmartImage/raw/master/Examples/Demo%202.gif" width="636.35" height="370.7">
95+
</p>
96+
97+
- Use the command line.

Assets/Legacy1_Interface.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Main menu
2+
3+
<img align="right" src="https://github.com/Decimation/SmartImage/raw/master/Examples/Main%20menu.png" width=601 height=316>
4+
5+
<p style="text-align: left;">
6+
7+
8+
- **Run**: Runs a search
9+
- **Engines**: Configures engines
10+
- **Priority engines**: Configures priority engines
11+
- **Filter**: Toggles filtering
12+
- **Notification**: Toggles toast notification
13+
- **Notification image**: Toggles toast notification image
14+
- **Context menu**: Toggles context menu integration
15+
- **Config**: Displays current configuration
16+
- **Info**: Displays program info
17+
- **Update**: Checks and installs new versions
18+
- **Help**: Opens help
19+
20+
21+
<!-- todo
22+
-->
23+
24+
25+
</p>
26+
27+
<br /><br />
28+
29+
# Results
30+
31+
## Result
32+
33+
Once the search is complete, the UI shows extensive information about the search results.
34+
35+
36+
<img align="right" src="https://github.com/Decimation/SmartImage/raw/master/Examples/Example%20search%20results.png" width=591.5 height=391.5>
37+
38+
<p style="text-align: left;">
39+
40+
- **Result**: Most accurate and specific result URL
41+
- **Raw**: Undifferentiated result URL
42+
- **Direct**: Direct image URL
43+
- **Similarity**: Image similarity (delta)
44+
- **Description**: Image description, caption, etc.
45+
- **Site**: Result site<sup>1</sup>
46+
- **Artist**: Image artist<sup>1</sup>
47+
- **Characters**: Character(s) in the image<sup>1</sup>
48+
- **Source**: Image source<sup>1</sup>
49+
- **Resolution**: Image resolution
50+
- **Detail score**: Number of detail fields
51+
- **Other image results**: Other results
52+
53+
</p>
54+
55+
56+
<sup>1</sup> This metadata is usually only for anime or related image results (i.e. *SauceNao*, *IQDB*, *TraceMoe*, etc.)
57+
58+
# Interaction
59+
60+
## General
61+
62+
- Press the option character on the keyboard to open it (i.e., press **0** to open **[0]** or **A** to open **[A]**).
63+
- Press `Escape` to return to the previous interface.
64+
- Press `F1` to show filtered results.
65+
- Press `F5` to refresh the console buffer.
66+
67+
## Results
68+
69+
- Press the result character to open the **Result** URL in your browser.
70+
- Hold down `Ctrl` to search for a direct image link.
71+
- Hold down `Alt` to show more info and results. Certain engines will return multiple results; those can be viewed using this option.
72+
- Hold down `Shift` to open the raw URL.
73+
- Hold down `Ctrl` and `Alt` to download the image.

Assets/Legacy2_Usage.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Input
2+
3+
**SmartImage** can be used in a variety of ways.
4+
- Input text field in the main menu
5+
- Copy/paste text
6+
- Use the *Browse* button to open the file picker dialog
7+
- Context menu
8+
- Use the *Config* button to open the [configuration dialog](https://github.com/Decimation/SmartImage/wiki/Interface#configuration) to toggle context menu integration
9+
- Clipboard
10+
- copying an _image_ or _URI_ outside of the program will automatically populate the input field
11+
- Command line
12+
- Use the `--i` parameter to specify input
13+
14+
# Queries
15+
16+
The value given as [input](#Input) is referred to hereafter as _search query_ or _query_.
17+
18+
* Search queries may be either a _file_ or _URI_.
19+
* All queries must be a recognized image type.
20+
* If query is a _URI_, it must be a direct link (i.e., the payload returned is a binary image). For example, `https://i.imgur.com/zoBIh8t.jpg` returns
21+
an image payload with `Content-Type` as `image/jpeg`.
22+

Assets/Wiki_TOC_Old.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## [Home](https://github.com/Decimation/SmartImage/wiki)
2+
- [Engines](https://github.com/Decimation/SmartImage/wiki/Engines)
3+
- Miscellaneous
4+
- [Reviews](https://github.com/Decimation/SmartImage/wiki/Reviews)
5+
6+
***
7+
8+
## GUI
9+
- [Usage](https://github.com/Decimation/SmartImage/wiki/Usage)
10+
- [Main Menu](https://github.com/Decimation/SmartImage/wiki/Usage#main-menu)
11+
- [Results](https://github.com/Decimation/SmartImage/wiki/Usage#results)
12+
- [Configuration](https://github.com/Decimation/SmartImage/wiki/Usage#configuration)
13+
14+
15+
***
16+
17+
### Legacy²
18+
- [Interface](https://github.com/Decimation/SmartImage/wiki/Interface-(Legacy²))
19+
- [Main Menu](https://github.com/Decimation/SmartImage/wiki/Interface-(Legacy²)#main-menu)
20+
- [Configuration](https://github.com/Decimation/SmartImage/wiki/Interface-(Legacy²)#configuration)
21+
- [Results](https://github.com/Decimation/SmartImage/wiki/Interface-(Legacy²)#results)
22+
- [Usage](https://github.com/Decimation/SmartImage/wiki/Usage-(Legacy²))
23+
- [Input](https://github.com/Decimation/SmartImage/wiki/Usage-(Legacy²)#Input)
24+
25+
***
26+
27+
### [Legacy](https://github.com/Decimation/SmartImage/wiki/Home-(Legacy))¹
28+
<!--
29+
- [Command Line](https://github.com/Decimation/SmartImage/wiki/Command-Line-(Legacy))
30+
- [Configuration](https://github.com/Decimation/SmartImage/wiki/Configuration-(Legacy))
31+
- [Interface](https://github.com/Decimation/SmartImage/wiki/Interface-(Legacy))
32+
-->

SmartImage.Lib 3/Engines/Impl/Search/FluffleEngine.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ public override async Task<SearchResult> GetResultAsync(SearchQuery query, Cance
8080
var item = result.Convert(sr, out var c);
8181
sr.Results.Add(item);
8282
}
83-
83+
84+
sr.Update();
8485
return sr;
8586
}
8687

@@ -91,7 +92,9 @@ protected override async ValueTask<Url> GetRawUrlAsync(SearchQuery query)
9192

9293
public override SearchEngineOptions EngineOption => SearchEngineOptions.Fluffle;
9394

94-
public override void Dispose() { }
95+
public override void Dispose()
96+
{
97+
}
9598

9699
}
97100

SmartImage.Lib 3/SmartImage.Lib.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Configurations>Debug;Release;Test</Configurations>
88
<DefineConstants>JETBRAINS_ANNOTATIONS;TRACE</DefineConstants>
9+
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
910
<PublishTrimmed>True</PublishTrimmed>
1011
<!-- <PublishSingleFile>true</PublishSingleFile> -->
1112
<PublishSingleFile Condition="'$(Configuration)' == 'Release|AnyCPU'">true</PublishSingleFile>

0 commit comments

Comments
 (0)