[MOD] Read the config file for tool DB access

This commit is contained in:
LDA 2024-09-08 16:12:27 +02:00
commit 9775bd8d4e
6 changed files with 157 additions and 115 deletions

View file

@ -13,12 +13,7 @@
* Under CC0, as its a rather useful example of a Parsee tool.
* See LICENSE for more information about Parsee's licensing. */
#include <Cytoplasm/Memory.h>
#include <Cytoplasm/Json.h>
#include <Cytoplasm/Log.h>
#include <Cytoplasm/Db.h>
#include <stdlib.h>
#include "common.h"
static void
AddAdmin(Db *parsee, char *glob)
@ -86,14 +81,14 @@ Main(Array *args, HashMap *env)
if (ArraySize(args) < 2)
{
Log(LOG_ERR, "Usage: %s [DB path] [glob]", exec);
Log(LOG_ERR, "Usage: %s [config] <glob>", exec);
return EXIT_FAILURE;
}
db_path = ArrayGet(args, 1);
glob = ArrayGet(args, 2);
parsee = DbOpenLMDB(db_path, 8 * 1024 * 1024);
parsee = GetDB(db_path);
if (parsee)
{