Skip to content

Commit

Permalink
Merge Brian RAter's 'import_file_headers' into stable.
Browse files Browse the repository at this point in the history
  • Loading branch information
jralls committed Feb 17, 2024
2 parents dcbd1bf + 907667d commit f0dc23a
Show file tree
Hide file tree
Showing 7 changed files with 170 additions and 0 deletions.
24 changes: 24 additions & 0 deletions gnucash/import-export/csv-imp/gnc-tokenizer-csv.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
/********************************************************************\
* gnc-tokenizer-csv.cpp - takes a csv file and converts it into a *
* two-dimensional vector of strings (table)*
* *
* Copyright (C) 2015 Geert Janssens <geert@kobaltwit.be> *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
* Boston, MA 02110-1301, USA gnu@gnu.org *
\********************************************************************/

#include "gnc-tokenizer-csv.hpp"

#include <iostream>
Expand Down
25 changes: 25 additions & 0 deletions gnucash/import-export/csv-imp/gnc-tokenizer-dummy.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
/********************************************************************\
* gnc-tokenizer-dummy.cpp - takes a file and converts it into a *
* two-dimensional vector of strings (table) *
* each row will only have one single column *
* *
* Copyright (C) 2016 Geert Janssens <geert@kobaltwit.be> *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
* Boston, MA 02110-1301, USA gnu@gnu.org *
\********************************************************************/

#include "gnc-tokenizer-dummy.hpp"

#include <iostream>
Expand Down
26 changes: 26 additions & 0 deletions gnucash/import-export/csv-imp/gnc-tokenizer-fw.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
/********************************************************************\
* gnc-tokenizer-fw.cpp - takes a file and converts it into a *
* two-dimensional vector of strings (table) *
* splitting the contents on fixed width *
* positions *
* *
* Copyright (C) 2015 Geert Janssens <geert@kobaltwit.be> *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
* Boston, MA 02110-1301, USA gnu@gnu.org *
\********************************************************************/

#include "gnc-tokenizer-fw.hpp"

#include <iostream>
Expand Down
24 changes: 24 additions & 0 deletions gnucash/import-export/csv-imp/gnc-tokenizer.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
/********************************************************************\
* gnc-tokenizer.cpp - base class for converting a text file into a *
* two-dimensional vector of strings (table) *
* *
* Copyright (C) 2015 Geert Janssens <geert@kobaltwit.be> *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
* Boston, MA 02110-1301, USA gnu@gnu.org *
\********************************************************************/

#include "gnc-tokenizer.hpp"
#include "gnc-tokenizer-csv.hpp"
#include "gnc-tokenizer-dummy.hpp"
Expand Down
24 changes: 24 additions & 0 deletions gnucash/import-export/csv-imp/test/gtest-gnc-imp-props-tx.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
/********************************************************************\
* gtest-gnc-imp-props-tx.cpp - Tests using fixture *
* GncImpPropsTxTest *
* *
* Copyright (c) 2015 Geert Janssens <geert@kobaltwit.be> *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
* Boston, MA 02110-1301, USA gnu@gnu.org *
\********************************************************************/

#include <gtest/gtest.h>

#include <config.h>
Expand Down
23 changes: 23 additions & 0 deletions gnucash/import-export/test/gtest-import-backend.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
/********************************************************************\
* gtest-import-backend.cpp - Tests for import-backend *
* *
* Copyright (c) 2020 Christian Gruber *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
* Boston, MA 02110-1301, USA gnu@gnu.org *
\********************************************************************/

#include <gtk/gtk.h>
#include <gtest/gtest.h>
#include <gmock/gmock.h>
Expand Down
24 changes: 24 additions & 0 deletions gnucash/import-export/test/test-import-pending-matches.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
/********************************************************************\
* test-import-pending-matches.cpp - Tests for *
* import-pending-matches *
* *
* Copyright (c) 2017 Jesse Olmer *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
* Boston, MA 02110-1301, USA gnu@gnu.org *
\********************************************************************/

#include <glib.h>
#include <gtk/gtk.h> /* for references in import-backend.h */

Expand Down

0 comments on commit f0dc23a

Please sign in to comment.