From: Antonio Ospite Date: Fri, 23 Mar 2012 23:25:57 +0000 (+0100) Subject: doc: add generation of man pages from asciidoc sources X-Git-Tag: v0.1.0~1^2~1 X-Git-Url: https://git.ao2.it/libam7xxx.git/commitdiff_plain/7125b5256322f0055f19d2a478236cd69fcf64b3?ds=sidebyside doc: add generation of man pages from asciidoc sources --- diff --git a/cmake_modules/FindAsciidoc.cmake b/cmake_modules/FindAsciidoc.cmake new file mode 100644 index 0000000..9b3e414 --- /dev/null +++ b/cmake_modules/FindAsciidoc.cmake @@ -0,0 +1,27 @@ +# - Find Asciidoc +# this module looks for asciidoc +# +# ASCIIDOC_EXECUTABLE - the full path to asciidoc +# ASCIIDOC_A2X_EXECUTABLE - the full path to asciidoc's a2x +# ASCIIDOC_FOUND - If false, don't attempt to use asciidoc. +# +# Taken from: +# http://lissyx.dyndns.org/redmine/projects/qpdfpresenterconsole/repository/revisions/master/raw/cmake/FindAsciidoc.cmake + +FIND_PROGRAM(ASCIIDOC_EXECUTABLE asciidoc) +FIND_PROGRAM(ASCIIDOC_A2X_EXECUTABLE a2x) + +MARK_AS_ADVANCED( +ASCIIDOC_EXECUTABLE +ASCIIDOC_A2X_EXECUTABLE +) + +IF ((NOT ASCIIDOC_EXECUTABLE) OR (NOT ASCIIDOC_A2X_EXECUTABLE)) +SET(ASCIIDOC_FOUND "NO") +ELSE ((NOT ASCIIDOC_EXECUTABLE) OR (NOT ASCIIDOC_A2X_EXECUTABLE)) +SET(ASCIIDOC_FOUND "YES") +ENDIF ((NOT ASCIIDOC_EXECUTABLE) OR (NOT ASCIIDOC_A2X_EXECUTABLE)) + +IF (NOT ASCIIDOC_FOUND AND Asciidoc_FIND_REQUIRED) +MESSAGE(FATAL_ERROR "Could not find asciidoc") +ENDIF (NOT ASCIIDOC_FOUND AND Asciidoc_FIND_REQUIRED) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index ce111b2..0569f9d 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -13,3 +13,5 @@ if(DOXYGEN_FOUND) DESTINATION "${CMAKE_INSTALL_PREFIX}/share/doc/${CMAKE_PROJECT_NAME}") endif(DOXYGEN_FOUND) + +add_subdirectory(man) diff --git a/doc/man/CMakeLists.txt b/doc/man/CMakeLists.txt new file mode 100644 index 0000000..8029513 --- /dev/null +++ b/doc/man/CMakeLists.txt @@ -0,0 +1,16 @@ +# add a target to generate man pages with asciidoc +find_package(Asciidoc) +if(ASCIIDOC_FOUND) + add_custom_target(manpages + ${ASCIIDOC_A2X_EXECUTABLE} -f manpage ${CMAKE_CURRENT_SOURCE_DIR}/am7xxx-play.1.txt -D ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${ASCIIDOC_A2X_EXECUTABLE} -f manpage ${CMAKE_CURRENT_SOURCE_DIR}/picoproj.1.txt -D ${CMAKE_CURRENT_BINARY_DIR} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMENT "Generating man pages with Asciidoc" VERBATIM + ) + +install(FILES + ${DOC_OUTPUT_PATH}/man/am7xxx-play.1 + ${DOC_OUTPUT_PATH}/man/picoproj.1 + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man1/") + +endif(ASCIIDOC_FOUND) diff --git a/doc/man/am7xxx-play.1.txt b/doc/man/am7xxx-play.1.txt new file mode 100644 index 0000000..5054da4 --- /dev/null +++ b/doc/man/am7xxx-play.1.txt @@ -0,0 +1,100 @@ +AM7XXX-PLAY(1) +============== +:doctype: manpage + + +NAME +---- +am7xxx-play - play stuff on an am7xxx device (e.g. Acer C110, PicoPix 1020) + + +SYNOPSIS +-------- +*am7xxx-play* ['OPTIONS'] + + +DESCRIPTION +----------- +am7xxx-play(1) uses libavdevice, libavformat, libavcodec and libswscale to +decode the input, encode it to jpeg and display it with libam7xxx. + + +OPTIONS +------- +*-f* '':: + the input device format + +*-i* '':: + the input path + +*-o* '':: + a comma separated list of input format options ++ +EXAMPLE: ++ + -o draw_mouse=1,framerate=100,video_size=800x480 + +*-s* '':: + the rescaling method (see swscale.h) + +*-u*:: + upscale the image if smaller than the display dimensions + +*-F* '':: + the image format to use (default is JPEG) ++ +.SUPPORTED FORMATS: +* 1 - JPEG +* 2 - NV12 + +*-q* '':: + quality of jpeg sent to the device, between 1 and 100 + +*-l* '':: + the verbosity level of libam7xxx output (0-5) + +*-p* '':: + power level of device, between 0 (off) and 4 (maximum) + + WARNING: Level 2 and greater require the master AND + the slave connector to be plugged in. + +*-h*:: + this help message + + +EXAMPLES OF USE +--------------- + + am7xxx-play -f x11grab -i :0.0 -o video_size=800x480 + am7xxx-play -f fbdev -i /dev/fb0 + am7xxx-play -f video4linux2 -i /dev/video0 -o video_size=320x240,frame_rate=100 -u -q 90 + am7xxx-play -i http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_640x360.m4v + + +EXIT STATUS +----------- +*0*:: + Success + +*!0*:: + Failure (libam7xxx error; libav error) + + +AUTHORS +------- +Antonio Ospite and Reto Schneider + + +RESOURCES +--------- +Main web site: + + +COPYING +------- +Copyright \(C) 2012 Antonio Ospite + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. diff --git a/doc/man/picoproj.1.txt b/doc/man/picoproj.1.txt new file mode 100644 index 0000000..e26df26 --- /dev/null +++ b/doc/man/picoproj.1.txt @@ -0,0 +1,80 @@ +PICOPROJ(1) +=========== +:doctype: manpage + + +NAME +---- +picoproj - test program for libam7xxx + + +SYNOPSIS +-------- +*picoproj* ['OPTIONS'] + + +DESCRIPTION +----------- +picoproj(1) is a minimal example to show how to use libam7xxx to display a static image. + + +OPTIONS +------- + +*-f* '':: + the image file to upload + + +*-F* '':: + the image format to use (default is JPEG) ++ +.SUPPORTED FORMATS: +* 1 - JPEG +* 2 - NV12 + +*-l* '':: + the verbosity level of libam7xxx output (0-5) + +*-W* '':: + the width of the image to upload + +*-H* '':: + the height of the image to upload + +*-h*:: + this help message + + +EXAMPLE OF USE +-------------- + +picoproj -f file.jpg -F 1 -l 5 -W 800 -H 480 + + +EXIT STATUS +----------- +*0*:: + Success + +*!0*:: + Failure (libam7xxx error) + + +AUTHORS +------- +Antonio Ospite and Reto Schneider + + +RESOURCES +--------- +Main web site: + + +COPYING +------- +Copyright \(C) 2012 Antonio Ospite + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version.