首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏nummy

    sphinx入门指南【2】 toctree指令详解

    Sphinx提供了自定义指令toctree来支持实现这个功能。 .. toctree:: 这个指令会在当前位置插入文档的目录树。关联文档的路径可以使用相对路径或者绝对路径。 章节序号 如果你需要给章节添加序号,可以给最顶层的toctree添加numbered参数。 .. toctree:: :titlesonly: foo bar 还可以使用unix通配符,通过glob参数指定: .. toctree:: :glob: intro 如果你只想使用最顶层的toctree,而忽略掉其它的toctree指令,可以使用includehidden。 .. toctree:: :includehidden: doc_1 doc_2 最后要注意的是,所有源目录中的文档必须出现在toctree指令中,否则sphinx会告警。

    4.1K40发布于 2018-08-27
  • 来自专栏云深之无迹

    现成Sphinx实例(基于Dji SDK)

    robomaster.jpg ================================== 欢迎来到 RoboMaster 开发者页面 ================================== .. toctree caption: 快速开始 :numbered: introduction.rst code_env_setup.rst third_part_comm.rst .. toctree multi_robot_apis.rst python_sdk/multi_robot_drone_example.rst python_sdk/multi_robot_ep.rst .. toctree text_sdk/intro.rst text_sdk/connection.rst text_sdk/apis.rst text_sdk/multi_ctrl.rst .. toctree caption: Python 编程说明 :numbered: python/intro.rst python/feature.rst python/apis.rst .. toctree

    96310发布于 2020-12-07
  • 来自专栏coding

    scrapy爬虫抓取并下载文件

    分析页面 html 结构 分析可知,所有例子链接都在

    下的每一个
  • 中 在 scrapy [2]: from scrapy.linkextractors import LinkExtractor In [3]: le = LinkExtractor(restrict_css='div.toctree-wrapper.compound li.toctree-l2') In [4]: links = le.extract_links(response) In [5]: [link.url for link in links] Out

