轻松利用github在降价文档内和降价文档之间自动生成的锚
anchorhub的Python项目详细描述
主持人中心
anchorhub是一个命令行工具,它使 在您的 Markdown文档, 允许您在github中创建丰富的、用户友好的文档 无需找出那些自动生成的标记将 是的。
功能
- 轻松使用Github自动生成的定位标记
- 简单的、可自定义的语法,只起作用
- 使用单个文件、单个目录级别或整个 目录树
安装
您可以使用 pip:
$ pip install anchorhub
如果PIP有问题,也可以从源代码安装:
$ git clone https://github.com/samjabrahams/anchorhub.git $ cd anchorhub $ python setup.py install
待办事项列表
- 验证跨平台兼容性(目前仅在OSX上测试)
- 支持重构文本
- 定义用于使用自定义锚生成或
- 更多的测试!
已知问题
- 不应更改行内代码块(那些标记为` 反勾号)
快速入门指南
三。在标记文件上运行anchorhub
anchorhub将分析标记文件。你有几个选择 对于运行anchorhub:在单个文件上运行,在单个文件上运行 一个目录的级别,或者在整个目录树上运行它。
Single file use: $ anchorhub mytags.md Directory use (single level): $ anchorhub . Directory use (provided directory level and all subdirectories): $ anchorhub . -r
这将把处理过的文件输出到当前文件夹中的新文件夹中 目录,“anchorhub out/”
四。享受您的(相对而言)免费github锚链接
假设上面所有的标记都在一个名为“mytags.md”的文件中,这里 是我们在“anchorhub out/mytags.md”中找到的:
# This is a header that I would like to make a tag for You can also use Setext (underlined) style headers ------------------------------------------------------------ ... [This links back to the header using the AnchorHub tag 'tag'](#this-is-a-header-that-i-would-like-to-make-a-tag-for) [This one links to the Setext header](#you-can-also-use-setext-underlined-style-headers)
许可证
Copyright 2016, Sam Abrahams. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.