Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #404

Merged
merged 34 commits into from
Dec 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c4808d2
Windows Terminal portable mode support
webmaster442 Nov 24, 2023
22f30df
API Project cleanup
webmaster442 Nov 24, 2023
17ecb22
API Cleanup step 1
webmaster442 Nov 24, 2023
75efcf0
New API & Scrpt running progress
webmaster442 Nov 24, 2023
a134f2e
New API & Scrpt running progress
webmaster442 Nov 24, 2023
33be9b4
Compile fixes
webmaster442 Nov 24, 2023
c14c727
Some code style fixes
webmaster442 Nov 24, 2023
0963cac
ITemplateShortCode: Part of API now
webmaster442 Nov 24, 2023
37fe9bb
Moved shortcodes
webmaster442 Nov 24, 2023
55c4924
Shortcode project adaptation
webmaster442 Nov 24, 2023
1a435ca
Adapted Shortcdes
webmaster442 Nov 24, 2023
97ff6d2
Shortcode loader: plugin support
webmaster442 Nov 24, 2023
e587393
Introduced time abstraction
webmaster442 Nov 24, 2023
ba0f73c
Dependencies updated
webmaster442 Nov 24, 2023
7d62994
Javascript console interface definition
webmaster442 Nov 24, 2023
d2607a8
Javascript console trashed
webmaster442 Nov 25, 2023
d4e4da5
Test cleanup & fixes
webmaster442 Nov 25, 2023
114baf3
Scripting interaction shortCodes
webmaster442 Nov 25, 2023
f6809ca
Remove IServerLogger interface
webmaster442 Nov 29, 2023
b2314a7
Command build warnings resolved
webmaster442 Nov 29, 2023
3ac4512
SVG.Skia update
webmaster442 Nov 29, 2023
5fe951f
Nunit: 4.0
webmaster442 Nov 29, 2023
85b291f
Some infrastructure changes
webmaster442 Nov 30, 2023
88b8882
Restored verbose logging option
webmaster442 Nov 30, 2023
992ef08
Progress on TOC command
webmaster442 Dec 1, 2023
46d7873
Work on Toc command
webmaster442 Dec 1, 2023
ca515a3
Title finder usability improvements
webmaster442 Dec 1, 2023
09366fb
Core Api changes
webmaster442 Dec 2, 2023
0bf407d
Initial version of Toc Command
webmaster442 Dec 2, 2023
21b0cfe
Work on ToC command
webmaster442 Dec 2, 2023
1ba62d2
NuGet update
webmaster442 Dec 2, 2023
a356cb7
Fixes bug in renderer
webmaster442 Dec 3, 2023
feec687
Fixes HTMLTidy running and encoding
webmaster442 Dec 3, 2023
94714e6
Updates to initializer methods
webmaster442 Dec 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions BookGen.sln
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookGen.Native", "Libs\Book
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Www", "Prog\Www\Www.csproj", "{F9BB566F-AC41-4028-A00C-0200EC53E1D7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookGen.ShortCodes", "Libs\BookGen.ShortCodes\BookGen.ShortCodes.csproj", "{079B77CD-3380-4947-BDE8-E0E774FD8E6F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -144,6 +146,10 @@ Global
{F9BB566F-AC41-4028-A00C-0200EC53E1D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F9BB566F-AC41-4028-A00C-0200EC53E1D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F9BB566F-AC41-4028-A00C-0200EC53E1D7}.Release|Any CPU.Build.0 = Release|Any CPU
{079B77CD-3380-4947-BDE8-E0E774FD8E6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{079B77CD-3380-4947-BDE8-E0E774FD8E6F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{079B77CD-3380-4947-BDE8-E0E774FD8E6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{079B77CD-3380-4947-BDE8-E0E774FD8E6F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -168,6 +174,7 @@ Global
{5F49A217-883B-499C-BEBD-22BC02E5EC8F} = {05B69A0E-343B-4E7C-B77B-24E84B57D5D2}
{8A1FEF90-2B8F-4849-B7C9-63EDE7F120E0} = {9C47BBFF-ACD8-40D8-9FB1-A3FA524B27C4}
{F9BB566F-AC41-4028-A00C-0200EC53E1D7} = {05B69A0E-343B-4E7C-B77B-24E84B57D5D2}
{079B77CD-3380-4947-BDE8-E0E774FD8E6F} = {9C47BBFF-ACD8-40D8-9FB1-A3FA524B27C4}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {772515BA-79D4-4C5D-AF16-29DE649EC13E}
Expand Down
9 changes: 2 additions & 7 deletions Bootstrappers/Bookgen.Win/InstallDetector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,10 @@ public static class InstallDetector
{
public static bool IsWindowsTerminalPortalbeInstalled(out string portablePath)
{
string[] searchPaths = new[]
{
Path.Combine(AppContext.BaseDirectory, "terminal", Constants.WindowsTerminal),
Path.Combine(AppContext.BaseDirectory, "wt", Constants.WindowsTerminal),
};

string[] searchPaths = Directory.GetDirectories(AppContext.BaseDirectory, "*.*", SearchOption.TopDirectoryOnly);
foreach (var searchPath in searchPaths)
{
if (File.Exists(searchPath))
if (File.Exists(Path.Combine(searchPath, Constants.WindowsTerminal)))
{
portablePath = searchPath;
return true;
Expand Down
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* New: Terminal output renderer, when building markdown
* New: CDG program can handle a path argument, to specify where to start from
* New: WWW program that can perform web searches easily
* Change: API cleanup & removed C# scripting support
* Change: StockSearch command functionality has been integrated to the WWW command
* Change: Removed auto updater (hard to maintain)
* Change: Removed ZIP format release
Expand Down
18 changes: 18 additions & 0 deletions Commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,24 @@ Arguments:

Without arguments, performs terminal profile install.

# Toc

Scans the folder and the configuration for markdown conent files
and writes out the missing Table of content entries to a file,
so the Table of conents can be easily updated.

`BookGen Toc {-v} {-d [directory]}`
`BookGen Toc {--verbose} {--dir [directory]}`

Arguments:

-d, --dir:
Optional argument. Specifies work directory. If not specified, then
the current directory will be used as working directory.

-v, --verbose:
Optional argument, turns on detailed logging. Usefull for locating issues

# Version

Print the current program and config API version
Expand Down
96 changes: 0 additions & 96 deletions Libs/BookGen.Api/Api.cd

This file was deleted.

35 changes: 5 additions & 30 deletions Libs/BookGen.Api/BookGen.Api.csproj
Original file line number Diff line number Diff line change
@@ -1,34 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<OutputPath>..\..\bin\$(Configuration)\</OutputPath>
<Nullable>enable</Nullable>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Product>BookGen</Product>
<Copyright>Copyright © Ruzsinzki Gábor 2019</Copyright>
<Authors>Ruzsinszki Gábor</Authors>
<PackageLicenseExpression></PackageLicenseExpression>
<PackageProjectUrl>https://github.com/webmaster442/BookGen</PackageProjectUrl>
<RepositoryUrl>https://github.com/webmaster442/BookGen</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<AssemblyVersion>18.0</AssemblyVersion>
<FileVersion>18.0</FileVersion>
<Description>C# scripting API references for BookGen scripting</Description>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageTags>static site,api,cshap,scripting,bookgen</PackageTags>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageLicenseFile>LICENCE</PackageLicenseFile>
<Version>18.0</Version>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<DocumentationFile>..\..\bin\$(Configuration)\BookGen.Api.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\LICENCE">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
42 changes: 0 additions & 42 deletions Libs/BookGen.Api/ExitCode.cs

This file was deleted.

16 changes: 2 additions & 14 deletions Libs/BookGen.Api/ILog.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//-----------------------------------------------------------------------------
// (c) 2019-2022 Ruzsinszki Gábor
// (c) 2019-2023 Ruzsinszki Gábor
// This code is licensed under MIT license (see LICENSE for details)
//-----------------------------------------------------------------------------

Expand Down Expand Up @@ -38,19 +38,7 @@ void Flush()
void Log(LogLevel logLevel, string format, params object[] args);

/// <summary>
/// Print a string, without formatting
/// </summary>
/// <param name="str">string to print</param>
void PrintLine(string str);

/// <summary>
/// Print an object
/// </summary>
/// <param name="obj">object to print</param>
void PrintLine(object obj);

/// <summary>
/// Log a Critical error.
/// Log a Critical error.
/// Critcal error is an error that causes the program to stop working
/// </summary>
/// <param name="format">Message, a fomat string that can be handled by the String.Format method</param>
Expand Down
27 changes: 0 additions & 27 deletions Libs/BookGen.Api/IScript.cs

This file was deleted.

36 changes: 0 additions & 36 deletions Libs/BookGen.Api/IScriptHost.cs

This file was deleted.

27 changes: 27 additions & 0 deletions Libs/BookGen.Api/ITemplateShortCode.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//-----------------------------------------------------------------------------
// (c) 2019-2023 Ruzsinszki Gábor
// This code is licensed under MIT license (see LICENSE for details)
//-----------------------------------------------------------------------------

namespace BookGen.Api
{
public interface ITemplateShortCode
{
/// <summary>
/// ShortCode activator tag
/// </summary>
string Tag { get; }

/// <summary>
/// ShortCode main entry point
/// </summary>
/// <param name="arguments">Arguments passed to the short code</param>
/// <returns>Generated string output</returns>
string Generate(IArguments arguments);

/// <summary>
/// If true, then the shortCode result is cached and not run every time
/// </summary>
bool CanCacheResult { get; }
}
}
Loading