-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#40, #54] Configuration file with computed fields and include/exclude file options #84
Conversation
|
@mohamedsalem401 does this reflect the comments in the PR yesterday re the definition in the README PR of this feature? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can already see at least one issue is that the system should continue to work without a config folder.
In general, i'd strongly recommend (as discussed last week) that we get an example working without the config folder stuff but just with passing config to the relevant class or function e.g. buildMarkdownDB
or whatever it is called.
once that API is well shaped adding config in a file is relatively straightforward ...
// TODO get these from markdowndb.config.js or something | ||
const dbPath = "markdown.db"; | ||
const ignorePatterns = [/Excalidraw/, /\.obsidian/, /DS_Store/]; | ||
const [contentPath] = process.argv.slice(2); | ||
const [contentPath, configFilePath] = process.argv.slice(2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if you don't have a config file - this stuff should work with defaults ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rufuspollock
OK, but what should be defaulted?
-
Currently, it defaults to searching for
markdowndb.config.js
if no config path is passed. -
If
markdowndb.config.js
is missing, it defaults to - no custom fields - and includes all files. -
If a config path is passed but doesn't exist, then it raises an error:
Error loading configuration file from...
.
@mohamedsalem401 another general comment - i'd have kept the include/exclude feature for a separate PR. It makes the review easier and faster ... |
I will close this for now |
Closes #40
Closes #54