Copyright year in man page
[geeqie.git] / scripts / generate-man-page.sh
1 #!/bin/bash
2
3 ## @file
4 ## @brief Create the man page from the output of the "geeqie--help" command
5 ## and also create the xml file for Command Line Options
6 ##
7 ## This needs to be run only when the command line options change
8 ##
9 ## The programs help2man and doclifter are required - both are available as .deb packages.
10 ##
11
12 command -v help2man > /dev/null
13 if [ $? -eq 1 ]
14 then
15         echo "help2man not installed"
16         exit
17 fi
18
19 command -v doclifter > /dev/null
20 if [ $? -eq 1 ]
21 then
22         echo "doclifter not installed"
23         exit
24 fi
25
26 options_file=$(mktemp)
27 year=$(date +"%Y")
28
29 echo "[NAME]
30 Geeqie - GTK based multiformat image viewer
31
32 [DESCRIPTION]
33 Geeqie is an interactive GTK based image viewer that supports multiple image formats,
34 zooming, panning, thumbnails and sorting images into collections.
35
36 Generated for version:
37
38 [SEE ALSO]
39 Full documentation: https://www.geeqie.org/help/GuideIndex.html
40
41 [BUGS]
42 Please send bug reports and feedback to https://github.com/BestImageViewer/geeqie/issues
43
44 [COPYRIGHT]
45 Copyright (C) 1999-2004 by John Ellis. Copyright (C) 2004-$year by The Geeqie Team. Use this software  at  your
46 own  risk! This  software released under the GNU General Public License. Please read the COPYING file for more
47 information." > "$options_file"
48
49
50 help2man --no-info --include="$options_file" src/geeqie > geeqie.1
51
52 doclifter geeqie.1
53 mv geeqie.1.xml doc/docbook/CommandLineOptions.xml
54
55 rm "$options_file"