cURL / Mailing Lists / curl-library / Single Mail

curl-library

some man page observations ...

From: Guenter <lists_at_gknw.net>
Date: Mon, 27 Sep 2010 15:55:03 +0200

I was looking into some man page converters, and while on this I found
that our man pages have all different internal dates and versions
mentioned; with some its certainly wrong since they were modified after
the listed date ...; so question is: what date should the man pages
list? Last modification date? Or should they always be updated with
release version and date? Sure, this seems more of cosmetic nature ...

Here's a quick bash hack to check for the man dates:
#!/bin/sh

test -z "$1" && echo "Usage: ${0##*/} <basepath>" && exit 1
basepath=${1%%/}
timeformat="%d %B %Y"
set -- ${basepath}/docs/*.1 ${basepath}/docs/libcurl/*.3
for file; do
   gitdate=$(git log -1 ${file} | sed -n -e 's|Date:[\t ]*\(.*\) \(.*\)
\(.*\) \(.*\) \(.*\) \(.*\)|\1 \2 \3 \5 \4 \6|p')
   fmtdate=$(date +"${timeformat}" -d "${gitdate}")
   echo "${file##*/} --> Git date: ${fmtdate}"
   cat ${file} | grep '^.TH'
   test $? -ne 0 && echo "*** No .TH found! ***"
done

../chkmandates .
curl.1 --> Git date: 09 September 2010
.TH curl 1 "28 November 2009" "Curl 7.20.0" "Curl Manual"
curl-config.1 --> Git date: 24 March 2010
.TH curl-config 1 "25 Oct 2007" "Curl 7.17.1" "curl-config manual"
curl_easy_cleanup.3 --> Git date: 24 March 2010
.TH curl_easy_cleanup 3 "22 aug 2007" "libcurl 7.17.0" "libcurl Manual"
curl_easy_duphandle.3 --> Git date: 24 March 2010
.TH curl_easy_duphandle 3 "18 September 2001" "libcurl 7.9" "libcurl Manual"
curl_easy_escape.3 --> Git date: 24 March 2010
.TH curl_easy_escape 3 "7 April 2006" "libcurl 7.15.4" "libcurl Manual"
curl_easy_getinfo.3 --> Git date: 30 July 2010
.TH curl_easy_getinfo 3 "11 Feb 2009" "libcurl 7.19.4" "libcurl Manual"
curl_easy_init.3 --> Git date: 24 March 2010
.TH curl_easy_init 3 "4 March 2002" "libcurl 7.8.1" "libcurl Manual"
curl_easy_pause.3 --> Git date: 24 March 2010
.TH curl_easy_pause 3 "17 Dec 2007" "libcurl 7.18.0" "libcurl Manual"
curl_easy_perform.3 --> Git date: 24 March 2010
.TH curl_easy_perform 3 "5 Mar 2001" "libcurl 7.7" "libcurl Manual"
curl_easy_recv.3 --> Git date: 24 March 2010
.TH curl_easy_recv 3 "29 April 2008" "libcurl 7.18.2" "libcurl Manual"
curl_easy_reset.3 --> Git date: 24 March 2010
.TH curl_easy_reset 3 "31 July 2004" "libcurl 7.12.1" "libcurl Manual"
curl_easy_send.3 --> Git date: 24 March 2010
.TH curl_easy_send 3 "29 April 2008" "libcurl 7.18.2" "libcurl Manual"
curl_easy_setopt.3 --> Git date: 28 August 2010
.TH curl_easy_setopt 3 "1 Jan 2010" "libcurl 7.20.0" "libcurl Manual"
curl_easy_strerror.3 --> Git date: 24 March 2010
.TH curl_easy_strerror 3 "26 Apr 2004" "libcurl 7.12" "libcurl Manual"
curl_easy_unescape.3 --> Git date: 24 March 2010
.TH curl_easy_unescape 3 "7 April 2006" "libcurl 7.15.4" "libcurl Manual"
curl_escape.3 --> Git date: 24 March 2010
.TH curl_escape 3 "6 March 2002" "libcurl 7.9" "libcurl Manual"
curl_formadd.3 --> Git date: 24 March 2010
.TH curl_formadd 3 "24 June 2002" "libcurl 7.9.8" "libcurl Manual"
curl_formfree.3 --> Git date: 24 March 2010
.TH curl_formfree 3 "6 April 2001" "libcurl 7.7.1" "libcurl Manual"
curl_formget.3 --> Git date: 24 March 2010
.TH curl_formget 3 "20 June 2006" "libcurl 7.15.5" "libcurl Manual"
curl_free.3 --> Git date: 24 March 2010
.TH curl_free 3 "12 Aug 2003" "libcurl 7.10" "libcurl Manual"
curl_getdate.3 --> Git date: 24 March 2010
.TH curl_getdate 3 "12 Aug 2005" "libcurl 7.0" "libcurl Manual"
curl_getenv.3 --> Git date: 24 March 2010
.TH curl_getenv 3 "30 April 2004" "libcurl 7.12" "libcurl Manual"
curl_global_cleanup.3 --> Git date: 24 March 2010
.TH curl_global_cleanup 3 "17 Feb 2006" "libcurl 7.8" "libcurl Manual"
curl_global_init.3 --> Git date: 24 March 2010
.TH curl_global_init 3 "11 May 2004" "libcurl 7.12" "libcurl Manual"
curl_global_init_mem.3 --> Git date: 12 May 2004
.TH curl_global_init_mem 3 "10 May 2004" "libcurl 7.12.0" "libcurl Manual"
curl_mprintf.3 --> Git date: 24 March 2010
.TH curl_printf 3 "30 April 2004" "libcurl 7.12" "libcurl Manual"
curl_multi_add_handle.3 --> Git date: 24 March 2010
.TH curl_multi_add_handle 3 "4 March 2002" "libcurl 7.9.5" "libcurl Manual"
curl_multi_assign.3 --> Git date: 24 March 2010
.TH curl_multi_assign 3 "9 Jul 2006" "libcurl 7.16.0" "libcurl Manual"
curl_multi_cleanup.3 --> Git date: 24 March 2010
.TH curl_multi_cleanup 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual"
curl_multi_fdset.3 --> Git date: 24 March 2010
.TH curl_multi_fdset 3 "2 Jan 2006" "libcurl 7.16.0" "libcurl Manual"
curl_multi_info_read.3 --> Git date: 24 March 2010
.TH curl_multi_info_read 3 "18 Dec 2004" "libcurl 7.10.3" "libcurl Manual"
curl_multi_init.3 --> Git date: 24 March 2010
.TH curl_multi_init 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual"
curl_multi_perform.3 --> Git date: 24 March 2010
.TH curl_multi_perform 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual"
curl_multi_remove_handle.3 --> Git date: 24 March 2010
.TH curl_multi_remove_handle 3 "6 March 2002" "libcurl 7.9.5" "libcurl
Manual"
curl_multi_setopt.3 --> Git date: 24 March 2010
.TH curl_multi_setopt 3 "10 Oct 2006" "libcurl 7.16.0" "libcurl Manual"
curl_multi_socket.3 --> Git date: 24 March 2010
.TH curl_multi_socket 3 "9 Jul 2006" "libcurl 7.16.0" "libcurl Manual"
curl_multi_socket_action.3 --> Git date: 10 August 2010
.TH curl_multi_socket_action 3 "9 Jul 2006" "libcurl 7.16.0" "libcurl
Manual"
curl_multi_socket_all.3 --> Git date: 22 December 2005
*** No .TH found! ***
curl_multi_strerror.3 --> Git date: 24 March 2010
.TH curl_multi_strerror 3 "26 Apr 2004" "libcurl 7.12" "libcurl Manual"
curl_multi_timeout.3 --> Git date: 12 April 2010
.TH curl_multi_timeout 3 "2 Jan 2006" "libcurl 7.16.0" "libcurl Manual"
curl_share_cleanup.3 --> Git date: 24 March 2010
.TH curl_share_cleanup 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl Manual"
curl_share_init.3 --> Git date: 24 March 2010
.TH curl_share_init 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl Manual"
curl_share_setopt.3 --> Git date: 24 March 2010
.TH curl_share_setopt 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl Manual"
curl_share_strerror.3 --> Git date: 24 March 2010
.TH curl_share_strerror 3 "26 Apr 2004" "libcurl 7.12" "libcurl Manual"
curl_slist_append.3 --> Git date: 24 March 2010
.TH curl_slist_append 3 "19 Jun 2003" "libcurl 7.10.4" "libcurl Manual"
curl_slist_free_all.3 --> Git date: 24 March 2010
.TH curl_slist_free_all 3 "5 March 2001" "libcurl 7.0" "libcurl Manual"
curl_strequal.3 --> Git date: 24 March 2010
.TH curl_strequal 3 "30 April 2004" "libcurl 7.12" "libcurl Manual"
curl_strnequal.3 --> Git date: 02 April 2004
*** No .TH found! ***
curl_unescape.3 --> Git date: 24 March 2010
.TH curl_unescape 3 "22 March 2001" "libcurl 7.7" "libcurl Manual"
curl_version.3 --> Git date: 24 March 2010
.TH curl_version 3 "5 March 2001" "libcurl 7.0" "libcurl Manual"
curl_version_info.3 --> Git date: 24 March 2010
.TH curl_version_info 3 "10 June 2009" "libcurl 7.19.6" "libcurl Manual"
libcurl.3 --> Git date: 24 March 2010
.TH libcurl 3 "19 March 2002" "libcurl 7.9.6" "libcurl overview"
libcurl-easy.3 --> Git date: 24 March 2010
.TH libcurl 3 "12 Aug 2003" "libcurl 7.10.7" "libcurl easy interface"
libcurl-errors.3 --> Git date: 12 May 2010
.TH libcurl-errors 3 "1 Jan 2010" "libcurl 7.20.0" "libcurl errors"
libcurl-multi.3 --> Git date: 24 March 2010
.TH libcurl-multi 3 "3 Feb 2007" "libcurl 7.16.0" "libcurl multi interface"
libcurl-share.3 --> Git date: 24 March 2010
.TH libcurl-share 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl share interface"
libcurl-tutorial.3 --> Git date: 24 August 2010
.TH libcurl-tutorial 3 "4 Mar 2009" "libcurl" "libcurl programming"

The reason why I checked through the man pages was mainly because I was
looking for way to easily create the other manual formats on Win32
platform, and specially also to create a .chm ...
for this I found halibut:
http://www.chiark.greenend.org.uk/~sgtatham/halibut/
but unfortunately it has its own format, and so it would be required to
convert the existing man pages to the halibut input format ...
but the benefit would then be that we could output all other formats
with one tool which seems to run on every platform (I did already
compile a halibut Win32 executable) ...
Just a thought.

Gün.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-27