Hi¸ Quoting Chintan Agarwal <[EMAIL PROTECTED]>:
> Thanks for that information. I could not find the declaration of Transaction > structure(or its un-typedefed form) per say but from the functions in the > file, could gather the variable types present. > > I think that for QIF importer, we could have a simpler structure, akin OFX > importer wherein the function void gnc_file_ofx_import (void) (in > /src/import-export/ofx/gnc-ofx-import.c)is the top-level function. In such a > top-level function there are basically three steps:- > 1) Creating a context for the input data(done by QIF context) > 2) Parsing the data(done by QIF parser written in /src/import-export/qif) > 3) Integrating the parsed data into the Gnucash accounts, actions like > matching, mapping etc.(as pointed out earlier, this is done simply by using > functions in import-main-matcher.h, specifically the function > gnc_gen_trans_list_add_trans(...)). > As for the frontend, it would be there only in step 1 as after that the > parsing process( in the backend) starts and completes. > > Some questions:- > 1) Do the above three steps miss out something vital for QIF import? No, you also need: 1) the ability to load in multiple files 2) user input for data disambiguation (number/date formats) 3) QIF Category/Account mapping (this isn't in the generic importer; it's pretty QIF specific) Another thing to keep in mind is that the code in src/import-export/qif was never complete, so you might to consider rewriting the parsing functions, too, instead of using that code. It's unclear that that code is correct; it's certainly true that when you merge files together it doesn't do a good job of keeping them separate enough to be able to "unload". > 2) The top-level function that would be made should be by what name? In > other words, which function call results in the QIF import process being > trigerred? Choose something. It really doesn't matter what you name the "start qif import" API. > 3) Does GNUCash use the standard GNU indentation format? Not exactly. We TRY to use 4-space indentation with no tabs, braces on the following line. No space between functions and parens, but spaces between if/while/for and the parens. > -Chintan -derek _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel