mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 15:05:11 +00:00
[MOD] Read the config file for tool DB access
This commit is contained in:
parent
5d268a71a5
commit
9775bd8d4e
6 changed files with 157 additions and 115 deletions
|
|
@ -3,12 +3,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"
|
||||
|
||||
int
|
||||
Main(Array *args, HashMap *env)
|
||||
|
|
@ -20,13 +15,13 @@ Main(Array *args, HashMap *env)
|
|||
|
||||
if (ArraySize(args) < 2)
|
||||
{
|
||||
Log(LOG_ERR, "Usage: %s [DB path]", exec);
|
||||
Log(LOG_ERR, "Usage: %s [config]", exec);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
db_path = ArrayGet(args, 1);
|
||||
|
||||
parsee = DbOpenLMDB(db_path, 8 * 1024 * 1024);
|
||||
parsee = GetDB(db_path);
|
||||
if (parsee)
|
||||
{
|
||||
DbDelete(parsee, 1, "avatars");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue