Skip to content

Commit

Permalink
Update ReadMe file
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelBoucey committed Feb 16, 2024
1 parent a168708 commit 9636b5c
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1>Dumber</h1>

`dumber`, a (not so dumb) command line tool for **d**(igital n)**umber**(ing) Markdown document sections and creation of a table of contents accordingly on demand.
`dumber`, a (not so dumb) command line tool for **d**(igital n)**umber**(ing) Markdown document sections and creation of table(s) of contents accordingly.

With `dumber` (you already use `git`, don't you?) you can *add* or *remove* to your Mardown files:

Expand All @@ -9,18 +9,17 @@ With `dumber` (you already use `git`, don't you?) you can *add* or *remove* to y

See an [example](./example.md).

_N.B._ :Not yet tested and implemented for UTF8.
_N.B._ : The table of content generation is not tested and implemented for UTF8 yet.

## 1. Installation

Install `dumber` from Github:

```
go install github.com/MichelBoucey/dumber@latest
make install
```

## 2. Usage

### 2.1. Command line options
```
user@machine $ dumber -h
Usage: dumber [OPTION] FILE
Expand All @@ -31,10 +30,16 @@ Usage: dumber [OPTION] FILE
-w Write section numbers to the .md file (default to stdout)
```

To add a table of contents you have to add a line with the HTML comment below, where you want the table of contents to appear:
### 2.2. Add table(s) of content

To add a table of contents you have to add a line with the HTML comment **&lt;!-- Toc --!&gt;**, where you want a table of contents to appear:

```
<!-- ToC -->
- [1.](#1-installation) Installation
- [2.](#2-usage) Usage
- [2.1.](#21-options) Options
- [2.2.](#22-add-table(s)-of-content) Add table(s) of content
```

The table of contents will be written just after the HTML comment line. And you can add this comment line as many times as you want, if you are, like me, a big fan of tables of contents, or if the length of your document needs a second table of contents at its end.
Expand Down

0 comments on commit 9636b5c

Please sign in to comment.