-
Notifications
You must be signed in to change notification settings - Fork 1
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
Basic .CSV file exporter. #63
Conversation
… choose the type of export, the columns to export, and whether or not to use the current project filters in the export.
Tied to Issue #49 |
winlogtimeline/ui/ui.py
Outdated
return | ||
print(self.master.current_project) | ||
wizard = ExportWindow(self, self.master.current_project) | ||
wizard.grab_set() | ||
|
||
def __enable__(self): |
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.
Please add the export menu option to the enable and disable of the menu. The feature doesn't work on macs, but it still looks cleaner than a status bar message on Windows.
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.
Ah good note. I didn't see that. That's been fixed.
winlogtimeline/ui/export_timeline.py
Outdated
if columns["Event ID"]: | ||
row.append(record.event_id) | ||
if columns["Description"]: | ||
row.append(record.decription) |
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.
Typo: decription -> description.
Additionally, you might want to look into itertools.compress here. You could turn this giant if block into a line or two.
winlogtimeline/ui/export_timeline.py
Outdated
|
||
from csv import writer | ||
|
||
with open(self.current_project.get_path() + '/{}.csv'.format(self.file_path.get()), 'w') as csvfile: |
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.
Shouldn't the user have some input on where the file is exported to?
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 figured no. I believe it makes sense to have the file exported to the project directory - it's at least a good use of the repository. @carterv Thoughts?
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.
Can we set that as default but allow them to change locations if they desire?
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 agree with @zjmonroe23 here. The place where the projects are stored is rather difficult to navigate to. A "..." button to open a directory prompt would be ideal. I'll create a follow-up issue for that.
…porting. Added export wizard window to enable and disable functions of the menu bar.
@carterv All comments have been addressed. Still am not allowing the user to choose the output directory of the exported timeline. |
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 think assuming the location works for now and we possibly add a custom location feature later if we have time.
…urrent project directory. Nice, small changes to improve the look of the wizard.
@zjmonroe23 @carterv Thanks for accepting. I've added a commit to this request that allows users to change the location of the export. The default location is the current project directory. I will be merging now. |
TODO:
Issues: