Skip to content

Commit

Permalink
Moved main project into own directory.
Browse files Browse the repository at this point in the history
Amir Grozki authored and Amir Grozki committed Mar 20, 2022
1 parent 8e3a957 commit 9aba4e3
Showing 158 changed files with 12 additions and 9 deletions.
7 changes: 4 additions & 3 deletions HocrEditor.Tesseract/TesseractService.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using System.Drawing;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
using HocrEditor.Tesseract;

internal sealed class TesseractService : IDisposable
namespace HocrEditor.Tesseract;

public sealed class TesseractService : IDisposable
{
private bool isDisposed;
private readonly object lck = new();
@@ -18,7 +19,7 @@ public TesseractService(string tesseractPath)

public string[] GetLanguages() => tesseractApi.GetAvailableLanguages();

public async Task<string> PerformOcr(string filename, IEnumerable<string> languages, Rectangle region = new())
public async Task<string> Recognize(string filename, IEnumerable<string> languages, Rectangle region = new())
{
if (isDisposed)
{
2 changes: 1 addition & 1 deletion HocrEditor.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HocrEditor", "HocrEditor.csproj", "{B13D9609-0058-47EA-BE3D-D8D2C4BC5DB8}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HocrEditor", "HocrEditor\HocrEditor.csproj", "{B13D9609-0058-47EA-BE3D-D8D2C4BC5DB8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HocrEditor.Tesseract", "HocrEditor.Tesseract\HocrEditor.Tesseract.csproj", "{903AE18A-649C-41CE-A987-3503F6C7A430}"
EndProject
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@
using HocrEditor.Core;
using HocrEditor.Helpers;
using HocrEditor.Services;
using HocrEditor.Tesseract;
using HocrEditor.ViewModels;
using HtmlAgilityPack;
using Rect = HocrEditor.Models.Rect;
@@ -50,7 +51,7 @@ protected override Task ExecuteAsyncImpl(Rect selectionBounds, CancellationToken
{
using var service = new TesseractService(tesseractPath);

var body = await service.PerformOcr(
var body = await service.Recognize(
hocrPageViewModel.Image,
Settings.TesseractSelectedLanguages,
region
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion HocrEditor.csproj → HocrEditor/HocrEditor.csproj
Original file line number Diff line number Diff line change
@@ -130,7 +130,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="HocrEditor.Tesseract\HocrEditor.Tesseract.csproj" />
<ProjectReference Include="..\HocrEditor.Tesseract\HocrEditor.Tesseract.csproj" />
</ItemGroup>

</Project>
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
2 changes: 1 addition & 1 deletion MainWindow.xaml.cs → HocrEditor/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
using HocrEditor.Controls;
using HocrEditor.Core;
using HocrEditor.Helpers;
using HocrEditor.Services;
using HocrEditor.Tesseract;
using HocrEditor.ViewModels;

namespace HocrEditor
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@
using HocrEditor.Helpers;
using HocrEditor.Models;
using HocrEditor.Services;
using HocrEditor.Tesseract;
using JetBrains.Annotations;
using Microsoft.Toolkit.Mvvm.Input;
using HtmlDocument = HtmlAgilityPack.HtmlDocument;
@@ -264,7 +265,7 @@ private void Import()

using var service = new TesseractService(tesseractPath);

var body = await service.PerformOcr(page.Image, languages);
var body = await service.Recognize(page.Image, languages);

var doc = new HtmlDocument();
doc.LoadHtml(body);
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion dotnet-releaser.toml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
profile = "custom"

[msbuild]
project = "./HocrEditor.csproj"
project = "./HocrEditor/HocrEditor.csproj"
[github]
user = "GeReV"
repo = "HocrEditor"

0 comments on commit 9aba4e3

Please sign in to comment.