From 97d4c97c52ac7b7763acca426b1ec2fc15f5efee Mon Sep 17 00:00:00 2001 From: Loui Chang Date: Thu, 21 Aug 2014 04:29:15 -0400 Subject: [PATCH 1/6] Generate man pages from asciidoc Working directly with g/roff is a pain. Also changed the formatting of toxic.conf.5 a bit. Signed-off-by: Loui Chang --- build/Makefile | 15 +++- cfg/targets/help.mk | 1 + cfg/targets/install.mk | 11 ++- doc/toxic.1.asc | 91 +++++++++++++++++++++ doc/toxic.conf.5.asc | 179 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 290 insertions(+), 7 deletions(-) create mode 100644 doc/toxic.1.asc create mode 100644 doc/toxic.conf.5.asc diff --git a/build/Makefile b/build/Makefile index 4c85d7d..93c5fd1 100644 --- a/build/Makefile +++ b/build/Makefile @@ -4,12 +4,15 @@ VERSION = $(TOXIC_VERSION)_r$(REV) BASE_DIR = $(shell cd .. && pwd -P) CFG_DIR = $(BASE_DIR)/cfg +DOC_DIR = $(BASE_DIR)/doc SRC_DIR = $(BASE_DIR)/src PREFIX = /usr/local BINDIR = $(PREFIX)/bin DATADIR = $(PREFIX)/share/toxic MANDIR = $(PREFIX)/share/man +MANFILES = toxic.1 toxic.conf.5 + LIBS = libtoxcore ncursesw libconfig CFLAGS = -std=gnu99 -pthread -Wall -g @@ -53,7 +56,7 @@ endif -include $(CFG_DIR)/checks/check_features.mk # Targets -all: toxic +all: toxic doc toxic: $(OBJ) @echo " LD $@" @@ -64,8 +67,18 @@ toxic: $(OBJ) @$(CC) $(CFLAGS) -o $*.o -c $(SRC_DIR)/$*.c @$(CC) -MM $(CFLAGS) $(SRC_DIR)/$*.c > $*.d +doc: $(MANFILES) + +%: $(DOC_DIR)/%.asc + @echo " Generating man page $@" + @a2x -f manpage -a revdate=$(shell git log -1 --date=short --format="%ad" $<) \ + -a manmanual="toxic manual" -a mansource=toxic \ + -a manversion=$(VERSION) -a datadir=$(DATADIR) $< + @mv $(DOC_DIR)/$@ . + clean: rm -rf *.d *.o toxic + rm -rf $(MANFILES) -include $(OBJ:.o=.d) diff --git a/cfg/targets/help.mk b/cfg/targets/help.mk index 6848df0..0eba1b9 100644 --- a/cfg/targets/help.mk +++ b/cfg/targets/help.mk @@ -3,6 +3,7 @@ help: @echo "-- Targets --" @echo " all: Build toxic [DEFAULT]" @echo " toxic: Build toxic" + @echo " doc: Build documentation" @echo " install: Build toxic and install it in PREFIX (default PREFIX is \"$(abspath $(PREFIX))\")" @echo " clean: Remove built files" @echo " help: This help" diff --git a/cfg/targets/install.mk b/cfg/targets/install.mk index 2e12dcd..0d7b781 100644 --- a/cfg/targets/install.mk +++ b/cfg/targets/install.mk @@ -1,19 +1,19 @@ MISC_DIR = $(BASE_DIR)/misc -DOC_DIR = $(BASE_DIR)/doc SND_DIR = $(BASE_DIR)/sounds DATAFILES = DHTnodes DNSservers toxic.conf.example -MANFILES = toxic.1 toxic.conf.5 SNDFILES = ContactLogsIn.wav ContactLogsOut.wav Error.wav IncomingCall.wav SNDFILES += LogIn.wav LogOut.wav NewMessage.wav OutgoingCall.wav SNDFILES += TransferComplete.wav TransferPending.wav -install: toxic +install: toxic doc mkdir -p $(abspath $(DESTDIR)/$(BINDIR)) mkdir -p $(abspath $(DESTDIR)/$(DATADIR)) mkdir -p $(abspath $(DESTDIR)/$(DATADIR))/sounds mkdir -p $(abspath $(DESTDIR)/$(MANDIR)) + @echo "Installing toxic executable" @install -m 0755 toxic $(abspath $(DESTDIR)/$(BINDIR)) + @echo "Installing data files" @for f in $(DATAFILES) ; do \ install -m 0644 $(MISC_DIR)/$$f $(abspath $(DESTDIR)/$(DATADIR)) ;\ @@ -23,14 +23,13 @@ install: toxic @for f in $(SNDFILES) ; do \ install -m 0644 $(SND_DIR)/$$f $(abspath $(DESTDIR)/$(DATADIR))/sounds ;\ done + @echo "Installing man pages" @for f in $(MANFILES) ; do \ section=$(abspath $(DESTDIR)/$(MANDIR))/man`echo $$f | rev | cut -d "." -f 1` ;\ file=$$section/$$f ;\ mkdir -p $$section ;\ - install -m 0644 $(DOC_DIR)/$$f $$file ;\ - sed -i'' -e 's:__VERSION__:'$(VERSION)':g' $$file ;\ - sed -i'' -e 's:__DATADIR__:'$(abspath $(DATADIR))':g' $$file ;\ + install -m 0644 $$f $$file ;\ gzip -f -9 $$file ;\ done diff --git a/doc/toxic.1.asc b/doc/toxic.1.asc new file mode 100644 index 0000000..167874c --- /dev/null +++ b/doc/toxic.1.asc @@ -0,0 +1,91 @@ +toxic(1) +======== + +NAME +---- +toxic - CLI client for Tox + +SYNOPSIS +-------- +*toxic* [-f 'data-file'] [-x] [-4] [-c 'config-file'] [-n 'nodes-file'] [-h] + +DESCRIPTION +----------- +toxic is an ncurses-based instant messaging client for Tox which formerly +resided in the Tox core repository, and is now available as a standalone +application. + +OPTIONS +------- +-4, --ipv4:: + Force IPv4 connection + +-b, --debug:: + Enable stderr for debugging. Redirect output to + avoid breaking the curses interface and better capture messages. + +-c, --config config-file:: + Use specified 'config-file' instead of '~/.config/tox/toxic.conf' + +-d, --default_locale:: + Use default locale + +-f, --file data-file:: + Use specified 'data-file' instead of '~/.config/tox/data' + +-h, --help:: + Show help message + +-n, --nodes nodes-file:: + Use specified 'nodes-file' for DHT bootstrap nodes, instead of + '{datadir}/DHTnodes' + +-o, --noconnect:: + Do not connect to the DHT network + +-p, --proxy:: + Use proxy: Requires [IP] [port] + +-r, --dnslist:: + Use specified DNSservers file + +-t, --force-tcp:: + Force TCP connection (use this with proxies) + +-x, --nodata:: + Ignore data file + +FILES +----- +{datadir}/DHTnodes:: + Default list of DHT bootstrap nodes. + +~/.config/tox/data:: + Savestate which contains your personal info (nickname, Tox ID, contacts, + etc) + +~/.config/tox/toxic.conf:: + Configuration file. See *toxic.conf*(5) for more details. + +{datadir}/toxic.conf.example:: + Configuration example. + +BUGS +---- +Unicode characters with a width larger than 1 column may cause strange +behaviour. Expect more bugs and bad behaviour: this software is in a +pre-alpha stage. + +AUTHORS +------- +JFreegman + +SEE ALSO +-------- +*toxic.conf*(5) + +LINKS +----- +Project page: + +IRC channel: chat.freenode.net#tox diff --git a/doc/toxic.conf.5.asc b/doc/toxic.conf.5.asc new file mode 100644 index 0000000..6c6e021 --- /dev/null +++ b/doc/toxic.conf.5.asc @@ -0,0 +1,179 @@ +toxic.conf(5) +============= + +NAME +---- +toxic.conf - Configuration file for toxic + + +SYNOPSIS +-------- +~/.config/tox/toxic.conf + + +DESCRIPTION +----------- +The 'toxic.conf' file is the main configuration file for *toxic*(1) client. +It uses syntax accepted by *libconfig*. +Lines starting with "//" are comments and will be ignored. + + +EXAMPLE +------- +---- +// Configuration for interface +ui = { + timestamps = true; + alerts = false; +}; + +// Configuration for audio +audio = { + input_device = 1; +}; +---- + + +OPTIONS +------- +*ui*:: + Configuration related to interface elements. + + *timestamps*;; + Enable or disable timestamps. true or false + + *alerts*;; + Enable or disable terminal alerts on events. true or false + + *native_colors*;; + Select between native terminal colors and toxic color theme. true or false + + *autolog*;; + Enable or disable autologging. true or false + + *time_format*;; + Select between 24 and 12 hour time. Specify 24 or 12 + + *show_typing_other*;; + Show when others are typing in a 1-on-1 chat. true or false + + *show_typing_self*;; + Show others when you're typing in a 1-on-1 chat. true or false + + *history_size*;; + Maximum lines for chat window history. Integer value. (for example: 700) + + +*audio*:: + Configuration related to audio devices. + + *input_device*;; + Audio input device. Integer value. Number corresponds to `/lsdev in` + + *output_device*;; + Audio output device. Integer value. Number corresponds to `/lsdev out` + + *VAD_treshold*;; + Voice Activity Detection treshold. Float value. Recommended values are + around 40.0 + +*tox*:: + Configuration related to file transfer. + + *download_path*;; + Default path for downloads. String value. Absolute path where to store + downloaded files + +*sounds*:: + Configuration related to notification sounds. + Special value "silent" can be used to disable a specific notification. + + Each value is a string which corresponds to the absolute path of a wav + sound file. + + *error*;; + Sound to play when an error occurs. + + *self_log_in*;; + Sound to play when you log in. + + *self_log_out*;; + Sound to play when you log out. + + *user_log_in*;; + Sound to play when a contact become online. + + *user_log_out*;; + Sound to play when a contact become offline. + + *call_incoming*;; + Sound to play when you receive an incoming call. + + *call_outgoing*;; + Sound to play when you start a call. + + *generic_message*;; + Sound to play when an event occurs. + + *transfer_pending*;; + Sound to play when you receive a file transfer request. + + *transfer_completed*;; + Sound to play when a file transfer is completed. + +*keys*:: + Configuration related to user interface interaction. + Currently supported: Ctrl modified keys, Tab, PAGEUP and PAGEDOWN. + + Each value is a string which corresponds to a key combination. + + *next_tab*;; + Key combination to switch next tab. + + *prev_tab*;; + Key combination to switch previous tab. + + *scroll_line_up*;; + Key combination to scroll one line up. + + *scroll_line_down*;; + Key combination to scroll one line down. + + *half_page_up*;; + Key combination to scroll half page up. + + *half_page_down*;; + Key combination to scroll half page down. + + *page_bottom*;; + Key combination to scroll to page bottom. + + *peer_list_up*;; + Key combination to scroll contacts list up. + + *peer_list_down*;; + Key combination to scroll contacts list down. + + +FILES +----- +~/.config/tox/toxic.conf:: + Main configuration file. + +{datadir}/toxic.conf.example:: + Configuration example. + + +SEE ALSO +-------- +*toxic*(1) + + +RESOURCES +--------- +Project page: + +IRC channel: chat.freenode.net#tox + + +AUTHORS +------- +JFreegman From 15cc87bffd5f38b8e7572dd30bd922d7519823b9 Mon Sep 17 00:00:00 2001 From: Loui Chang Date: Thu, 21 Aug 2014 04:40:10 -0400 Subject: [PATCH 2/6] Remove old man pages. Signed-off-by: Loui Chang --- doc/toxic.1 | 74 ------------ doc/toxic.conf.5 | 295 ----------------------------------------------- 2 files changed, 369 deletions(-) delete mode 100644 doc/toxic.1 delete mode 100644 doc/toxic.conf.5 diff --git a/doc/toxic.1 b/doc/toxic.1 deleted file mode 100644 index 8d58691..0000000 --- a/doc/toxic.1 +++ /dev/null @@ -1,74 +0,0 @@ -.TH TOXIC 1 "August 2014" "Toxic v__VERSION__" "User Manual" -.SH NAME -Toxic \- CLI client for Tox -.SH SYNOPSYS -.B toxic [\-f -.I data\-file -.B ] [\-x] [\-4] [\-c -.I config\-file -.B ] [\-n -.I nodes\-file -.B ] [\-h] -.SH DESCRIPTION -Toxic is an ncurses-based instant messaging client for Tox which formerly -resided in the Tox core repository, and is now available as a standalone -application. -.SH OPTIONS -.IP "\-4, \-\-ipv4" -Force IPv4 connection -.IP "\-b, \-\-debug -Enable stderr for debugging. Redirect output to avoid breaking -the curses interface and better capture messages. -.IP "\-c, \-\-config config\-file" -Use specified -.IP "\-d, \-\-default_locale -Use default locale -.I config\-file -instead of -.IR ~/.config/tox/toxic.conf -.IP "\-f, \-\-file data\-file" -Use specified -.I data\-file -instead of -.IR ~/.config/tox/data -.IP "\-h, \-\-help" -Show help message -.IP "\-n, \-\-nodes nodes\-file" -Use specified -.I nodes\-file -for DHT bootstrap nodes, instead of -.IR __DATADIR__/DHTnodes -.IP "\-o, \-\-noconnect" -Do not connect to the DHT network -.IP "\-p, \-\-proxy" -Use proxy: Requires [IP] [port] -.IP "\-r, \-\-dnslist" -Use specified DNSservers file -.IP "\-t, \-\-force\-tcp" -Force TCP connection (use this with proxies) -.IP "\-x, \-\-nodata" -Ignore data file -.SH FILES -.IP __DATADIR__/DHTnodes -Default list of DHT bootstrap nodes. -.IP ~/.config/tox/data -Savestate which contains your personal info (nickname, Tox ID,...) and -your contacts list. -.IP ~/.config/tox/toxic.conf -Configuration file. See -.BR toxic.conf (5) -for more details. -.IP __DATADIR__/toxic.conf.example -Configuration example. -.SH BUGS -Unicode characters with a width larger than 1 column may cause -strange behaviour. Expect more bugs and bad -behaviour: this software is in a pre\-alpha stage. -.SH AUTHORS -JFreegman -.SH SEE ALSO -.BR toxic.conf (5) -.SH LINKS -Project page on github: https://github.com/Tox/toxic -.br -IRC channel on Freenode: chat.freenode.net#tox diff --git a/doc/toxic.conf.5 b/doc/toxic.conf.5 deleted file mode 100644 index 6d42c1c..0000000 --- a/doc/toxic.conf.5 +++ /dev/null @@ -1,295 +0,0 @@ -.TH TOXIC.CONF 5 "August 2014" "Toxic v__VERSION__" "User Manual" -.SH NAME -toxic.conf \- Configuration file for toxic(1) -.SH DESCRIPTION -The -.I toxic.conf -file is the main configuration file for -.BR toxic (1) -client. -.SH SYNTAX -.I
-.B = { -.PP -.IB = ; -.br -.IB = ; -.br - ... -.PP -.B }; -.PP -Uses syntax accepted by libconfig. -.br -Lines starting with "//" are comments and will be ignored. -.PP -Sections: -.PP -.B ui -.RS -Configurations related to user interface elements. -.PP -Keys: -.br -.B timestamps -.RS -Enable or disable timestamps. -.br -Values: 'true' to enable, 'false' to disable -.RE -.PP -.B alerts -.RS -Enable or disable terminal alerts on events. -.br -Values: 'true' to enable, 'false' to disable -.RE -.PP -.B native_colors -.RS -Select between native terminal colors and toxic color theme. -.br -Values: 'true' for terminal colours, 'false' for toxic colours -.RE -.PP -.B autolog -.RS -Enable or disable autologging. -.br -Values: 'true' to enable, 'false' to disable -.RE -.PP -.B time_format -.RS -Select between 24 and 12 hour time. -.br -Values: 24, 12 -.RE -.PP -.B show_typing_other -.RS -Show you when others are typing in a 1-on-1 chat -.br -Values: 'true' to enable, 'false' to disable -.RE -.PP -.B show_typing_self -.RS -Show others when you're typing in a 1-on-1 chat -.br -Values: 'true' to enable, 'false' to disable -.RE -.PP -.B history_size -.RS -Maximum lines for chat window history. -.br -Values: (for example: 700) -.RE -.RE -.PP -.B audio -.RS -Configurations related to audio devices. -.PP -Keys: -.br -.B input_device -.RS -Audio input device. -.br -Values: (number correspond to "/lsdev in") -.RE -.PP -.B output_device -.RS -Audio output device. -.br -Values: (number correspond to "/lsdev out") -.RE -.PP -.B VAD_treshold -.RS -Voice Activity Detection treshold. -.br -Values: (recommended values are around 40.0) -.RE -.RE -.PP -.B tox -.RS -Configurations related to file transfer. -.PP -Keys: -.br -.B download_path -.RS -Default path for downloads. -.br -Values: (absolute path where to store downloaded files) -.RE -.RE -.PP -.B sounds -.RS -Configurations related to notification sounds. -.br -(Special value "silent" can be used to disable a specific notification) -.PP -Keys: -.br -.B error -.RS -Sound to play when an error occurs. -.br -Values: (sound file absolute path) -.RE -.PP -.B self_log_in -.RS -Sound to play when you log in. -.br -Values: (sound file absolute path) -.RE -.PP -.B self_log_out -.RS -Sound to play when you log out. -.br -Values: (sound file absolute path) -.RE -.PP -.B user_log_in -.RS -Sound to play when a contact become online. -.br -Values: (sound file absolute path) -.RE -.PP -.B user_log_out -.RS -Sound to play when a contact become offline. -.br -Values: (sound file absolute path) -.RE -.PP -.B call_incoming -.RS -Sound to play when you receive an incoming call. -.br -Values: (sound file absolute path) -.RE -.PP -.B call_outgoing -.RS -Sound to play when you start a call. -.br -Values: (sound file absolute path) -.RE -.PP -.B generic_message -.RS -Sound to play when an event occurs. -.br -Values: (sound file absolute path) -.RE -.PP -.B transfer_pending -.RS -Sound to play when you receive a file transfer request. -.br -Values: (sound file absolute path) -.RE -.PP -.B transfer_completed -.RS -Sound to play when a file transfer is completed. -.br -Values: (sound file absolute path) -.RE -.RE -.PP -.B keys -.RS -Configurations related to user interface interaction. -.br -(Currently supported: Ctrl modified keys, Tab, PAGEUP and PAGEDOWN (case insensitive)) -.PP -Keys: -.br -.B next_tab -.RS -Key combination to switch next tab. -.br -Values: (key combination) -.RE -.PP -.B prev_tab -.RS -Key combination to switch previous tab. -.br -Values: (key combination) -.RE -.PP -.B scroll_line_up -.RS -Key combination to scroll one line up. -.br -Values: (key combination) -.RE -.PP -.B scroll_line_down -.RS -Key combination to scroll one line down. -.br -Values: (key combination) -.RE -.PP -.B half_page_up -.RS -Key combination to scroll half page up. -.br -Values: (key combination) -.RE -.PP -.B half_page_down -.RS -Key combination to scroll half page down. -.br -Values: (key combination) -.RE -.PP -.B page_bottom -.RS -Key combination to scroll to page bottom. -.br -Values: (key combination) -.RE -.PP -.B peer_list_up -.RS -Key combination to scroll contacts list up. -.br -Values: (key combination) -.RE -.PP -.B peer_list_down -.RS -Key combination to scroll contacts list down. -.br -Values: (key combination) -.RE -.RE -.SH FILES -.IP ~/.config/tox/toxic.conf -Main configuration file. -.IP __DATADIR__/toxic.conf.example -Configuration example. -.SH AUTHORS -JFreegman -.SH SEE ALSO -.BR toxic (1) -.SH LINKS -Project page on github: https://github.com/Tox/toxic -.br -IRC channel on Freenode: chat.freenode.net#tox From e117bd398538b261c0931d8b09d3d3667cb11d6d Mon Sep 17 00:00:00 2001 From: Loui Chang Date: Thu, 21 Aug 2014 05:00:15 -0400 Subject: [PATCH 3/6] Add Asciidoc to README and travis Signed-off-by: Loui Chang --- .travis.yml | 4 ++-- README.md | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0f560e2..3f4bde2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,8 @@ compiler: # - clang # Fix me before_script: - # Installing yasm (needed for compiling vpx) and openal - - sudo apt-get -yq install yasm libopenal-dev libconfig-dev libalut-dev + # Installing yasm (needed for compiling vpx) and openal, asciidoc + - sudo apt-get -yq install yasm libopenal-dev libconfig-dev libalut-dev asciidoc # Installing libsodium, needed for toxcore - git clone https://github.com/jedisct1/libsodium.git libsodium - cd libsodium diff --git a/README.md b/README.md index a91f474..14085dc 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,9 @@ Toxic is a [Tox](https://tox.im)-based instant messenging client which formerly ##### Desktop notifications * [libnotify](https://developer.gnome.org/libnotify) (for Debian based systems, 'libnotify-dev') +##### Documentation +* [Asciidoc](http://asciidoc.org/index.html) Only required for building manpages. + ### Compiling 1. `cd build/` 2. `make PREFIX="/where/to/install"` From 690f0221b53b49c07b7888697b7e477df4320261 Mon Sep 17 00:00:00 2001 From: Loui Chang Date: Sun, 24 Aug 2014 00:16:55 -0400 Subject: [PATCH 4/6] Add generated man pages. Signed-off-by: Loui Chang --- doc/toxic.1 | 143 +++++++++++++++++++++++++ doc/toxic.conf.5 | 266 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 409 insertions(+) create mode 100644 doc/toxic.1 create mode 100644 doc/toxic.conf.5 diff --git a/doc/toxic.1 b/doc/toxic.1 new file mode 100644 index 0000000..5ae7023 --- /dev/null +++ b/doc/toxic.1 @@ -0,0 +1,143 @@ +'\" t +.\" Title: toxic +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 2014-08-21 +.\" Manual: toxic manual +.\" Source: toxic __VERSION__ +.\" Language: English +.\" +.TH "TOXIC" "1" "2014\-08\-21" "toxic __VERSION__" "toxic manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +toxic \- CLI client for Tox +.SH "SYNOPSIS" +.sp +\fBtoxic\fR [\-f \fIdata\-file\fR] [\-x] [\-4] [\-c \fIconfig\-file\fR] [\-n \fInodes\-file\fR] [\-h] +.SH "DESCRIPTION" +.sp +toxic is an ncurses\-based instant messaging client for Tox which formerly resided in the Tox core repository, and is now available as a standalone application\&. +.SH "OPTIONS" +.PP +\-4, \-\-ipv4 +.RS 4 +Force IPv4 connection +.RE +.PP +\-b, \-\-debug +.RS 4 +Enable stderr for debugging\&. Redirect output to avoid breaking the curses interface and better capture messages\&. +.RE +.PP +\-c, \-\-config config\-file +.RS 4 +Use specified +\fIconfig\-file\fR +instead of +\fI~/\&.config/tox/toxic\&.conf\fR +.RE +.PP +\-d, \-\-default_locale +.RS 4 +Use default locale +.RE +.PP +\-f, \-\-file data\-file +.RS 4 +Use specified +\fIdata\-file\fR +instead of +\fI~/\&.config/tox/data\fR +.RE +.PP +\-h, \-\-help +.RS 4 +Show help message +.RE +.PP +\-n, \-\-nodes nodes\-file +.RS 4 +Use specified +\fInodes\-file\fR +for DHT bootstrap nodes, instead of +\fI__DATADIR__/DHTnodes\fR +.RE +.PP +\-o, \-\-noconnect +.RS 4 +Do not connect to the DHT network +.RE +.PP +\-p, \-\-proxy +.RS 4 +Use proxy: Requires [IP] [port] +.RE +.PP +\-r, \-\-dnslist +.RS 4 +Use specified DNSservers file +.RE +.PP +\-t, \-\-force\-tcp +.RS 4 +Force TCP connection (use this with proxies) +.RE +.PP +\-x, \-\-nodata +.RS 4 +Ignore data file +.RE +.SH "FILES" +.PP +__DATADIR__/DHTnodes +.RS 4 +Default list of DHT bootstrap nodes\&. +.RE +.PP +~/\&.config/tox/data +.RS 4 +Savestate which contains your personal info (nickname, Tox ID, contacts, etc) +.RE +.PP +~/\&.config/tox/toxic\&.conf +.RS 4 +Configuration file\&. See +\fBtoxic\&.conf\fR(5) for more details\&. +.RE +.PP +__DATADIR__/toxic\&.conf\&.example +.RS 4 +Configuration example\&. +.RE +.SH "BUGS" +.sp +Unicode characters with a width larger than 1 column may cause strange behaviour\&. Expect more bugs and bad behaviour: this software is in a pre\-alpha stage\&. +.SH "AUTHORS" +.sp +JFreegman +.SH "SEE ALSO" +.sp +\fBtoxic\&.conf\fR(5) +.SH "LINKS" +.sp +Project page: https://github\&.com/Tox/toxic +.sp +IRC channel: chat\&.freenode\&.net#tox diff --git a/doc/toxic.conf.5 b/doc/toxic.conf.5 new file mode 100644 index 0000000..f4c5bc5 --- /dev/null +++ b/doc/toxic.conf.5 @@ -0,0 +1,266 @@ +'\" t +.\" Title: toxic.conf +.\" Author: [see the "AUTHORS" section] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 2014-08-21 +.\" Manual: toxic manual +.\" Source: toxic __VERSION__ +.\" Language: English +.\" +.TH "TOXIC\&.CONF" "5" "2014\-08\-21" "toxic __VERSION__" "toxic manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +toxic.conf \- Configuration file for toxic +.SH "SYNOPSIS" +.sp +~/\&.config/tox/toxic\&.conf +.SH "DESCRIPTION" +.sp +The \fItoxic\&.conf\fR file is the main configuration file for \fBtoxic\fR(1) client\&. It uses syntax accepted by \fBlibconfig\fR\&. Lines starting with "//" are comments and will be ignored\&. +.SH "EXAMPLE" +.sp +.if n \{\ +.RS 4 +.\} +.nf +// Configuration for interface +ui = { + timestamps = true; + alerts = false; +}; + +// Configuration for audio +audio = { + input_device = 1; +}; +.fi +.if n \{\ +.RE +.\} +.SH "OPTIONS" +.PP +\fBui\fR +.RS 4 +Configuration related to interface elements\&. +.PP +\fBtimestamps\fR +.RS 4 +Enable or disable timestamps\&. true or false +.RE +.PP +\fBalerts\fR +.RS 4 +Enable or disable terminal alerts on events\&. true or false +.RE +.PP +\fBnative_colors\fR +.RS 4 +Select between native terminal colors and toxic color theme\&. true or false +.RE +.PP +\fBautolog\fR +.RS 4 +Enable or disable autologging\&. true or false +.RE +.PP +\fBtime_format\fR +.RS 4 +Select between 24 and 12 hour time\&. Specify 24 or 12 +.RE +.PP +\fBshow_typing_other\fR +.RS 4 +Show when others are typing in a 1\-on\-1 chat\&. true or false +.RE +.PP +\fBshow_typing_self\fR +.RS 4 +Show others when you\(cqre typing in a 1\-on\-1 chat\&. true or false +.RE +.PP +\fBhistory_size\fR +.RS 4 +Maximum lines for chat window history\&. Integer value\&. (for example: 700) +.RE +.RE +.PP +\fBaudio\fR +.RS 4 +Configuration related to audio devices\&. +.PP +\fBinput_device\fR +.RS 4 +Audio input device\&. Integer value\&. Number corresponds to +/lsdev in +.RE +.PP +\fBoutput_device\fR +.RS 4 +Audio output device\&. Integer value\&. Number corresponds to +/lsdev out +.RE +.PP +\fBVAD_treshold\fR +.RS 4 +Voice Activity Detection treshold\&. Float value\&. Recommended values are around 40\&.0 +.RE +.RE +.PP +\fBtox\fR +.RS 4 +Configuration related to file transfer\&. +.PP +\fBdownload_path\fR +.RS 4 +Default path for downloads\&. String value\&. Absolute path where to store downloaded files +.RE +.RE +.PP +\fBsounds\fR +.RS 4 +Configuration related to notification sounds\&. Special value "silent" can be used to disable a specific notification\&. + +Each value is a string which corresponds to the absolute path of a wav sound file\&. +.PP +\fBerror\fR +.RS 4 +Sound to play when an error occurs\&. +.RE +.PP +\fBself_log_in\fR +.RS 4 +Sound to play when you log in\&. +.RE +.PP +\fBself_log_out\fR +.RS 4 +Sound to play when you log out\&. +.RE +.PP +\fBuser_log_in\fR +.RS 4 +Sound to play when a contact become online\&. +.RE +.PP +\fBuser_log_out\fR +.RS 4 +Sound to play when a contact become offline\&. +.RE +.PP +\fBcall_incoming\fR +.RS 4 +Sound to play when you receive an incoming call\&. +.RE +.PP +\fBcall_outgoing\fR +.RS 4 +Sound to play when you start a call\&. +.RE +.PP +\fBgeneric_message\fR +.RS 4 +Sound to play when an event occurs\&. +.RE +.PP +\fBtransfer_pending\fR +.RS 4 +Sound to play when you receive a file transfer request\&. +.RE +.PP +\fBtransfer_completed\fR +.RS 4 +Sound to play when a file transfer is completed\&. +.RE +.RE +.PP +\fBkeys\fR +.RS 4 +Configuration related to user interface interaction\&. Currently supported: Ctrl modified keys, Tab, PAGEUP and PAGEDOWN\&. + +Each value is a string which corresponds to a key combination\&. +.PP +\fBnext_tab\fR +.RS 4 +Key combination to switch next tab\&. +.RE +.PP +\fBprev_tab\fR +.RS 4 +Key combination to switch previous tab\&. +.RE +.PP +\fBscroll_line_up\fR +.RS 4 +Key combination to scroll one line up\&. +.RE +.PP +\fBscroll_line_down\fR +.RS 4 +Key combination to scroll one line down\&. +.RE +.PP +\fBhalf_page_up\fR +.RS 4 +Key combination to scroll half page up\&. +.RE +.PP +\fBhalf_page_down\fR +.RS 4 +Key combination to scroll half page down\&. +.RE +.PP +\fBpage_bottom\fR +.RS 4 +Key combination to scroll to page bottom\&. +.RE +.PP +\fBpeer_list_up\fR +.RS 4 +Key combination to scroll contacts list up\&. +.RE +.PP +\fBpeer_list_down\fR +.RS 4 +Key combination to scroll contacts list down\&. +.RE +.RE +.SH "FILES" +.PP +~/\&.config/tox/toxic\&.conf +.RS 4 +Main configuration file\&. +.RE +.PP +__DATADIR__/toxic\&.conf\&.example +.RS 4 +Configuration example\&. +.RE +.SH "SEE ALSO" +.sp +\fBtoxic\fR(1) +.SH "RESOURCES" +.sp +Project page: https://github\&.com/Tox/toxic +.sp +IRC channel: chat\&.freenode\&.net#tox +.SH "AUTHORS" +.sp +JFreegman From 1a8fdb1b99f9011762d9383fff7091dcc777e78b Mon Sep 17 00:00:00 2001 From: Loui Chang Date: Sun, 24 Aug 2014 16:34:16 -0400 Subject: [PATCH 5/6] Make asciidoc 'optional' Run `make doc` in the build directory after editing the asciidoc to regenerate the manpages. Changes to asciidoc source and generated man pages will need to be commited together. Signed-off-by: Loui Chang --- .travis.yml | 4 ++-- README.md | 3 ++- build/Makefile | 11 +++++------ cfg/targets/install.mk | 4 +++- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3f4bde2..0f560e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,8 @@ compiler: # - clang # Fix me before_script: - # Installing yasm (needed for compiling vpx) and openal, asciidoc - - sudo apt-get -yq install yasm libopenal-dev libconfig-dev libalut-dev asciidoc + # Installing yasm (needed for compiling vpx) and openal + - sudo apt-get -yq install yasm libopenal-dev libconfig-dev libalut-dev # Installing libsodium, needed for toxcore - git clone https://github.com/jedisct1/libsodium.git libsodium - cd libsodium diff --git a/README.md b/README.md index 14085dc..f0bc319 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,8 @@ Toxic is a [Tox](https://tox.im)-based instant messenging client which formerly * [libnotify](https://developer.gnome.org/libnotify) (for Debian based systems, 'libnotify-dev') ##### Documentation -* [Asciidoc](http://asciidoc.org/index.html) Only required for building manpages. +* [Asciidoc](http://asciidoc.org/index.html) Only required for regenerating manpages. +* Run `make doc` in the build directory after editing the asciidoc to regenerate the manpages. ### Compiling 1. `cd build/` diff --git a/build/Makefile b/build/Makefile index 93c5fd1..d4928d3 100644 --- a/build/Makefile +++ b/build/Makefile @@ -67,14 +67,13 @@ toxic: $(OBJ) @$(CC) $(CFLAGS) -o $*.o -c $(SRC_DIR)/$*.c @$(CC) -MM $(CFLAGS) $(SRC_DIR)/$*.c > $*.d -doc: $(MANFILES) +doc: $(MANFILES:%=$(DOC_DIR)/%) -%: $(DOC_DIR)/%.asc - @echo " Generating man page $@" +$(DOC_DIR)/%: $(DOC_DIR)/%.asc + @echo " Generating man page $(@F)" @a2x -f manpage -a revdate=$(shell git log -1 --date=short --format="%ad" $<) \ -a manmanual="toxic manual" -a mansource=toxic \ - -a manversion=$(VERSION) -a datadir=$(DATADIR) $< - @mv $(DOC_DIR)/$@ . + -a manversion=__VERSION__ -a datadir=__DATADIR__ $< clean: rm -rf *.d *.o toxic @@ -84,4 +83,4 @@ clean: -include $(CFG_DIR)/targets/*.mk -.PHONY: clean all +.PHONY: clean all doc diff --git a/cfg/targets/install.mk b/cfg/targets/install.mk index 0d7b781..6acd0a8 100644 --- a/cfg/targets/install.mk +++ b/cfg/targets/install.mk @@ -29,7 +29,9 @@ install: toxic doc section=$(abspath $(DESTDIR)/$(MANDIR))/man`echo $$f | rev | cut -d "." -f 1` ;\ file=$$section/$$f ;\ mkdir -p $$section ;\ - install -m 0644 $$f $$file ;\ + install -m 0644 $(DOC_DIR)/$$f $$file ;\ + sed -i'' -e 's:__VERSION__:'$(VERSION)':g' $$file ;\ + sed -i'' -e 's:__DATADIR__:'$(abspath $(DATADIR))':g' $$file ;\ gzip -f -9 $$file ;\ done From 328587ad9c176ccd320c1797f204228eedd44ff2 Mon Sep 17 00:00:00 2001 From: Loui Chang Date: Sun, 24 Aug 2014 17:00:25 -0400 Subject: [PATCH 6/6] doc: Make asciidoc extra optional. Completely separate man page generation from the main build to satisfy travis-ci behaviour. Signed-off-by: Loui Chang --- README.md | 3 ++- build/Makefile | 6 ------ doc/Makefile | 12 ++++++++++++ 3 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 doc/Makefile diff --git a/README.md b/README.md index f0bc319..a741c97 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,8 @@ Toxic is a [Tox](https://tox.im)-based instant messenging client which formerly ##### Documentation * [Asciidoc](http://asciidoc.org/index.html) Only required for regenerating manpages. -* Run `make doc` in the build directory after editing the asciidoc to regenerate the manpages. +* Run `make` in the doc directory after editing the asciidoc to regenerate the manpages. +* Asciidoc files and generated manpages will need to be commited together. ### Compiling 1. `cd build/` diff --git a/build/Makefile b/build/Makefile index d4928d3..3e2de83 100644 --- a/build/Makefile +++ b/build/Makefile @@ -69,12 +69,6 @@ toxic: $(OBJ) doc: $(MANFILES:%=$(DOC_DIR)/%) -$(DOC_DIR)/%: $(DOC_DIR)/%.asc - @echo " Generating man page $(@F)" - @a2x -f manpage -a revdate=$(shell git log -1 --date=short --format="%ad" $<) \ - -a manmanual="toxic manual" -a mansource=toxic \ - -a manversion=__VERSION__ -a datadir=__DATADIR__ $< - clean: rm -rf *.d *.o toxic rm -rf $(MANFILES) diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000..2d313d2 --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,12 @@ +MANFILES = toxic.1 toxic.conf.5 + +# Targets +doc: $(MANFILES) + +%: %.asc + @echo " Generating man page $(@F)" + @a2x -f manpage -a revdate=$(shell git log -1 --date=short --format="%ad" $<) \ + -a manmanual="toxic manual" -a mansource=toxic \ + -a manversion=__VERSION__ -a datadir=__DATADIR__ $< + +.PHONY: doc