mirror of
https://github.com/tomasriveral/NoteWrapper.git
synced 2026-08-12 02:18:38 +02:00
feat: allow the usage of multiple vault directories
This commit is contained in:
+9
-2
@@ -2,6 +2,8 @@
|
||||
#define NOTES_H
|
||||
#include "utils.h"
|
||||
#include "ui.h"
|
||||
// find which directory contains targetVault
|
||||
char *getDirectoryFromVault(char *targetVault, char **vaultsArray, int vaultTotalNumber, int *vaultNumberPerDirectory, char **directoryArray, int directoryNumber, int shouldDebug);
|
||||
// gets the journals from the vault.
|
||||
//to distinguish journals from note we use regex.
|
||||
//Note: we must handle them separatly as journals can either be a single file (which will treat specially) or a directory.
|
||||
@@ -9,8 +11,13 @@ char **getJournalsFromVault(char *pathToVault, char *vault, char *journalRegex,
|
||||
// this function is inputed a path to a vault (which was selected before) and outpus all the suitable notes (so not the hidden ones).
|
||||
// journalRegex is the regex code for the journals. If a note matches this code, it is treated as a journal and it is not outputed from this function.
|
||||
char **getNotesFromVault(char *pathToVault, char *vault, char *journalRegex, int *count, int shouldDebug);
|
||||
// this function is inputed a path to a directory (which comes usually from the config file) and outpus all the suitable directories (so not the hidden ones) which will serve as separate vaults for notes.
|
||||
char **getVaultsFromDirectory(char *dirString, int *count, int shouldDebug);
|
||||
// function gets as input an array of directoryNumber strings. Which are the directories the function will search for vaults.
|
||||
// it returns an array of vaults.
|
||||
// the vaults are organized in order per directory.
|
||||
// vaultsPerDirectoryNumber and count should be initiallized before calling the function and the address be inputed.
|
||||
// count is the total number of vaults.
|
||||
// vaultsPerDirectoryNumber gives how many vaults each directory has.
|
||||
char **getVaultsFromDirectories(char **directoryStringArray, int directoryNumber, int *vaultsPerDirectoryNumber, int *count, int shouldDebug);
|
||||
// path is the path to the file.
|
||||
// journal is the name of the file.
|
||||
// journalWasUpdated will be set to 1 if a new entry was created
|
||||
|
||||
Reference in New Issue
Block a user