-
Notifications
You must be signed in to change notification settings - Fork 10
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 attachment infos to csv export #20
base: master
Are you sure you want to change the base?
Conversation
This is my first proposal. |
@@ -31,13 +31,6 @@ | |||
|
|||
#include "sigbak.h" | |||
|
|||
#define FLAG_EXPORT_ALL 0x1 | |||
#define FLAG_FILENAME_ID 0x2 |
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.
FLAG_FILENAME_ID is also needed in cmd-export-messages.c now. I moved all of those FLAG_* to keep them together.
(att->content_type != NULL) ? | ||
att->content_type : "", | ||
att->size, | ||
sbk_attachment_id_to_string(att)); |
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.
Ok, if FLAG_FILENAME_ID is given, we get the ID twice (one in the filename and one here).
I think I should change this to not repeat it here when it is already in the filename.
Do you think so, too?
I think you are making too many changes. Please revert the changes to the attachment file logic. I'm not sure that's the right thing to do. Keep only the Also, if you can, try keeping to the coding style. See https://man.openbsd.org/style.9 for details. But don't worry about it too much; I can tweak your changes if necessary. |
Thanks for your reply! I can do that but first I'd like to diskuss if it would be the right thing to do. The background for that is that I want to be able to create HTML pages which also show the attachments. That is not possible with the existing attachment info in the text export. |
Ah, I see. How is your HTML export going to work? Will it be a new feature in sigbak or a separate program that processes the CSV output? |
Initially I planned to do a Python script to process the CSV output but it turned out to be easy to implement it as a new feature in sigbak, so I'm going this way. Other people (with more knowledge about web designing) might create more fancy output on base of the CSV... |
Interesting! But then why do you want to make changes to the CSV format? How is that relevant for an HTML export feature? |
Actually that was required for my first approach with the Python script. |
I uploaded my latest changes to my fork so you can have a closer look if you want. |
resolves #17