tocs 1.0.2__tar.gz → 1.0.4__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.4
4
4
  Summary: Generate TOC for markdown files
5
5
  Author-email: Andrea Bondanini <bondaniniandrea@gmail.com>
6
6
  License: MIT
@@ -17,37 +17,34 @@ 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+
27
+
28
+ ### Installation
29
+ ```bash
30
+ pip install tocs
31
+ ```
25
32
 
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`
33
+ ### Update
34
+ ```bash
35
+ pip install --upgrade tocs
36
+ ```
30
37
 
31
- **Basic usage:**<br>
38
+ ### Basic usage:
32
39
  - `tocs input_file.md` - Generate TOC for the file
40
+ - `tocs --depth 2 input_file.md` - Limit the TOC generation to headers up to a specified depth
41
+ - `tocs --dry-run input_file.md` - Preview TOC without modifying the file
33
42
  - `tocs --help` - Show usage instructions
34
43
  - `tocs --version` - Display version information
35
44
 
36
45
  ### tocs example
37
46
  Given the following markdown file **input_file.md**:
38
47
  ```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
48
  <!-- init-tocs -->
52
49
  <!-- end-tocs -->
53
50
 
@@ -1,35 +1,32 @@
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+
9
+
10
+ ### Installation
11
+ ```bash
12
+ pip install tocs
13
+ ```
7
14
 
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`
15
+ ### Update
16
+ ```bash
17
+ pip install --upgrade tocs
18
+ ```
12
19
 
13
- **Basic usage:**<br>
20
+ ### Basic usage:
14
21
  - `tocs input_file.md` - Generate TOC for the file
22
+ - `tocs --depth 2 input_file.md` - Limit the TOC generation to headers up to a specified depth
23
+ - `tocs --dry-run input_file.md` - Preview TOC without modifying the file
15
24
  - `tocs --help` - Show usage instructions
16
25
  - `tocs --version` - Display version information
17
26
 
18
27
  ### tocs example
19
28
  Given the following markdown file **input_file.md**:
20
29
  ```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
30
  <!-- init-tocs -->
34
31
  <!-- end-tocs -->
35
32
 
@@ -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.4"
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.4")
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.4
4
4
  Summary: Generate TOC for markdown files
5
5
  Author-email: Andrea Bondanini <bondaniniandrea@gmail.com>
6
6
  License: MIT
@@ -17,37 +17,34 @@ 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+
27
+
28
+ ### Installation
29
+ ```bash
30
+ pip install tocs
31
+ ```
25
32
 
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`
33
+ ### Update
34
+ ```bash
35
+ pip install --upgrade tocs
36
+ ```
30
37
 
31
- **Basic usage:**<br>
38
+ ### Basic usage:
32
39
  - `tocs input_file.md` - Generate TOC for the file
40
+ - `tocs --depth 2 input_file.md` - Limit the TOC generation to headers up to a specified depth
41
+ - `tocs --dry-run input_file.md` - Preview TOC without modifying the file
33
42
  - `tocs --help` - Show usage instructions
34
43
  - `tocs --version` - Display version information
35
44
 
36
45
  ### tocs example
37
46
  Given the following markdown file **input_file.md**:
38
47
  ```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
48
  <!-- init-tocs -->
52
49
  <!-- end-tocs -->
53
50
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes