[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet-nim] 58/61: groupchat: improve CLI UX
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet-nim] 58/61: groupchat: improve CLI UX |
Date: |
Sat, 13 Apr 2019 13:36:33 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnunet-nim.
commit ec4bf936a34448caf27645b6697fddc36407876e
Author: psyc://loupsycedyglgamf.onion/~lynX
<ircs://psyced.org/youbroketheinternet>
AuthorDate: Sun Sep 16 13:03:19 2018 +0000
groupchat: improve CLI UX
---
examples/Makefile | 5 +++++
examples/groupchat.nim | 12 +++++++++++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/examples/Makefile b/examples/Makefile
new file mode 100644
index 0000000..e583032
--- /dev/null
+++ b/examples/Makefile
@@ -0,0 +1,5 @@
+groupchat: groupchat.nim
+ nim compile $<
+
+run:
+ ./groupchat -p=23014 -c=gnunet1.conf
diff --git a/examples/groupchat.nim b/examples/groupchat.nim
index 93d4323..d6ef46d 100644
--- a/examples/groupchat.nim
+++ b/examples/groupchat.nim
@@ -76,12 +76,22 @@ proc main() =
of "port", "p": port = value
else:
assert(false)
+ if configfile.isNil():
+ echo "I need a config file to use."
+ echo " Add -c=<gnunet.conf>"
+ return
+ if port.isNil():
+ echo "I need a shared secret port to use."
+ echo " Add -p=<sharedsecret>"
+ return
+ if server.isNil():
+ echo "Entering server mode."
var gnunetApp = initGnunetApplication(configfile)
asyncCheck firstTask(gnunetApp, server, port)
while hasPendingOperations():
poll(gnunetApp.millisecondsUntilTimeout())
gnunetApp.doWork()
- echo "quitting"
+ echo "Quitting."
main()
GC_fullCollect()
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet-nim] 36/61: use immutable variables where possible, (continued)
- [GNUnet-SVN] [gnunet-nim] 36/61: use immutable variables where possible, gnunet, 2019/04/13
- [GNUnet-SVN] [gnunet-nim] 33/61: add support for input and output file, gnunet, 2019/04/13
- [GNUnet-SVN] [gnunet-nim] 54/61: try out nimbox, gnunet, 2019/04/13
- [GNUnet-SVN] [gnunet-nim] 55/61: Revert "try out nimbox", gnunet, 2019/04/13
- [GNUnet-SVN] [gnunet-nim] 57/61: Add nakefile, nim.cfg, and ignore more things, gnunet, 2019/04/13
- [GNUnet-SVN] [gnunet-nim] 47/61: examples/{start, stop}_peers: Use /bin/sh, tested and checked against Bash and shellcheck., gnunet, 2019/04/13
- [GNUnet-SVN] [gnunet-nim] 61/61: nimble, gnunet, 2019/04/13
- [GNUnet-SVN] [gnunet-nim] 42/61: add first version of groupchat application, gnunet, 2019/04/13
- [GNUnet-SVN] [gnunet-nim] 41/61: move example applications / scripts / config files to example folder, gnunet, 2019/04/13
- [GNUnet-SVN] [gnunet-nim] 59/61: gitignore, gnunet, 2019/04/13
- [GNUnet-SVN] [gnunet-nim] 58/61: groupchat: improve CLI UX,
gnunet <=