tocs 1.0.2__tar.gz → 1.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tocs
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: Generate TOC for markdown files
5
5
  Author-email: Andrea Bondanini <bondaniniandrea@gmail.com>
6
6
  License: MIT
@@ -17,37 +17,28 @@ Requires-Dist: black; extra == "dev"
17
17
  Dynamic: license-file
18
18
 
19
19
  # tocs
20
+ [![PyPI](https://img.shields.io/pypi/v/tocs)](https://pypi.org/project/tocs/)
21
+
20
22
  **tocs** is a simple CLI application written in Python that generates **the table of contents (TOC)** section for markdown files.<br>
21
23
  As a person who loves to write personal technical notes in markdown files, I needed something simple to use.
22
24
 
23
25
  ## How to install and use tocs
24
- **Prerequisites:** Python 3.11.9+ and pipx installed (`pip install pipx`).
26
+ **Prerequisites:** Python 3.11.9+
25
27
 
26
- At the moment only a **manual installation** is available:
27
- - clone the repository
28
- - from the root of the repository: `pipx install .`
29
- - to upgrade tocs version: `pipx upgrade tocs`
28
+ ### Installation
29
+ ```bash
30
+ pip install tocs
31
+ ```
30
32
 
31
- **Basic usage:**<br>
33
+ ### Basic usage:
32
34
  - `tocs input_file.md` - Generate TOC for the file
35
+ - `tocs --depth 2 input_file.md` - Limit the TOC generation to headers up to a specified depth
33
36
  - `tocs --help` - Show usage instructions
34
37
  - `tocs --version` - Display version information
35
38
 
36
39
  ### tocs example
37
40
  Given the following markdown file **input_file.md**:
38
41
  ```md
39
- # header 1
40
- Lorem ipsum dolor sit amet...
41
-
42
- ## header 2
43
- Lorem ipsum dolor sit amet...
44
-
45
- ### header 3
46
- Lorem ipsum dolor sit amet...
47
- ```
48
-
49
- Add two tags where you want the TOCs table:
50
- ```md
51
42
  <!-- init-tocs -->
52
43
  <!-- end-tocs -->
53
44
 
@@ -1,35 +1,26 @@
1
1
  # tocs
2
+ [![PyPI](https://img.shields.io/pypi/v/tocs)](https://pypi.org/project/tocs/)
3
+
2
4
  **tocs** is a simple CLI application written in Python that generates **the table of contents (TOC)** section for markdown files.<br>
3
5
  As a person who loves to write personal technical notes in markdown files, I needed something simple to use.
4
6
 
5
7
  ## How to install and use tocs
6
- **Prerequisites:** Python 3.11.9+ and pipx installed (`pip install pipx`).
8
+ **Prerequisites:** Python 3.11.9+
7
9
 
8
- At the moment only a **manual installation** is available:
9
- - clone the repository
10
- - from the root of the repository: `pipx install .`
11
- - to upgrade tocs version: `pipx upgrade tocs`
10
+ ### Installation
11
+ ```bash
12
+ pip install tocs
13
+ ```
12
14
 
13
- **Basic usage:**<br>
15
+ ### Basic usage:
14
16
  - `tocs input_file.md` - Generate TOC for the file
17
+ - `tocs --depth 2 input_file.md` - Limit the TOC generation to headers up to a specified depth
15
18
  - `tocs --help` - Show usage instructions
16
19
  - `tocs --version` - Display version information
17
20
 
18
21
  ### tocs example
19
22
  Given the following markdown file **input_file.md**:
20
23
  ```md
21
- # header 1
22
- Lorem ipsum dolor sit amet...
23
-
24
- ## header 2
25
- Lorem ipsum dolor sit amet...
26
-
27
- ### header 3
28
- Lorem ipsum dolor sit amet...
29
- ```
30
-
31
- Add two tags where you want the TOCs table:
32
- ```md
33
24
  <!-- init-tocs -->
34
25
  <!-- end-tocs -->
35
26
 
@@ -3,7 +3,7 @@ name = "tocs"
3
3
  description = "Generate TOC for markdown files"
4
4
  authors = [{ name = "Andrea Bondanini", email = "bondaniniandrea@gmail.com" }]
5
5
  license = { text = "MIT" }
6
- version = "1.0.2"
6
+ version = "1.0.3"
7
7
  requires-python = ">=3.11.9"
8
8
  readme = "README.md"
9
9
  keywords = ["markdown", "tocs", "cli", "documentation", "generator"]
@@ -114,7 +114,7 @@ def main():
114
114
  parser.add_argument(
115
115
  "--depth", type=int, help="Maximum header depth to include in TOC"
116
116
  )
117
- parser.add_argument("--version", action="version", version="tocs 1.0.2")
117
+ parser.add_argument("--version", action="version", version="tocs 1.0.3")
118
118
  args = parser.parse_args()
119
119
  path = Path(args.file).resolve()
120
120
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tocs
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: Generate TOC for markdown files
5
5
  Author-email: Andrea Bondanini <bondaniniandrea@gmail.com>
6
6
  License: MIT
@@ -17,37 +17,28 @@ Requires-Dist: black; extra == "dev"
17
17
  Dynamic: license-file
18
18
 
19
19
  # tocs
20
+ [![PyPI](https://img.shields.io/pypi/v/tocs)](https://pypi.org/project/tocs/)
21
+
20
22
  **tocs** is a simple CLI application written in Python that generates **the table of contents (TOC)** section for markdown files.<br>
21
23
  As a person who loves to write personal technical notes in markdown files, I needed something simple to use.
22
24
 
23
25
  ## How to install and use tocs
24
- **Prerequisites:** Python 3.11.9+ and pipx installed (`pip install pipx`).
26
+ **Prerequisites:** Python 3.11.9+
25
27
 
26
- At the moment only a **manual installation** is available:
27
- - clone the repository
28
- - from the root of the repository: `pipx install .`
29
- - to upgrade tocs version: `pipx upgrade tocs`
28
+ ### Installation
29
+ ```bash
30
+ pip install tocs
31
+ ```
30
32
 
31
- **Basic usage:**<br>
33
+ ### Basic usage:
32
34
  - `tocs input_file.md` - Generate TOC for the file
35
+ - `tocs --depth 2 input_file.md` - Limit the TOC generation to headers up to a specified depth
33
36
  - `tocs --help` - Show usage instructions
34
37
  - `tocs --version` - Display version information
35
38
 
36
39
  ### tocs example
37
40
  Given the following markdown file **input_file.md**:
38
41
  ```md
39
- # header 1
40
- Lorem ipsum dolor sit amet...
41
-
42
- ## header 2
43
- Lorem ipsum dolor sit amet...
44
-
45
- ### header 3
46
- Lorem ipsum dolor sit amet...
47
- ```
48
-
49
- Add two tags where you want the TOCs table:
50
- ```md
51
42
  <!-- init-tocs -->
52
43
  <!-- end-tocs -->
53
44
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes