Skip to content

Commit

Permalink
8.2024.716.2216
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatandrei committed Jul 17, 2024
1 parent a9bf043 commit 58bb526
Show file tree
Hide file tree
Showing 12 changed files with 182 additions and 89 deletions.
1 change: 1 addition & 0 deletions docs/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ <h2>Steps to use</h2>
<h3>Installation</h3>
<p>Download latest version of the software from github</p>
<p><a href="https://github.com/ignatandrei/makeBook/releases">https://github.com/ignatandrei/makeBook/releases</a></p>
<p>You will download an executable file - latest is <a href="https://github.com/ignatandrei/makeBook/releases/download/v8.2024.717.2216/MakeBookCLI.exe">https://github.com/ignatandrei/makeBook/releases/download/v8.2024.717.2216/MakeBookCLI.exe</a></p>
<p>Note for Windows Users : Unblock the software prior to execute
it.</p>
<p>Now run</p>
Expand Down
Binary file added docs/index.docx
Binary file not shown.
Binary file added docs/index.epub
Binary file not shown.
1 change: 1 addition & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ <h2>Steps to use</h2>
<h3>Installation</h3>
<p>Download latest version of the software from github</p>
<p><a href="https://github.com/ignatandrei/makeBook/releases">https://github.com/ignatandrei/makeBook/releases</a></p>
<p>You will download an executable file - latest is <a href="https://github.com/ignatandrei/makeBook/releases/download/v8.2024.717.2216/MakeBookCLI.exe">https://github.com/ignatandrei/makeBook/releases/download/v8.2024.717.2216/MakeBookCLI.exe</a></p>
<p>Note for Windows Users : Unblock the software prior to execute
it.</p>
<p>Now run</p>
Expand Down
177 changes: 177 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
---
author: Andrei Ignat
title: Make a Book from markdown files
---

- [Introduction of
MakeBookCli](#introduction-of-makebookcli){#footoc-introduction-of-makebookcli}
- [Why ?](#why-){#footoc-why-}
- [About](#about){#footoc-about}
- [How the help manual it was
created](#how-the-help-manual-it-was-created){#footoc-how-the-help-manual-it-was-created}
- [Steps to use](#steps-to-use){#footoc-steps-to-use}
- [Installation](#installation){#footoc-installation}
- [Usage](#usage){#footoc-usage}
- [PDF](#pdf){#footoc-pdf}
- [Advanced -
Organization](#advanced---organization){#footoc-advanced---organization}
- [Folders](#folders){#footoc-folders}

## Introduction of MakeBookCli

### Why ? {#foowhy-}

Every now and then I have wanted to transform my investigations ,
written as blog posts, into books

Also occured to me that I want to write a book. But each chapter was
self sufficient. And transforming different chapters into a book
required manual labor . That for this software application, that has as
purpose to transform a chapter collection into a book ( i.e. a HTML
document or a Word document or a )

### About

My name is Andrei Ignat .

![Author](./Introduction_Assets/author.jpg "Author")

This software is open source and you can download from
<https://github.com/ignatandrei/makeBook>

### How the help manual it was created

Of course the help manual was created using this software. What is
better than dogfooding ?

If you want to edit, please go to
<https://github.com/ignatandrei/makeBook> and edit src/help files

You can download this help file as
`<a href="./index.html">`{=html}HTML`</a>`{=html} ,
`<a href="./index.docx">`{=html}Word`</a>`{=html} ,
`<a href="./index.pdf">`{=html}PDF`</a>`{=html} or
`<a href="./index.epub">`{=html}EPUB`</a>`{=html}

## Steps to use

### Installation

Download latest version of the software from github

<https://github.com/ignatandrei/makeBook/releases>

You will download an executable file - latest is
<https://github.com/ignatandrei/makeBook/releases/download/v8.2024.717.2216/MakeBookCLI.exe>

Note for Windows Users : Unblock the software prior to execute it.

Now run

MakeBookCLI i --folder
MakeBookCLI gmk --folder

The first command will init the structure.

The second one will start to generate output ( html, doc,epub) from the
markdown files.

### Usage

#### Put title and author

Modify bookData.json file in the .bookSettings folder and change the
author ( obviously , your name ) and title ( obviously , the title of
the book )

#### Put the chapters in the book folder

Modify the documents on the book folder. The program will execute
continuously and generate the html and doc documents . Those can be seen
at the .output folder

### PDF

If you want the pdf , then you should install a PDF Engine . You could
install miktext with

``` json

choco install pandoc
choco install rsvg-convert python miktex
```

Modify in the .bookSettings/bookData.json

``` json

"valueNear": ".pandoc/pandoc.exe",
"value": "%LocalAppData%\\Pandoc\\pandoc.exe"
```

Also modify in .bookSettings/bookData.json the \"make an pdf with
miktext\" value

``` json
"enabled":true,
"redirectOutput":false
```

Close the app ( and the console that you are using )and restart the
application .

## Advanced - Organization

### Folders

There are 4 folders into the project: .output , .bookSettings, .pandoc ,
book

#### .output

This folder will contain the output of the application. The output can
be HTML, DOCX, EPUB, PDF or any other kind pandoc will generate

#### .pandoc

Here will be the pandoc executable with all files needed to generate
documents.

#### .bookSettings

Here will be the settings of the book. The most important file is
bookData.json . This is a sample:

``` json
{
"book":{
"title":"The book title",
"author":"Your name"
},
"locations": [
{
"name": "pandoc",
"value": ".pandoc/pandoc.exe",
"valueIfChocoInstalled": "%LocalAppData%\\Pandoc\\pandoc.exe"
}

],
"commands": [
{
"name": "make a html",
"value": "-d .settings/pandocHTML.yaml --resource-path book --metadata=title:\"{title}\" --metadata=author:\"{author}\" --title \"{title}\" -o .output/index.html",
"enabled":true
},
]
}
```

#### book

Here you will put the chapters of the book. Each chapter will be a
markdown file. The order of the chapters will be the order of the files.
However, introduction.md will be the first ( if exists )

I suggest to put each image for a chapter in a separate folder with the
name of the chapter. This will help you to organize the images. ( It is
not necesssary, but it is a good practice )
Binary file added docs/index.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion src/apps/MakeBookSolution/MakeBookCLI/MakeBookCLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>8.2024.716.2216</Version>
<Version>8.2024.717.2216</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/apps/MakeBookSolution/MakeBookCLI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
//args = new[] { "i", "--folder", @"D:\gth\test1\" };
//args = new[] { "gmk", "--folder", @"D:\gth\test1\" };

args = new[] { "gmk", "--folder", @"D:\gth\makeBook\src\help" };
//args = new[] { "gmk", "--folder", @"D:\gth\makeBook\src\help" };
}
RootCommand rootCommand = new();

Expand Down
2 changes: 1 addition & 1 deletion src/help/book/Chapter001.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Download latest version of the software from github

https://github.com/ignatandrei/makeBook/releases

You will download an executable file - latest is https://github.com/ignatandrei/makeBook/releases/download/v8.2024.716.2216/MakeBookCLI.exe
You will download an executable file - latest is https://github.com/ignatandrei/makeBook/releases/download/v8.2024.717.2216/MakeBookCLI.exe

Note for Windows Users : Unblock the software prior to execute it.

Expand Down
36 changes: 0 additions & 36 deletions src/help1/.bookSettings/bookData.json

This file was deleted.

35 changes: 0 additions & 35 deletions src/help1/book/Chapter001.md

This file was deleted.

15 changes: 0 additions & 15 deletions src/help1/book/Introduction.md

This file was deleted.

0 comments on commit 58bb526

Please sign in to comment.