• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

sk1418/ghtoc: generate toc for markdown file

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

sk1418/ghtoc

开源软件地址(OpenSource Url):

https://github.com/sk1418/ghtoc

开源编程语言(OpenSource Language):

Python 100.0%

开源软件介绍(OpenSource Introduction):

ghtoc readme file

		  __    __            
   ____ _/ /_  / /_____  _____
  / __ `/ __ \/ __/ __ \/ ___/
 / /_/ / / / / /_/ /_/ / /__  
 \__, /_/ /_/\__/\____/\___/  
/____/
	-- generate "toc" for markdown

Table of contents

(toc is generated by ghtoc)

Introduction

GitHub doesn't provide a [[toc]] like function to generate toc(Table of contents) for markdown file. But sometimes an outline of a long readme file or other markdown page is very helpful. That's why does the simple ghtoc come.

ghtoc was written and tested with python 2.7.8

Features & Limitation

  • auto backup the input file before toc was generated and inserted
  • currently only support converting ## Section-like format into toc.
  • doesn't support unicode characters in ##sections (the link generated by github doesn't work anyway)

Usage

toc.py <md file>

then open the <md file> and check if you are satisfied with the generated toc

License

MIT license

Showcase

ghtoc is so simple that itselves readme file won't contain much information. I just put here some example to let the toc in this page have some stuffs. Also it shows how the toc generated by ghtoc look like.

I am happy to be the Section 1

Section 1 is my boss

Hey, the guy above, you are my boss!
I am not boss at all,shame!

I stand on Section2 and I am empty

No you are not, In my subSection, you find characters

Here I test: "([<&>]) and *$#+"

OK, that's it

% vim: nofoldenable




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap