diff options
-rw-r--r-- | AUTHORS (renamed from AUTHOR) | 0 | ||||
-rw-r--r-- | INSTALL | 41 | ||||
-rw-r--r-- | Makefile | 37 | ||||
-rw-r--r-- | Makefile.am | 13 | ||||
-rw-r--r-- | NEWS | 0 | ||||
-rw-r--r-- | README | 51 | ||||
-rw-r--r-- | configure.in | 47 | ||||
-rw-r--r-- | doc/Makefile.am | 2 | ||||
-rw-r--r-- | doc/getht.man | 167 | ||||
-rw-r--r-- | src/Makefile.am | 7 | ||||
-rw-r--r-- | src/config.c (renamed from config.c) | 0 | ||||
-rw-r--r-- | src/download.c (renamed from download.c) | 0 | ||||
-rw-r--r-- | src/getht.c (renamed from getht.c) | 2 | ||||
-rw-r--r-- | src/getht.h (renamed from getht.h) | 0 | ||||
-rw-r--r-- | src/issue.h (renamed from issue.h) | 0 | ||||
-rw-r--r-- | src/issuemem.c (renamed from issuemem.c) | 0 | ||||
-rw-r--r-- | src/mediarev.c (renamed from mediarev.c) | 0 | ||||
-rw-r--r-- | src/mediaxml.c (renamed from mediaxml.c) | 0 | ||||
-rw-r--r-- | src/tocxml.c (renamed from tocxml.c) | 0 | ||||
-rw-r--r-- | src/version.h (renamed from version.h) | 2 | ||||
-rw-r--r-- | src/xml.c (renamed from xml.c) | 0 |
21 files changed, 290 insertions, 79 deletions
@@ -1,21 +1,32 @@ -At the moment this project uses a custom (but very basic) makefile -to make and install. This will soon be changed to autotools, but at -present this way works well enough. +To install this package, simply follow the following steps: -For a default install all that is needed is the following: +1. Decompress & untar the archive + $ tar -xjf getht-<version>.tar.bz2 -1. Decompress/archive the project file: - tar -xzf getht-<version>.tar.gz -or - tar -xyf getht-<version>.tar.bz2 +2. Change to the source directory + $ cd getht-<version> -2. Change to hdte directory: - cd getht-<version> +4. Prepare the software for your system + $ ./configure -3. Run make to compile the source: - make + Note that there are several options which can be applied + here, such as prefix and locations of libraries. + For more information run: + $ ./configure --help -4. Use make again to install it (you'll need to have root privilages): - make install +4. Build the software + $ make -For further build options, see the output of "make help" +5. Install the software (ensure that you have superuser + privilages if installing outside of your home directory) + $ make install + + +You can then run the package by typing the following +command into a terminal: +$ getht + +Note that the AutoTools scripts to build and install GetHT are +quite simple, and have not been thoroughly tested. +If you encounter any problems building please let me know, using +one of the methods suggested in the README file. diff --git a/Makefile b/Makefile deleted file mode 100644 index 34a02db..0000000 --- a/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -PREFIX=/usr -DOCS=AUTHOR COPYING CREDITS ChangeLog INSTALL README TODO -CFLAGS+=-g `curl-config --cflags` `xml2-config --cflags` -LDFLAGS+=`curl-config --libs` `xml2-config --libs` - -all: getht - -getht: download.o config.o issuemem.o tocxml.o mediarev.o mediaxml.o xml.o - -tocxml.o mediaxml.o: xml.o - -static: - CFLAGS="$(CFLAGS) -s -static" - @echo "Not implemented yet, sorry." - -clean: - rm -rf *.o - -install: - cp getht $(PREFIX)/bin - mkdir -p $(PREFIX)/doc/getht - cp $(DOCS) $(PREFIX)/doc/getht - -uninstall: - rm $(PREFIX)/bin/getht - rm -r $(PREFIX)/doc/getht - -help: - @echo -e "Make targets:" - @echo -e "make (all)\tBuilds GetHT with default settings" - @echo -e "make install\tInstalls GetHT" - @echo -e "make uninstall\tRemoves GetHT" - @echo -e "make clean\tRemoves all object files" - @echo -e "make static\tBuilds a statically linked GetHT binary" - @echo -e "make help\tPrint this help message" - -.PHONY: all clean install uninstall help diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..8f2b81f --- /dev/null +++ b/Makefile.am @@ -0,0 +1,13 @@ +## A simple file to process with Automake, to produce Makefile.in + +SUBDIRS = src doc + +doc_DATA = \ + AUTHORS \ + BUGS \ + ChangeLog \ + COPYING \ + CREDITS \ + INSTALL \ + NEWS \ + README @@ -1,6 +1,6 @@ -GetHT - The Free Hinduism Today Digital Edition Fetcher +GetHT - The Free Hinduism Today Digital Edition Downloader -Summary: +-Summary The nice people at Hinduism Today have recently begun freely distributing their magazine in pdf format, so that anybody may read a copy for free. @@ -13,36 +13,37 @@ unable to download the new issues. This program is written to change all that. -License: -htde is released under the GPL, see the file COPYING for details. +-License +GetHT is released under the GPL, see the file COPYING for details. Basically this means that you are free to study the program, modify it, and redistribute it however you see fit, provided you extend the same freedom to others by releasing derivatives with the same license. -Proxy Support: +-Dependancies +libxml2 2.0.0+ Compiled with zlib support +libcurl 7.7.2+ + +-Install +For details on how to install GetHT see the INSTALL file. + +-Proxy Support GetHT supports HTTP, SOCKS4 & SOCKS5 proxys (though they haven't been thoroughly tested - let me know if there are any problems). Environmental variables (e.g. http_proxy) are used, but may be overridden with the following lines in the config.ini file. Any lines which are not needed (for example the authentication lines) should just be omitted. The format of the options is: -proxy_type <type_of_proxy> (http, socks4 or socks5) -proxy_address <address> -proxy_port <port> -proxy_auth <proxy_auth_method> (none, basic, digest or ntlm) -proxy_user <proxy_username> -proxy_pass <proxy_password> - -Dependancies: -libxml2 To parse the contents and media files; ensure to compile - with zlib support -libcurl 7.7.2+ To download the necessary issues and periphery -Unless compiled with "make nogui": -fltk 2.0+ To draw and control the windows - -Install: -The project is too small to warrent autoconf or anything else complex, -so simply use the makefile provided to compile and install the software -from source. - -For more details see the included INSTALL file. + proxy_type <type_of_proxy> (http, socks4 or socks5) + proxy_address <address> + proxy_port <port> + proxy_auth <proxy_auth_method> (none, basic, digest or ntlm) + proxy_user <proxy_username> + proxy_pass <proxy_password> + +-Bugs / Problems +This software is very new, so there will undoubtedly be some bugs lingering, +or parts of the program which don't work as expected. +If you encounter problems, there are several ways to get help: + Mailing List : http://lists.nongnu.org/mailman/listinfo/getht-general + Support Tracker : http://savannah.nongnu.org/support/?group=getht + Bug Tracker : http://savannah.nongnu.org/bugs/?group=getht diff --git a/configure.in b/configure.in new file mode 100644 index 0000000..306a49b --- /dev/null +++ b/configure.in @@ -0,0 +1,47 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.61) +AC_INIT(getht, 0.0.1) +AC_CONFIG_SRCDIR([src/]) +AC_CONFIG_AUX_DIR([config]) +AC_CONFIG_HEADER([config.h]) +AM_INIT_AUTOMAKE(AC_PACKAGE_NAME,AC_PACKAGE_VERSION) +AC_LANG([C]) + +# Checks for programs. +AC_PROG_CC +AC_PROG_INSTALL + +# Checks for libraries. + +dnl check for zlib +CHECK_ZLIB() + +dnl check for libxml2 +AM_PATH_XML2([2.0.0]) +CFLAGS="$CFLAGS $XML_CPPFLAGS" +LIBS="$LIBS $XML_LIBS" + +dnl check for libcurl +LIBCURL_CHECK_CONFIG([yes], [7.7.2]) +CFLAGS="$CFLAGS $LIBCURL_CPPFLAGS" +LIBS="$LIBS $LIBCURL" + +# Checks for header files. +AC_HEADER_STDC +AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_SIZE_T + +# Checks for library functions. +AC_FUNC_MALLOC +AC_FUNC_REALLOC +AC_CHECK_FUNCS([mkdir strdup]) + +AC_CONFIG_FILES([Makefile + doc/Makefile + src/Makefile]) +AC_OUTPUT diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..5ab40eb --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,2 @@ +man1_MANS = getht.man +##doc_DATA = *.txt diff --git a/doc/getht.man b/doc/getht.man new file mode 100644 index 0000000..3b6bfef --- /dev/null +++ b/doc/getht.man @@ -0,0 +1,167 @@ +.\" Copyright 2007 Nick White +.\" +.\" This file is part of GetHT +.\" +.\" This is free documentation; 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 2 of +.\" the License, or (at your option) any later version. +.\" +.\" The GNU General Public License's references to "object code" +.\" and "executables" are to be interpreted as the output of any +.\" document formatting or typesetting system, including +.\" intermediate and printed output. +.\" +.\" This manual is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License +.\" along with this program; if not, write to the Free Software +.\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +.TH GETHT 1 +.SH NAME +.B GetHT +\- The Free Hinduism Today Digital Edition Downloader +.SH SYNOPSIS +.TP 5 +\fBgetht +\fI[-uadmnfvh] [-t tocfile] [-m medtocfile]\fR + +.SH DESCRIPTION +.PP +.I GetHT +is a program which downloads multimedia and pdf files +from Hinduism Today. It has good proxy support, and +is small, fast, and simple. + +.I GetHT +is not endorsed by or affiliated with Hinduism Today. + +.SH OPTIONS +.TP +.B \-u, \-\-update +Update the Hinduism Today contents files. +.TP +.B \-a, \-\-download-all +Download all issues of Hinduism Today. +.TP +.B \-d, \-\-download-latest +Download only the latest issue of Hinduism Today. +.TP +.B \-m, \-\-download-all-media +Download all multimedia files distributed by Hinduism +Today. +.TP +.B \-n, \-\-download-latest-media +Download only the multimedia files from the latest +issue of Hinduism Today. +.TP +.B \-f, \-\-force +Force getht to download files, even if they have +already been downloaded. This is useful if a download +has been corrupted or interrupted. +.TP +.B \-t, \-\-tocfile tocfile +Use a different contents file, as specified by tocfile. +.TP +.B \-x, \-\-mediatocfile mediatocfile +Use a different media contents file, as specified by +mediatocfile. +.TP +.B \-h, \-\-help +Print a brief usage message. +.TP +.B \-v, \-\-version +Display the version number. + +.SH CONFIGURATION FILE +All of the settings for GetHT are stored in the +configuration file, which normally resides in +\fB~/.getht/config.ini\fR. + +The format of this file is very simple: +\fB<option> = <setting>\fR +with commented lines starting with a # + +The following options may be set. +.TP +.B issuepath +Stores the path in which all issues and multimedia +files will be saved. The default setting is +\fB~/hinduism_today/\fR +.TP +.B startup_check +Whether to automatically check for new issues each +time the GetHT is executed. \fB1\fR = yes, \fB0\fR = no +The default setting is \fB0\fR +.TP +.B proxy_type +The type of proxy (if any) through which GetHT is to +pass. GetHT currently supports the following options: +\fBhttp\fR, \fBsocks4\fR, and \fBsocks5\fR. +To not use any proxy, simply leave out this line. +.TP +.B proxy_address +The url of the proxy to connect through. +.TP +.B proxy_port +The port of the proxy to connect to. +.TP +.B proxy_auth +The method of authentication (if any) with the proxy. +GetHT currently supports the following options: +\fBbadic\fR, \fBdigest\fR, and \fBntlm\fR. +If you don't need proxy authentication, leave out this +line. +.TP +.B proxy_user +The username with which to connect to the proxy server. +.TP +.B proxy_pass +The password with which to connect to to proxy server. + +.SH FILES +.TP +.B ~/getht/config.ini +configuration file. + +.SH BUGS +.I GetHT +is very new, so there will undoubtedly be some bugs +around, or parts of the program which don't work as +expected. + +If you encounter problems, there are several ways to +get help: +.TP +.B Mailing List +.I http://lists.nongnu.org/mailman/listinfo/getht-general +.TP +.B Support Tracker +.I http://savannah.nongnu.org/support/?group=getht +.TP +.B Bug Tracker +.I http://savannah.nongnu.org/bugs/?group=getht + +.SH LICENSE +Copyright 2007 Nick White + +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 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +.SH AUTHOR +GetHT is at present primarily the work of Nick White, see the AUTHORS +file for full credits and contact details. diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..0bf3452 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,7 @@ +## A simple file to process with Automake, to produce Makefile.in + +bin_PROGRAMS = getht + +getht_SOURCES = config.c download.c getht.c issuemem.c \ + mediarev.c mediaxml.c tocxml.c xml.c \ + getht.h issue.h version.h diff --git a/download.c b/src/download.c index 1108b6d..1108b6d 100644 --- a/download.c +++ b/src/download.c @@ -56,7 +56,7 @@ int main(int argc, char *argv[]) if(!opendir(getht_path)) if(mkdir(getht_path, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)) { - fprintf(stderr,"Cannot open/create directory %s",getht_path); + fprintf(stderr,"Cannot open/create directory %s\n",getht_path); printf("Please enter the path of a directory to save settings in: "); scanf("%s", getht_path); } diff --git a/issuemem.c b/src/issuemem.c index 3a40d7e..3a40d7e 100644 --- a/issuemem.c +++ b/src/issuemem.c diff --git a/mediarev.c b/src/mediarev.c index e8dd3e6..e8dd3e6 100644 --- a/mediarev.c +++ b/src/mediarev.c diff --git a/mediaxml.c b/src/mediaxml.c index bcb2da1..bcb2da1 100644 --- a/mediaxml.c +++ b/src/mediaxml.c diff --git a/version.h b/src/version.h index 20383e4..0713569 100644 --- a/version.h +++ b/src/version.h @@ -19,4 +19,4 @@ * */ -#define VERSION "pre-release" +#define VERSION "0.0.1" |