/* Routines to write a CSV expenses file
 */
#pragma once
#include "types.h"

/* count the lines of the file to get the last ID */
int bot_get_current_entry_id_csv
(
 const GString* filename
);

/* returns the number of bytes written, following the convention of fprintf */
int write_bot_expense_entry
(
 const GString *filename,
 BotExpenseEntry *entry,
 bool needsHeaders
);

/* complete routine to write a message to CSV file */
int write_update_to_csv
(
 const GString *filename,
 const BotCommand cmd,
 const double value,
 GString* user,
 GString* notes
);
