Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A utility to convert the navigation sidebar of GitHub documentation pages from HTML to a structured Markdown format.

NotificationsYou must be signed in to change notification settings

brlin-tw/github-docs-nav-sidebar-to-markdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A utility to convert the navigation sidebar of GitHub documentation pages from HTML to a structured Markdown format.

https://gitlab.com/brlin/github-docs-nav-sidebar-to-markdown
The GitLab CI pipeline status badge of the project's main branchGitHub Actions workflow status badgepre-commit enabled badgeREUSE Specification compliance badge

#utility #github-docs #markdown

Introduction

This script converts the GitHub Actions documentation sidebar HTML structureto a GitHub Flavored Markdown (GFM) unordered list format.

The script extracts:

  • Text content from span elements with class "prc-ActionList-ItemLabel-TmBhn"
  • URL links from href attributes of anchor elements
  • Hierarchical structure based on CSS depth indicators (--subitem-depth)

Usage

Refer to the following instructions to run the conversion script:

  1. Install the following runtime dependencies:

  2. Copy the HTML snippet of the sidebar into a local file, e.g.,sidebar.html, refer to thesample HTML file for an example.

  3. Edit thehtml_to_markdown_converter.py script to:

    • Set the input HTML file path and output Markdown file path.
    • Edit theclass_ variables according to the actual HTML structure if necessary.
  4. Launch a text terminal.

  5. Change the working directory to where you saved thehtml_to_markdown_converter.py script.

  6. Run the following command to run the utility:

    python3 html_to_markdown_converter.py

    The converted Markdown content will be saved to the specified output file.

References

The following materials are referenced during the development of this product:

Licensing

Unless otherwise noted(comment headers/REUSE.toml), this product is licensed underthe 3.0 version of the Affero General Public License, or any of its more recent versions of your preference.

This work complies tothe REUSE Specification, refer to theREUSE - Make licensing easy for everyone website for info regarding the licensing of this product.

About

A utility to convert the navigation sidebar of GitHub documentation pages from HTML to a structured Markdown format.

Topics

Resources

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp