-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/development' into development
- Loading branch information
Showing
15 changed files
with
258 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Врата Абаддона (Джеймс Кори) | ||
– Ваша заметка на странице 868 | Место 8411 | Добавлено: воскресенье, 3 марта 2024 г. в 18:08:16 | ||
|
||
Проверка | ||
========== | ||
Врата Абаддона (Джеймс Кори) | ||
– Ваш выделенный отрывок на странице 867 | Место 8408–8411 | Добавлено: воскресенье, 3 марта 2024 г. в 18:08:16 | ||
|
||
Дверь открылась, и он рывком сдвинул джойстик вперед. Мех провел его сквозь проем. Закрыв за собой, Бык, не медля и не раздумывая, свернул по коридору к внутреннему лифту, к долгому переходу на второй уровень, к сектору М. | ||
========== | ||
К востоку от Эдема (Джон Стейнбек) | ||
– Ваша заметка на странице 6 | Место 55 | Добавлено: воскресенье, 3 марта 2024 г. в 18:48:36 | ||
|
||
Проверка | ||
========== | ||
К востоку от Эдема (Джон Стейнбек) | ||
– Ваш выделенный отрывок на странице 6 | Место 53–55 | Добавлено: воскресенье, 3 марта 2024 г. в 18:48:36 | ||
|
||
Салинас-Вэлли расположен в Северной Калифорнии и представляет собой длинную узкую полоску равнины между двумя цепями гор, посреди которой бежит, извиваясь | ||
========== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Пожар Сиболы (Джеймс Кори) | ||
– Ваша заметка на странице 49 | Место 473 | Добавлено: понедельник, 11 марта 2024 г. в 14:17:27 | ||
|
||
Начальник службы безопасности | ||
========== | ||
Пожар Сиболы (Джеймс Кори) | ||
– Ваш выделенный отрывок на странице 49 | Место 473–473 | Добавлено: понедельник, 11 марта 2024 г. в 14:17:28 | ||
|
||
Адольфус Мартри | ||
========== | ||
Пожар Сиболы (Джеймс Кори) | ||
– Ваша заметка на странице 71 | Место 690 | Добавлено: четверг, 14 марта 2024 г. в 16:19:41 | ||
|
||
Зам по полевым операциям | ||
========== | ||
Пожар Сиболы (Джеймс Кори) | ||
– Ваш выделенный отрывок на странице 71 | Место 690–690 | Добавлено: четверг, 14 марта 2024 г. в 16:19:41 | ||
|
||
Гассан Смит | ||
========== | ||
Пожар Сиболы (Джеймс Кори) | ||
– Ваша заметка на странице 76 | Место 738 | Добавлено: четверг, 14 марта 2024 г. в 16:28:12 | ||
|
||
Помощник главы безопасности | ||
========== | ||
Пожар Сиболы (Джеймс Кори) | ||
– Ваш выделенный отрывок на странице 76 | Место 738–738 | Добавлено: четверг, 14 марта 2024 г. в 16:28:12 | ||
|
||
Рив, | ||
========== | ||
Пожар Сиболы (Джеймс Кори) | ||
– Ваш выделенный отрывок на странице 78 | Место 755–756 | Добавлено: четверг, 14 марта 2024 г. в 16:29:17 | ||
|
||
Каждый вправе сам выбирать свою судьбу. | ||
========== |
17 changes: 16 additions & 1 deletion
17
ExportKindleClippingsToNotion/ExportKindleClippingsToNotion.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
ExportKindleClippingsToNotion/Parser/BooksParserFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using ExportKindleClippingsToNotion.Import.Metadata; | ||
|
||
namespace ExportKindleClippingsToNotion.Parser; | ||
|
||
public class BooksParserFactory(IBookMetadataFetcher metadataFetcher) : IBooksParserFactory | ||
{ | ||
public IBooksParser Create(IClippingsParser clippingsParser) | ||
{ | ||
return new BooksParser(metadataFetcher, clippingsParser); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 14 additions & 6 deletions
20
ExportKindleClippingsToNotion/Parser/ClippingsParserFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
namespace ExportKindleClippingsToNotion.Parser; | ||
|
||
public class ClippingsParserFactory | ||
public class ClippingsParserFactory : IClippingsParserFactory | ||
{ | ||
public IClippingsParser GetByLanguage(SupportedLanguages languages) | ||
{ | ||
return languages switch | ||
switch (languages) | ||
{ | ||
SupportedLanguages.English => new ClippingsParserEnglish(), | ||
SupportedLanguages.German => new ClippingsParserGerman(), | ||
_ => throw new ArgumentOutOfRangeException(nameof(languages), languages, null) | ||
}; | ||
case SupportedLanguages.English: | ||
Console.WriteLine("Determined English language"); | ||
return new ClippingsParserEnglish(); | ||
case SupportedLanguages.German: | ||
Console.WriteLine("Determined German language"); | ||
return new ClippingsParserGerman(); | ||
case SupportedLanguages.Russian: | ||
Console.WriteLine("Determined Russian language"); | ||
return new ClippingsParserRussian(); | ||
default: | ||
throw new ArgumentOutOfRangeException(nameof(languages), languages, null); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace ExportKindleClippingsToNotion.Parser; | ||
|
||
public interface IBooksParserFactory | ||
{ | ||
IBooksParser Create(IClippingsParser clippingsParser); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace ExportKindleClippingsToNotion.Parser; | ||
|
||
public interface IClippingsLanguage | ||
{ | ||
SupportedLanguages Determine(string clipping); | ||
} |
6 changes: 6 additions & 0 deletions
6
ExportKindleClippingsToNotion/Parser/IClippingsParserFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace ExportKindleClippingsToNotion.Parser; | ||
|
||
public interface IClippingsParserFactory | ||
{ | ||
IClippingsParser GetByLanguage(SupportedLanguages languages); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using ExportKindleClippingsToNotion.Import.Metadata; | ||
using ExportKindleClippingsToNotion.Parser; | ||
using FakeItEasy; | ||
using JetBrains.Annotations; | ||
|
||
namespace UnitTests.Parser; | ||
|
||
[TestSubject(typeof(BooksParserFactory))] | ||
public class BooksParserFactoryTest | ||
{ | ||
|
||
[Fact] | ||
public void BooksParserIsReturned() | ||
{ | ||
var metadataFetcher = A.Fake<IBookMetadataFetcher>(); | ||
var testSubject = new BooksParserFactory(metadataFetcher); | ||
|
||
var clippingsParser = A.Fake<IClippingsParser>(); | ||
var booksParser = testSubject.Create(clippingsParser); | ||
|
||
Assert.NotNull(booksParser); | ||
} | ||
} |
Oops, something went wrong.