将库的文档添加到手册页 [英] Adding Documentation of a library to manual pages

查看:152
本文介绍了将库的文档添加到手册页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Ubuntu 12.04.1。我正在学习使用C中的FFmpeg库制作一个基本的视频播放器。我的手册页没有显示图书馆的标题/功能的任何条目。有人可以给我一个方法来将文档添加到我的手册页面。

这样搜索比在网页上每次搜索要容易得多。



PS:我已经尝试使用Synaptic软件包管理器向手册页添加文档。我安装了一个 ffmpeg-doc 包。但它似乎不起作用



谢谢。

解决方案

FFmpeg 项目使用 doxygen 来创建文档。 Doxygen可以配置为输出man格式。



修改文件 doc / Doxyfile 如下所示,告诉doxygen你想要手册页格式。

  GENERATE_MAN = YES 
MAN_LINKS = YES

MAN_LINKS 选项非常重要,因为如果你省略,你找不到正确的api通过名称调用



通过调用 ./ configure ... 配置ffmpeg项目后,使用目标 apidoc 创建手册页。

  $ make apidoc 

手册页将输出到 doc / doxy / man / man3 ,然后将此路径附加到您的手册页搜索路径。

  $ export MANPATH = $ MANPATH:`pwd` / doc / doxy / man 

然后,您可以查找ffmpeg库api的手册页。

  $ man av_register_all 



注意



由doxygen为大多数api库生成的手册页仅仅是一个链接到真实的源手册页。



,您必须使用密钥 / 来搜索并跳转到您想要的文档部分。


I am working with Ubuntu 12.04.1 . I am learning to make a basic video player using FFmpeg library in C . My manual pages don't show any entries for the headers/functions of the library . Can someone please show me a way to add the documentation to my manual pages .
It is much easy to search that way than searching on a web page everytime .

PS : I have tried to add documentation to man pages using Synaptic package manager . I installed a ffmpeg-doc package . But it doesn't seem to work .

Thanks .

解决方案

FFmpeg project use doxygen to create documentation. Doxygen can be configured to output man format.

Modify the file doc/Doxyfile like below, to tell doxygen you want man page format.

GENERATE_MAN           = YES
MAN_LINKS              = YES

MAN_LINKS option is very important, because if you omit it, you can not find the correct api call by name.

After you configure ffmpeg project by invoke ./configure ..., use the target apidoc to create man pages.

$ make apidoc

The man pages will output to doc/doxy/man/man3, then append this path to your man page search path.

$ export MANPATH=$MANPATH:`pwd`/doc/doxy/man

Then you can look up man pages for ffmpeg library api.

$ man av_register_all

Note

The man pages generated by doxygen for most of the api library call just a link to real source man page.

After open with man, you have to use key / to search and jump to documentation part you want.

这篇关于将库的文档添加到手册页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