Skip to content

Commit 6bfdc77

Browse files
committed
docs(README): Write the Usage section
Signed-off-by: 林博仁(Buo-ren Lin) <buo.ren.lin@gmail.com>
1 parent d4a3fed commit 6bfdc77

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,26 @@ The script extracts:
1818
* URL links from href attributes of anchor elements
1919
* Hierarchical structure based on CSS depth indicators (--subitem-depth)
2020

21+
## Usage
22+
23+
Refer to the following instructions to run the conversion script:
24+
25+
1. Install the following runtime dependencies:
26+
+ [The beautifulsoup4 PyPI package](https://pypi.org/project/beautifulsoup4/)
27+
1. Copy the HTML snippet of the sidebar into a local file, e.g., `sidebar.html`, refer to the [sample HTML file](gh-actions-docs-sidebar.sample.html) for an example.
28+
1. Edit the [`html_to_markdown_converter.py`](html_to_markdown_converter.py) script to:
29+
+ Set the input HTML file path and output Markdown file path.
30+
+ Edit the `class_` variables according to the actual HTML structure if necessary.
31+
1. Launch a text terminal.
32+
1. Change the working directory to where you saved the `html_to_markdown_converter.py` script.
33+
1. Run the following command to run the utility:
34+
35+
```bash
36+
python3 html_to_markdown_converter.py
37+
```
38+
39+
The converted Markdown content will be saved to the specified output file.
40+
2141
## Licensing
2242

2343
Unless otherwise noted([comment headers](https://reuse.software/spec-3.3/#comment-headers)/[REUSE.toml](https://reuse.software/spec-3.3/#reusetoml)), this product is licensed under [the 3.0 version of the Affero General Public License](https://www.gnu.org/licenses/agpl-3.0.html), or any of its more recent versions of your preference.

0 commit comments

Comments
 (0)