messenger-cli

Command-line user interface for GNUnet Messenger
Log | Files | Refs | README | LICENSE

commit 0616015bc457d387dbaa86cd428f119d51511341
parent 9edf21bd96a83a7e6c660e16c331b04e3b7add14
Author: TheJackiMonster <thejackimonster@gmail.com>
Date:   Mon,  4 Jul 2022 00:06:02 +0200

Added ASCII logo to the application

Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>

Diffstat:
MMakefile | 2++
MREADME.md | 43+++++++++++++++++++++++++++++++++++++++----
Aresources/logo.asc | 10++++++++++
Asrc/util.c | 43+++++++++++++++++++++++++++++++++++++++++++
Msrc/util.h | 5+++++
5 files changed, 99 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile @@ -6,6 +6,7 @@ BINARY = messenger-cli SOURCES = messenger_cli.c\ application.c\ chat.c\ + util.c\ ui/account_create_dialog.c\ ui/accounts.c\ ui/chat_open_dialog.c\ @@ -14,6 +15,7 @@ SOURCES = messenger_cli.c\ ui/messages.c HEADERS = application.h\ chat.h\ + util.h\ ui/account_create_dialog.h\ ui/accounts.h\ ui/chat.h\ diff --git a/README.md b/README.md @@ -2,8 +2,43 @@ A CLI for the Messenger service of GNUnet. -## (Planned) Dependencies +``` + + o o + ooo oo + ooooo ooooo + oo ooo + oo ooo + ooooooo + oooooo + oooo + + +``` + +## Build & Installation + +The following dependencies are required and need to be installed to build the application: + + - [gnunet](https://git.gnunet.org/gnunet.git/): For using general GNUnet datatypes + - [libgnunetchat](https://git.gnunet.org/libgnunetchat.git/): For chatting via GNUnet messenger + - [ncurses](https://www.gnu.org/software/ncurses/): For the general UI visualization + +Then you can simply use the provided Makefile as follows: + + - `make` to just compile everything with default parameters + - `make clean` to cleanup build files in case you want to recompile + - `make debug` to compile everything with debug parameters + - `make release` to compile everything with build optimizations enabled + - `make install` to install the compiled files (you might need sudo permissions to install) + +## Contribution + +If you want to contribute to this project as well, the following options are available: + + - Contribute directly to the [source code](https://git.gnunet.org/messenger-cli.git/) with patches to fix issues, implement new features or improve the usability. + - Open issues in the [bug tracker](https://bugs.gnunet.org/bug_report_page.php) to report bugs, issues or missing features. + - Contact the authors of the software if you need any help to contribute (testing is always an option). + +The list of all previous authors can be viewed in the provided [file](AUTHORS). - - [gnunet](https://git.gnunet.org/gnunet.git/) - - [libgnunetchat](https://git.gnunet.org/libgnunetchat.git/) - - [ncurses](https://www.gnu.org/software/ncurses/) diff --git a/resources/logo.asc b/resources/logo.asc @@ -0,0 +1,10 @@ + + o o + ooo oo + ooooo ooooo + oo ooo + oo ooo + ooooooo + oooooo + oooo + diff --git a/src/util.c b/src/util.c @@ -0,0 +1,43 @@ +/* + This file is part of GNUnet. + Copyright (C) 2022 GNUnet e.V. + + GNUnet is free software: you can redistribute it and/or modify it + under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, + or (at your option) any later version. + + GNUnet 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 + Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + + SPDX-License-Identifier: AGPL3.0-or-later + */ +/* + * @author Tobias Frisch + * @file util.c + */ + +#include "util.h" + +void +util_print_logo(WINDOW *window) +{ + int x = getcurx(window); + int y = getcury(window); + + wmove(window, x, y++); wprintw(window, " "); + wmove(window, x, y++); wprintw(window, " o/ \\o "); + wmove(window, x, y++); wprintw(window, " ooo oo "); + wmove(window, x, y++); wprintw(window, " \\oooo\\ /oooo/ "); + wmove(window, x, y++); wprintw(window, " oo ooo "); + wmove(window, x, y++); wprintw(window, " oo ooo "); + wmove(window, x, y++); wprintw(window, " ooooooo "); + wmove(window, x, y++); wprintw(window, " \\oooo/ "); + wmove(window, x, y++); wprintw(window, " oooo "); + wmove(window, x, y++); wprintw(window, " "); +} diff --git a/src/util.h b/src/util.h @@ -26,7 +26,12 @@ #define UTIL_H_ #include <stdbool.h> +#include <stdlib.h> +#include <curses.h> #define UNUSED __attribute__((unused)) +void +util_print_logo(WINDOW *window); + #endif /* UTIL_H_ */