Compare commits
3 Commits
v1.0.2
...
085f182357
| Author | SHA1 | Date | |
|---|---|---|---|
| 085f182357 | |||
| bce26d3a4b | |||
| 44120b7ebb |
4
.github/workflows/docs.yml
vendored
4
.github/workflows/docs.yml
vendored
@ -1,8 +1,8 @@
|
|||||||
name: Deploy documentation
|
name: Deploy documentation
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
push:
|
||||||
types: [published]
|
branches: ["main"]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|||||||
2
Doxyfile
2
Doxyfile
@ -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
|
||||||
|
|||||||
4
Makefile
4
Makefile
@ -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}
|
||||||
|
|||||||
Submodule distrib/arch updated: a829d9746a...3453e4c5cd
29
src/basen.cpp
Normal file
29
src/basen.cpp
Normal 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;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user