4.3K10发布于 2019-07-22
  • 来自专栏码农爱学习的专栏

    Sphinx+gitee+Read the Docs搭建在线文档系统

    You can adapt this file completely to your liking, but it should at least contain the root `toctree ====================================== .. toctree:: :maxdepth: 2 :caption: Contents: Indices +空格+后面的文本,代表注释(网页上不显示) 等号线====+上一行的文本,代表一级标题 .. toctree::声明的一个树状结构(Table of Content Tree) :maxdepth: 行是索引和搜索链接(可以先不用管) 3.2.2 修改index文件 修改soure文件夹下的index.rst文件,,这里表示添加了一个Cpp目录,然后Cpp目录下,链接的又一个index文件 .. toctree soure/Cpp/01设计模式中的index.rst文件内容如下,这里表示管理了2个文档 设计模式 ================================= .. toctree::

    2.4K30发布于 2021-07-20
  • 来自专栏nummy

    sphinx入门指南【1】快速入门

    index.rst中包含了目录树指令toctree,sphinx使用它链接其他子文档。 toctree指令的初始值为空: .. toctree:: :maxdepth: 2 接下来就可以给它添加子文档的链接了,直接使用文档的名称即可,省略掉文件后缀,如果是多级目录,则使用/分隔开。 .. toctree:: :maxdepth: 2 intro tutorial chapter/doc1 ...

    2.6K40发布于 2018-08-27
  • 来自专栏木制robot技术杂谈

    用Sphinx快速制作文档

    conf.py: Sphinx的配置文件 index.rst: 主文档定义文档结构 主文档index.rst的主要功能是被转换成欢迎页, 它包含一个目录表( “table of contents tree”或者 toctree Sphinx 主要功能是使用 reStructuredText, 把许多文件组织成一份结构合理的文档. toctree指令初始值如下: .. toctree:: :maxdepth: 2 你可以在 content 的位置添加文档列表: .. toctree:: :maxdepth: 2 tutorial.md ...

    2.2K61发布于 2018-04-13
  • 来自专栏云深之无迹

    Sphinx补篇

    You can adapt this file completely to your liking, but it should at least contain the root `toctree ================================== .. toctree:: :maxdepth: 2 :caption: Contents: Indices and

    1.6K10发布于 2020-12-07
  • 来自专栏GopherCoder

    ReStructuredText 文档编写全攻略编写文档说明

    ├─_static └─_templates 增加了两个文件夹,文件夹下面各自有各自的 rst 文件 修改 index.rst 文件 Learn ---------------------- .. toctree :caption: Learn 20170916 Learn/markdown Learn/rest Practice ---------------------- .. toctree /html/index.html 文件 结果如下: 12.png 总结: sphinx-quickstart 初始化文档项目 根据需求创建文件夹和文件 修改 index.rst 对文档结构进行组织 toctree

    6.6K31发布于 2018-06-06
  • 来自专栏Python爬虫实战

    Python爬虫:爬取在线教程转成pdf

    04.定位目录及网址 从图看到我们需要的目录包含在

    之间,
  • 标签里为一级目录及网址;
  • 标签里为二级目录及网址。 menu = soup.find_all('div', class_='section') chapters = menu[0].div.ul.find_all('li', class_='toctree-l1

    3.3K10发布于 2018-08-09
  • 来自专栏python3

    抽取python 标准库页面生成 mob

    req=urllib2.urlopen(r'https://docs.python.org/2/library/index.html') p=re.compile(r'''<li class="<em>toctree</em>

    53340发布于 2020-01-13
  • 来自专栏州的先生

    用 uniapp 写小程序,使用 vue 组件时遇到的一个小坑

    /TocTree.vue" 引入后对组件进行注册: components:{ TreeToc } 方法二,使用 uniapp 的 easycom 。

    2.3K20发布于 2021-11-12
  • 来自专栏日常学python

    爬取《The Hitchhiker’s Guide to Python!》python进阶书并制成pdf

    可以看到这个内容的地址和内容标题都在这个a标签上,所以正则很容易,如下: toctree-l1.*?reference internal" href="([^"]*?)">(.*?) response.status_code == 200: response.encoding = 'utf-8' hrefs = re.findall('toctree-l1

    1.2K170发布于 2018-04-04
  • 来自专栏韦东山嵌入式

    韦东山freeRTOS系列教程之【第十二章】资源管理(Resource Management)

    我禁止调度器,不运行任务切换 .. toctree:: :maxdepth: 2 section1 12.1 屏蔽中断 屏蔽中断有两套宏:任务中使用、ISR中使用: 任务中使用:taskENTER_CRITICA

    96441编辑于 2021-12-08
  • 来自专栏TestQA

    5步搭建一个测试文档管理网站

    index.rst文件,添加新增的hello.rst文件 hello.rst文件内容如下: hello, python ============== index.rst文件修改如下: Contents: .. toctree

    1.1K20发布于 2019-10-12
  • 来自专栏Tensorbytes

    构建自己的Python开源包

    ======================================= .. toctree:: :caption: Basic concepts :hidden: api

    1.5K20发布于 2019-10-23
  • 来自专栏小詹同学

    使用 Python 30分钟 教你快速搭建一个博客

    .. toctree:: :maxdepth: 2 :caption: Contents: how_to_be_a_rich_man 然后删除这几行 Indices and tables

    1.3K20发布于 2019-11-12
  • 来自专栏KaliArch

    Python利用sphinx构建个人博客

    ls conf.py index.rst myshell-note.md myshell-note.rst _static _templates 编辑index.rst,进行引用文件 .. toctree

    2.6K21发布于 2018-10-31
  • 来自专栏python3

    50. Python 数据处理(1)

    www.apelearn.com/study_v2/" s = requests.session() text = s.get(url).text reg = re.compile(r'<li class=\"toctree-l1

    1.4K20发布于 2020-01-07
  • 来自专栏韦东山嵌入式

    韦东山freeRTOS系列教程之【第十一章】中断管理(Interrupt Management)

    本章涉及如下内容: FreeRTOS的哪些API函数能在ISR中使用 怎么把中断的处理分为两部分:ISR、任务 ISR和任务之间的通信 .. toctree:: :maxdepth

    3.3K72编辑于 2021-12-08
  • 来自专栏Dechin的专栏

    使用python编写量子线路打印的简单项目,并使用Sphinx自动化生成API文档

    这样我们可以把module.rst修改成这样的形式: module1 ======= .. toctree:: :maxdepth: 4 module1 module2 ======= .. toctree:: :maxdepth: 4 module2 这里rst文档会自动搜寻同目录下的module1.rst和module2.rst文件,并自动化的生成文档。

    3.4K20发布于 2021-05-21
  • 第 2 页
    领券