3 Commits

Author SHA1 Message Date
085f182357 fix(Makefile): -lgcov, TOOLS = basen 2024-09-27 09:06:42 +03:00
bce26d3a4b submodule(update)
Some checks failed
Deploy documentation / deploy (push) Has been cancelled
2024-09-26 21:02:55 +03:00
44120b7ebb fix(docs.yml): on push main; update(Doxyfile): version 2024-09-26 20:55:30 +03:00
5 changed files with 35 additions and 6 deletions

View File

@ -1,8 +1,8 @@
name: Deploy documentation name: Deploy documentation
on: on:
release: push:
types: [published] branches: ["main"]
permissions: permissions:
contents: read contents: read

View File

@ -48,7 +48,7 @@ PROJECT_NAME = libbasen
# could be handy for archiving the generated documentation or if some version # could be handy for archiving the generated documentation or if some version
# control system is used. # control system is used.
PROJECT_NUMBER = v1.0.1 PROJECT_NUMBER = v1.0.2
# Using the PROJECT_BRIEF tag one can provide an optional one line description # Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a # for a project that appears at the top of each page and should give viewer a

View File

@ -15,7 +15,7 @@ OBJS =\
base64\ base64\
hash/sha256\ hash/sha256\
TOOLS =\ TOOLS = ${LIB}
TESTS =\ TESTS =\
test-hex\ test-hex\
@ -91,7 +91,7 @@ ${OBJDIR}/%${-g}-cov.o: ${SRCDIR}/%.cpp ${INCDIR}/${LIB}/%.hpp
${CC} -o $@ -c $< -I${INCDIR} ${-l} ${CFLAGS} --coverage ${CC} -o $@ -c $< -I${INCDIR} ${-l} ${CFLAGS} --coverage
${BINDIR}/%${-g}-cov: ${TESTDIR}/%.cpp ${patsubst %, ${OBJDIR}/%${-g}-cov.o, ${OBJS}} ${BINDIR}/%${-g}-cov: ${TESTDIR}/%.cpp ${patsubst %, ${OBJDIR}/%${-g}-cov.o, ${OBJS}}
${CC} -o $@ $^ -I${INCDIR} ${-l} -lgtest ${CFLAGS} --coverage ${CC} -o $@ $^ -I${INCDIR} ${-l} -lgtest -lgcov ${CFLAGS}
clean: clean:
rm -rf ${DIRS} rm -rf ${DIRS}

29
src/basen.cpp Normal file
View File

@ -0,0 +1,29 @@
#include <iostream>
#include <argparse/argparse.hpp>
#include <basen.hpp>
int main(int argc, char *argv[])
{
argparse::ArgumentParser program("basen", "1.1.0");
program.add_argument("-t", "--type")
.help("encoding type")
.metavar("STRING")
.choices("base58", "base64", "hex")
.default_value("hex");
program.add_argument("-d", "--decode")
.help("is decode")
.flag();
try
{
program.parse_args(argc, argv);
}
catch (const std::exception &err)
{
std::cerr << err.what() << '\n';
std::cerr << program;
return 1;
}
return 0;
}