39 #include "csv-export-helpers.hpp" 42 static QofLogModule log_module = GNC_MOD_ASSISTANT;
53 DEBUG(
"File name is : %s", info->file_name);
56 auto ss{gnc_open_filestream(info->file_name)};
59 StringVec headervec = {
60 _(
"Type"), _(
"Full Account Name"), _(
"Account Name"),
61 _(
"Account Code"), _(
"Description"), _(
"Account Color"),
62 _(
"Notes"), _(
"Symbol"), _(
"Namespace"),
63 _(
"Hidden"), _(
"Tax Info"), _(
"Placeholder")
67 info->failed = ss.fail() ||
68 !gnc_csv_add_line (ss, headervec, info->use_quotes, info->separator_str);
71 auto root{gnc_book_get_root_account (gnc_get_current_book())};
73 auto str_or_empty = [](
const char* a){
return a ? a :
""; };
74 auto bool_to_char = [](
bool b){
return b ?
"T" :
"F"; };
77 for (GList *ptr = accts; !info->failed && ptr; ptr = g_list_next (ptr))
79 auto acc{
static_cast<Account*
>(ptr->data)};
84 account_get_fullname_str (acc),
96 info->failed = !gnc_csv_add_line (ss, line, info->use_quotes, info->separator_str);
GList * gnc_account_get_descendants_sorted(const Account *account)
This function returns a GList containing all the descendants of the specified account, sorted at each level.
const char * gnc_commodity_get_mnemonic(const gnc_commodity *cm)
Retrieve the mnemonic for the specified commodity.
utility functions for the GnuCash UI
GNCAccountType xaccAccountGetType(const Account *acc)
Returns the account's account type.
const char * xaccAccountGetCode(const Account *acc)
Get the account's accounting code.
#define DEBUG(format, args...)
Print a debugging message.
const char * xaccAccountTypeEnumAsString(GNCAccountType type)
Conversion routines for the account types to/from strings that are used in persistent storage...
const char * gnc_commodity_get_namespace(const gnc_commodity *cm)
Retrieve the namespace for the specified commodity.
#define ENTER(format, args...)
Print a function entry debugging message.
const char * xaccAccountGetColor(const Account *acc)
Get the account's color.
const char * xaccAccountGetDescription(const Account *acc)
Get the account's description.
void csv_tree_export(CsvExportInfo *info)
The csv_tree_export() will let the user export the account tree to a delimited file.
gboolean xaccAccountGetTaxRelated(const Account *acc)
DOCUMENT ME!
gboolean xaccAccountGetHidden(const Account *acc)
Get the "hidden" flag for an account.
gnc_commodity * xaccAccountGetCommodity(const Account *acc)
Get the account's commodity.
gboolean xaccAccountGetPlaceholder(const Account *acc)
Get the "placeholder" flag for an account.
#define LEAVE(format, args...)
Print a function exit debugging message.
File path resolution utility functions.
const char * xaccAccountGetName(const Account *acc)
Get the account's name.
Commodity handling public routines.
const char * xaccAccountGetNotes(const Account *acc)
Get the account's notes.