-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add logDirectory option to copy logs to WACZ #119
Conversation
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.
@tw4l This looks great as usual 🤝 !
One question and one request:
- Is there a common pattern for these log files (extension, content, etc ...)? I would be interested in making that feature less permissive, so that we don't have a "add whatever to WACZ" flag 😅 .
- Would you mind adding docs for this new option to
types.js
so the IDE / JSDoc knows about this new option?
Thank you!
The log files from Browsertrix Crawler are JSON-L files with
Happy to! |
That makes sense. Let's start by only accepting |
index.js
Outdated
* Path to directory of log files to copy into WACZ. | ||
* @type {?string} | ||
*/ | ||
logDirectory = null |
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.
@tw4l Nitpick: Let's use logDir
for consistency with pagesDir
and the like :)
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.
Done! I kept the option for class initialization as logDirectory
and CLI flag as log-directory for compatibility with py-wacz but internally it now uses this.logDir
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.
Feel free to change the former though, I don't have a strong opinion, as long as the CLI flag is the same I think we're good :)
181a640
to
6b8c919
Compare
Rebased and updated, thanks! |
This is a breaking change in the case of `pagesDir`
Hey there @tw4l! This is great, thanks! Cheers, |
Hi @matteocargnelutti , makes sense to me! The consistency is nice :) Thanks for this! |
Fixes #118
Thanks for taking a look, this is one of the last things needed for Browsertrix Crawler!