xmppc Release 0.1.0

DebXWoody created

Change summary

Makefile.am      |  2 
README.md        |  7 ++++-
changelog        | 10 ++++++++
configure.ac     |  2 
doc/Makefile     |  8 +++---
doc/xmppc.1      | 58 ++++++++++++++++++++++++++++++++++++-----------
doc/xmppc.1.adoc | 54 +++++++++++++++++++++++++++++++-------------
doc/xmppc.1.html | 60 ++++++++++++++++++++++++++++++++++++++-----------
src/main.c       |  1 
9 files changed, 150 insertions(+), 52 deletions(-)

Detailed changes

Makefile.am 🔗

@@ -18,7 +18,7 @@ man_sources = doc/xmppc.1
 
 AM_CFLAGS = @AM_CFLAGS@ -I$(srcdir)/src
 
-dist_doc_DATA = README.md
+dist_doc_DATA = README.md doc/xmppc.1.html
 
 bin_PROGRAMS = xmppc
 xmppc_SOURCES = $(core_sources) $(main_source)

README.md 🔗

@@ -17,7 +17,7 @@ the xmpp library [libstrophe](http://strophe.im/libstrophe/).
 The project is using [GNU Automake](https://www.gnu.org/software/automake/).
 
 ```
-aptitude install libstrophe-dev
+aptitude install libstrophe-dev libc6-dev libglib2.0-dev libgpgme-dev
 ./bootstrap.sh
 ./configure
 make
@@ -25,7 +25,10 @@ make
 
 ## Config file
 
-Config file: ` ~/.config/xmppc.conf`
+Config file: ` ~/.config/xmppc.conf`.
+
+The `[default]` will be used, when the user doesn't provider an account and
+doesn't provider a jid. 
 
 ```
 [default]

changelog 🔗

@@ -1,3 +1,13 @@
+2020-05-16 DebXWoody <stefan@debxwoody.de>
+	
+	Release 0.1.0
+	* Read Password from stdin
+
+2020-05-02 DebXWoody <stefan@debxwoody.de>
+
+	Release 0.0.6
+	* OpenPGP Bug fixes
+
 2020-04-25  DebXWoody <stefan@debxwoody.de>
 
 	Release 0.0.5

configure.ac 🔗

@@ -1,4 +1,4 @@
-AC_INIT([xmppc], [0.0.6], [stefan@debxwoody.de])
+AC_INIT([xmppc], [0.1.0], [stefan@debxwoody.de])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_SRCDIR([src/main.c])

doc/Makefile 🔗

@@ -1,7 +1,7 @@
-TXT_FILE = xmppc.1.txt
+ADOC_FILE = xmppc.1.adoc
 
 all:
 	doxygen Doxyfile
-	asciidoc -b docbook $(TXT_FILE)
-	asciidoc -b html $(TXT_FILE)
-	a2x --doctype manpage --format manpage $(TXT_FILE)
+	asciidoc -b docbook $(ADOC_FILE)
+	asciidoc -b html $(ADOC_FILE)
+	a2x --doctype manpage --format manpage $(ADOC_FILE)

doc/xmppc.1 🔗

@@ -2,12 +2,12 @@
 .\"     Title: xmppc
 .\"    Author: [see the "AUTHOR" section]
 .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
-.\"      Date: 04/29/2020
+.\"      Date: 05/16/2020
 .\"    Manual: \ \&
 .\"    Source: \ \&
 .\"  Language: English
 .\"
-.TH "XMPPC" "1" "04/29/2020" "\ \&" "\ \&"
+.TH "XMPPC" "1" "05/16/2020" "\ \&" "\ \&"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -32,25 +32,35 @@ xmppc \- XMPP Command line Tool
 .SH "SYNOPSIS"
 .sp
 \fIxmppc\fR [\fIOPTIONS\fR] \-m \fIMODE\fR \fICOMMAND\fR [<args>\&...]
+.sp
+\fIxmppc\fR [\-a \fIACCOUNT\fR] [\-j \fIJID\fR] [\-p \fIPASSWORD\fR] \-m \fIMODE\fR \fICOMMAND\fR [<args>\&...]
 .SH "DESCRIPTION"
 .sp
-xmppc is a command line tool
+xmppc is a XMPP command line tool\&. You need an XMPP Account to use this tool\&. The account information can be defined via command line argument \-j \fIJID\fR\&. If no password is provided via \-p \fIPASSWORD\fR xmppc will ask the user to enter the password\&. Another option is to define 1 or more accounts within a configuration file\&. The option \-a \fIACCOUNT\fR can be used to select the account\&.
+.sp
+The argument \-m \fIMODE\fR defines the xmppc \fIMODE\fR which should be used (roster, message, pgp, omemo, openpgp, monitor, bookmark, mam, discovery)\&. The \fICOMMAND\fR and the args required by the \fICOMMAND\fR depends on the chosen \fIMODE\fR\&.
 .SH "OPTIONS"
 .PP
 \fB\-a, \-\-attribute\fR \fIACCOUNT\fR
 .RS 4
 \fIACCOUNT\fR
-is an xmpp account\&...
+is a name of a xmpp account defined within the configuration file\&.
 .RE
 .PP
 \fB\-j, \-\-jid\fR \fIJID\fR
 .RS 4
-JID of the XMPP Account\&. [
+\fIJID\fR
+of the XMPP Account\&.
+.RE
+.PP
+\fB\-p, \-\-pwd\fR \fIPWD\fR
+.RS 4
+Password of the XMPP Account\&.
 .RE
 .PP
-\fB\-p, \-\-pwd\fR \fIPWD\fR, \fB\-v\fR \fIVERBOSE\fR
+\fB\-v\fR \fIVERBOSE\fR, Verbose flags\&. \-v[v[v[v]]]
 .RS 4
-Verbose flags\&. \-v WARN \-vv INFO \-\-vvv DEBUG \-vvvv TRACE
+\-v is WARN \-vv is INFO \-\-vvv is DEBUG \-vvvv is TRACE
 .RE
 .PP
 \fB\-\-help\fR
@@ -61,8 +71,9 @@ Print program version number and help
 .sp
 xmppc modes\&.
 .PP
-\fB\-m roster\fR:: Roster
+\fB\-m roster\fR
 .RS 4
+The Roster mode can be used to provided information of the xmpp account\(cqs roster\&. The roster is the XMPP list of contacts\&.
 .sp
 .RS 4
 .ie n \{\
@@ -91,7 +102,7 @@ xmppc modes\&.
 .PP
 \fB\-m message\fR
 .RS 4
-Message
+The message mode can be used to send unencrypted messages to another xmpp account\&.
 .sp
 .RS 4
 .ie n \{\
@@ -250,7 +261,16 @@ Service Discovery (XEP\-0030)
 .RE
 .SH "ENVIRONMENT VARIABLES"
 .sp
-*none
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+HOME
+.RE
 .SH "EXAMPLES"
 .sp
 .if n \{\
@@ -258,7 +278,7 @@ Service Discovery (XEP\-0030)
 .\}
 .nf
 xmppc \-\-jid user@domain\&.tld \-\-pwd "secret" \-\-mode roster list
-xmppc \-\-jid user@domain\&.tld \-\-pwd "secret" \-\-mode pgp chat friend@domain\&.tld "Hello"
+xmppc \-\-jid user@domain\&.tld \-\-mode pgp chat friend@domain\&.tld "Hello"
 xmppc \-a account1 \-\-mode discovery item conference@domain\&.tld
 xmppc \-\-mode bookmark list
 .fi
@@ -291,7 +311,6 @@ pwd=password1
 .nf
 [account2]
 jid=account2@domain\&.tld
-pwd=password2
 .fi
 .if n \{\
 .RE
@@ -325,10 +344,21 @@ Failure
 See https://codeberg\&.org/Anoxinon_e\&.V\&./xmppc/issues
 .SH "AUTHOR"
 .sp
-See
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+DebXWoody (OpenPGP: A602F76893F138B4A8EFDDD5C2DC916F35751C24)
+.RE
 .SH "RESOURCES"
 .sp
-Codeberg: https://codeberg\&.org/Anoxinon_e\&.V\&./xmppc
+Source: https://codeberg\&.org/Anoxinon_e\&.V\&./xmppc
+.sp
+Documentation: https://codeberg\&.org/Anoxinon_e\&.V\&./xmppc/wiki
 .SH "COPYING"
 .sp
 Copyright (C) 2020 Anoxinon e\&.V\&. Free use of this software is granted under the terms of the GNU General Public License (GPL)\&.

doc/xmppc.1.txt → doc/xmppc.1.adoc 🔗

@@ -10,23 +10,36 @@ SYNOPSIS
 --------
 'xmppc' ['OPTIONS'] -m 'MODE' 'COMMAND' [<args>...]
 
+'xmppc' [-a 'ACCOUNT'] [-j 'JID'] [-p 'PASSWORD']  -m 'MODE' 'COMMAND' [<args>...]
+
 
 DESCRIPTION
 -----------
-xmppc is a command line tool
+xmppc is a XMPP command line tool. You need an XMPP Account to use this tool.
+The account information can be defined via command line argument -j 'JID'. If no
+password is provided via -p 'PASSWORD' xmppc will ask the user to enter the
+password. Another option is to define 1 or more accounts within a configuration
+file. The option -a 'ACCOUNT' can be used to select the account.
+
+The argument -m 'MODE' defines the xmppc 'MODE' which should be used (roster,
+message, pgp, omemo, openpgp, monitor, bookmark, mam, discovery). The 'COMMAND'
+and the args required by the 'COMMAND' depends on the chosen 'MODE'.
+
 
 OPTIONS
 -------
 *-a, --attribute* 'ACCOUNT'::
-     'ACCOUNT' is an xmpp account...
+  'ACCOUNT' is a name of a xmpp account defined within the configuration file.
 
 *-j, --jid* 'JID'::
-    JID of the XMPP Account.
-[
+  'JID' of the XMPP Account.
+
 *-p, --pwd* 'PWD'::
+  Password of the XMPP Account.
 
 *-v* 'VERBOSE'::
-  Verbose flags. -v WARN -vv INFO --vvv DEBUG -vvvv TRACE
+  Verbose flags. -v[v[v[v]]]::
+  -v is WARN -vv is INFO --vvv is DEBUG -vvvv is TRACE
 
 *--help*::
     Print program version number and help
@@ -36,28 +49,36 @@ MODES AND COMMANDS
 ------------------
 xmppc modes.
 
-*-m roster*:: Roster::
+*-m roster*:: 
+The Roster mode can be used to provided information of the xmpp account's
+roster. The roster is the XMPP list of contacts. 
 
 * *list* - List all contacts
 * *export* - Exports all contacts
 
-*-m message*:: Message
+*-m message*:: 
+The message mode can be used to send unencrypted messages to another xmpp
+account.
 
 * *chat <jid> <message>* - Sending unencrypted message to jid
 
-*-m pgp*:: PGP Mode (XEP-0027)
+*-m pgp*:: 
+PGP Mode (XEP-0027)
 
 * *chat <jid> <message>* - Sending pgp encrypted message to jid
 
-*-m omemo*:: OMEMO Mode (XEP-0384)
+*-m omemo*:: 
+OMEMO Mode (XEP-0384)
 
 * *list* - List the device IDs and fingerprints
 
-*-m openpgp*:: openpgp mode (XEP-0373)
+*-m openpgp*:: 
+openpgp mode (XEP-0373)
 
 * *signcrypt <jid> <message>* - Sending pgp signed and encrypted message to jid
 
-*-m monitor*:: Monitot mode
+*-m monitor*:: 
+Monitot mode
 
 * *stanza* - Stanza Monitor
 * *monitor* - microblog Monitor microblog (XEP-0277)
@@ -79,13 +100,13 @@ xmppc modes.
 ENVIRONMENT VARIABLES
 ---------------------
 
-*none
+* HOME
 
 
 EXAMPLES
 --------
   xmppc --jid user@domain.tld --pwd "secret" --mode roster list
-  xmppc --jid user@domain.tld --pwd "secret" --mode pgp chat friend@domain.tld "Hello"
+  xmppc --jid user@domain.tld --mode pgp chat friend@domain.tld "Hello"
   xmppc -a account1 --mode discovery item conference@domain.tld
   xmppc --mode bookmark list
 
@@ -104,7 +125,6 @@ Example:
   
   [account2]
   jid=account2@domain.tld
-  pwd=password2
   
   [account3]
   jid=account3@domain.tld
@@ -126,11 +146,13 @@ See <https://codeberg.org/Anoxinon_e.V./xmppc/issues>
 
 AUTHOR
 ------
-See
+* DebXWoody (OpenPGP: A602F76893F138B4A8EFDDD5C2DC916F35751C24) 
 
 RESOURCES
 ---------
-Codeberg: <https://codeberg.org/Anoxinon_e.V./xmppc>
+Source: <https://codeberg.org/Anoxinon_e.V./xmppc>
+
+Documentation: <https://codeberg.org/Anoxinon_e.V./xmppc/wiki>
 
 
 COPYING

doc/xmppc.1.html 🔗

@@ -747,12 +747,20 @@ asciidoc.install();
 <h2 id="_synopsis">SYNOPSIS</h2>
 <div class="sectionbody">
 <div class="paragraph"><p><em>xmppc</em> [<em>OPTIONS</em>] -m <em>MODE</em> <em>COMMAND</em> [&lt;args&gt;&#8230;]</p></div>
+<div class="paragraph"><p><em>xmppc</em> [-a <em>ACCOUNT</em>] [-j <em>JID</em>] [-p <em>PASSWORD</em>]  -m <em>MODE</em> <em>COMMAND</em> [&lt;args&gt;&#8230;]</p></div>

 </div>
 </div>
 <div class="sect1">
 <h2 id="_description">DESCRIPTION</h2>
 <div class="sectionbody">
-<div class="paragraph"><p>xmppc is a command line tool</p></div>

+<div class="paragraph"><p>xmppc is a XMPP command line tool. You need an XMPP Account to use this tool.

+The account information can be defined via command line argument -j <em>JID</em>. If no

+password is provided via -p <em>PASSWORD</em> xmppc will ask the user to enter the

+password. Another option is to define 1 or more accounts within a configuration

+file. The option -a <em>ACCOUNT</em> can be used to select the account.</p></div>

+<div class="paragraph"><p>The argument -m <em>MODE</em> defines the xmppc <em>MODE</em> which should be used (roster,

+message, pgp, omemo, openpgp, monitor, bookmark, mam, discovery). The <em>COMMAND</em>

+and the args required by the <em>COMMAND</em> depends on the chosen <em>MODE</em>.</p></div>

 </div>
 </div>
 <div class="sect1">
@@ -764,7 +772,7 @@ asciidoc.install();
 </dt>
 <dd>
 <p>
-     <em>ACCOUNT</em> is an xmpp account&#8230;

+  <em>ACCOUNT</em> is a name of a xmpp account defined within the configuration file.

 </p>
 </dd>
 <dt class="hdlist1">
@@ -772,19 +780,26 @@ asciidoc.install();
 </dt>
 <dd>
 <p>
-    JID of the XMPP Account.

-[

+  <em>JID</em> of the XMPP Account.

 </p>
 </dd>
 <dt class="hdlist1">
 <strong>-p, --pwd</strong> <em>PWD</em>
 </dt>
+<dd>

+<p>

+  Password of the XMPP Account.

+</p>

+</dd>

 <dt class="hdlist1">
 <strong>-v</strong> <em>VERBOSE</em>
 </dt>
+<dt class="hdlist1">

+Verbose flags. -v[v[v[v]]]

+</dt>

 <dd>
 <p>
-  Verbose flags. -v WARN -vv INFO --vvv DEBUG -vvvv TRACE

+  -v is WARN -vv is INFO --vvv is DEBUG -vvvv is TRACE

 </p>
 </dd>
 <dt class="hdlist1">
@@ -804,9 +819,13 @@ asciidoc.install();
 <div class="paragraph"><p>xmppc modes.</p></div>
 <div class="dlist"><dl>
 <dt class="hdlist1">
-<strong>-m roster</strong>:: Roster

+<strong>-m roster</strong>

 </dt>
 <dd>
+<p>

+The Roster mode can be used to provided information of the xmpp account&#8217;s

+roster. The roster is the XMPP list of contacts.

+</p>

 <div class="ulist"><ul>
 <li>
 <p>
@@ -825,7 +844,8 @@ asciidoc.install();
 </dt>
 <dd>
 <p>
-Message

+The message mode can be used to send unencrypted messages to another xmpp

+account.

 </p>
 <div class="ulist"><ul>
 <li>
@@ -956,7 +976,13 @@ Service Discovery (XEP-0030)
 <div class="sect1">
 <h2 id="_environment_variables">ENVIRONMENT VARIABLES</h2>
 <div class="sectionbody">
-<div class="paragraph"><p>*none</p></div>

+<div class="ulist"><ul>

+<li>

+<p>

+HOME

+</p>

+</li>

+</ul></div>

 </div>
 </div>
 <div class="sect1">
@@ -965,7 +991,7 @@ Service Discovery (XEP-0030)
 <div class="literalblock">
 <div class="content">
 <pre><code>xmppc --jid user@domain.tld --pwd "secret" --mode roster list
-xmppc --jid user@domain.tld --pwd "secret" --mode pgp chat friend@domain.tld "Hello"

+xmppc --jid user@domain.tld --mode pgp chat friend@domain.tld "Hello"

 xmppc -a account1 --mode discovery item conference@domain.tld
 xmppc --mode bookmark list</code></pre>
 </div></div>
@@ -992,8 +1018,7 @@ pwd=password1</code></pre>
 <div class="literalblock">
 <div class="content">
 <pre><code>[account2]
-jid=account2@domain.tld

-pwd=password2</code></pre>

+jid=account2@domain.tld</code></pre>

 </div></div>
 <div class="literalblock">
 <div class="content">
@@ -1037,13 +1062,20 @@ pwd=password3</code></pre>
 <div class="sect1">
 <h2 id="_author">AUTHOR</h2>
 <div class="sectionbody">
-<div class="paragraph"><p>See</p></div>

+<div class="ulist"><ul>

+<li>

+<p>

+DebXWoody (OpenPGP: A602F76893F138B4A8EFDDD5C2DC916F35751C24)

+</p>

+</li>

+</ul></div>

 </div>
 </div>
 <div class="sect1">
 <h2 id="_resources">RESOURCES</h2>
 <div class="sectionbody">
-<div class="paragraph"><p>Codeberg: <a href="https://codeberg.org/Anoxinon_e.V./xmppc">https://codeberg.org/Anoxinon_e.V./xmppc</a></p></div>

+<div class="paragraph"><p>Source: <a href="https://codeberg.org/Anoxinon_e.V./xmppc">https://codeberg.org/Anoxinon_e.V./xmppc</a></p></div>

+<div class="paragraph"><p>Documentation: <a href="https://codeberg.org/Anoxinon_e.V./xmppc/wiki">https://codeberg.org/Anoxinon_e.V./xmppc/wiki</a></p></div>

 </div>
 </div>
 <div class="sect1">
@@ -1058,7 +1090,7 @@ granted under the terms of the GNU General Public License (GPL).</p></div>
 <div id="footer">
 <div id="footer-text">
 Last updated
- 2020-04-29 19:16:17 CEST

+ 2020-05-16 08:40:22 CEST

 </div>
 </div>
 </body>

src/main.c 🔗

@@ -457,6 +457,7 @@ int main(int argc, char *argv[]) {
         pwd[strlen(pwd)-1] = '\0';
     }
     tcsetattr(STDIN_FILENO, TCSANOW, &current_terminal);
+    printf("\n");
   }
 
   int paramc = argc- optind;