1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
8 SDESC[standard]= Financial accounting software
9 HOMEPAGE= https://www.gnucash.org/
13 SITES[main]= SF/gnucash/gnucash%20%28stable%29/3.1
14 DISTFILE[1]= gnucash-3.1-1.tar.bz2:main
16 SPKGS[standard]= complete
20 OPTIONS_AVAILABLE= none
21 OPTIONS_STANDARD= none
23 BUILD_DEPENDS= gmp:static:standard
24 appstream-glib:primary:standard
25 BUILDRUN_DEPENDS= gnome-keyring:single:standard
27 libsecret:primary:standard
28 boost-libraries:rest:python_default
29 boehm_garbage_collector:single:threaded
30 fontconfig:primary:standard
31 freetype:primary:standard
32 libsoup:primary:standard
33 aqbanking:single:standard
34 libdbi-drivers:primary:sqlite
35 libofx:primary:standard
38 RUN_DEPENDS= perl-Date-Manip:single:perl_default
39 perl-Finance-Quote:single:perl_default
40 perl-libwww-perl:single:perl_default
42 USES= cmake desktop-utils:primary gnome-icons:primary
43 pkgconfig gettext-tools gettext-runtime libtool perl
45 GNOME_COMPONENTS= gtk3 libxslt intltool
50 LICENSE= GPLv2:primary GPLv3:primary
51 LICENSE_TERMS= primary:{{WRKDIR}}/TERMS
52 LICENSE_FILE= GPLv2:stock
54 LICENSE_AWK= TERMS:"^The text of the GNU GPL"
55 LICENSE_SOURCE= TERMS:{{WRKSRC}}/LICENSE
58 FPC_EQUIVALENT= finance/gnucash
59 GLIB_SCHEMAS= org.gnucash.dialogs.business.gschema.xml
60 org.gnucash.dialogs.checkprinting.gschema.xml
61 org.gnucash.dialogs.commodities.gschema.xml
62 org.gnucash.dialogs.export.csv.gschema.xml
63 org.gnucash.dialogs.gschema.xml
64 org.gnucash.dialogs.import.csv.gschema.xml
65 org.gnucash.dialogs.import.generic.gschema.xml
66 org.gnucash.dialogs.import.hbci.gschema.xml
67 org.gnucash.dialogs.import.ofx.gschema.xml
68 org.gnucash.dialogs.import.qif.gschema.xml
69 org.gnucash.dialogs.reconcile.gschema.xml
70 org.gnucash.dialogs.sxs.gschema.xml
71 org.gnucash.dialogs.totd.gschema.xml
72 org.gnucash.general.finance-quote.gschema.xml
73 org.gnucash.gschema.xml
74 org.gnucash.history.gschema.xml
75 org.gnucash.warnings.gschema.xml
76 org.gnucash.window.pages.account.tree.gschema.xml
77 org.gnucash.window.pages.gschema.xml
78 SHEBANG_FILES= common/gnc-test-env.pl
79 libgnucash/quotes/gnc-fq-dump
81 MAKE_ENV= XDG_CACHE_HOME={{WRKDIR}}/.cache
84 CMAKE_ARGS= -DWITH_AQBANKING:BOOL=true
87 -DCOMPILE_GSCHEMAS=OFF
89 -DCMAKE_INSTALL_LIBDIR:STRING="lib"
92 # disable testing and fix XDG_DATA_DIRS
94 ${FIND} . -type f -name CMakeLists.txt \
95 -exec ${REINPLACE_CMD} \
96 -e 's|/usr/local/share|${PREFIX}/share|' \
97 -e '/ADD_SUBDIRECTORY *(test.*)/d' \
98 -e '/ENABLE_TESTING()/d' \
99 -e '/INCLUDE (GncAddTest)/d' \
100 -e '/GNC_GTEST_CONFIGURE()/d' {} +)
103 (cd ${STAGEDIR}${PREFIX}/etc/gnucash && \
104 ${MV} environment environment.sample)
105 (cd ${STAGEDIR}${PREFIX}/share/gnucash/icons/hicolor && \
106 ${RMDIR} 22x22 32x32 48x48 64x64 96x96 128x128 256x256 scalable)
107 ${RM} ${STAGEDIR}${STD_DOCDIR}/ChangeLog*
108 ${RM} ${STAGEDIR}${STD_DOCDIR}/LICENSE
109 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/gnucash/*.so
110 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so
111 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/gnucash
113 [FILE:431:descriptions/desc.primary]
114 Gnucash is the next generation of money manager created from a merger of
115 X-Accountant and GnoMoney.
117 Its features include:
118 * Ability to import Quicken files ( a must )
119 * Reports, Graphs, and all of those goodies that you find in Quicken.
120 * Gnome compliant ( if that is the correct way to put it )
121 * Separate the GUI from the actual "account/transaction engine"
122 * Multiple accounts ( Check, Credit, Cash, Mutual Funds, etc.. )
126 a1ef66cec3b8b74b7b8bfe791ff12456796a69cc004427e8d9205b6872bdd261 13374530 gnucash-3.1-1.tar.bz2
129 [FILE:31004:manifests/plist.primary]
130 @sample etc/gnucash/environment.sample
155 assistant-xml-encoding.h
169 dialog-custom-report.h
172 dialog-object-references.h
176 dialog-report-column-view.h
177 dialog-report-style-sheet.h
178 dialog-reset-warnings.h
183 engine-helpers-guile.h
191 gnc-accounting-period.h
194 gnc-aqbanking-templates.h
197 gnc-cell-renderer-date.h
198 gnc-cell-renderer-popup-entry.h
199 gnc-cell-renderer-popup.h
203 gnc-component-manager.h
210 gnc-dense-cal-model.h
211 gnc-dense-cal-store.h
213 gnc-embedded-window.h
215 gnc-entry-quickfill.h
242 gnc-menu-extensions.h
248 gnc-plugin-file-history.h
250 gnc-plugin-menu-additions.h
251 gnc-plugin-page-report.h
257 gnc-rational-rounding.hpp
264 gnc-sx-instance-dense-cal-adapter.h
265 gnc-sx-instance-model.h
266 gnc-sx-list-tree-model-adapter.h
268 gnc-tree-control-split-reg.h
269 gnc-tree-model-account-types.h
270 gnc-tree-model-account.h
271 gnc-tree-model-budget.h
272 gnc-tree-model-commodity.h
273 gnc-tree-model-owner.h
274 gnc-tree-model-price.h
275 gnc-tree-model-split-reg.h
277 gnc-tree-util-split-reg.h
278 gnc-tree-view-account.h
279 gnc-tree-view-commodity.h
280 gnc-tree-view-owner.h
281 gnc-tree-view-price.h
282 gnc-tree-view-split-reg.h
283 gnc-tree-view-sx-list.h
358 window-main-summarybar.h
361 libgnc-backend-sql.so
362 libgnc-backend-xml-utils.so
368 libgncmod-app-utils.so
369 libgncmod-aqbanking.so
370 libgncmod-backend-dbi.so
371 libgncmod-backend-xml.so
372 libgncmod-bi-import.so
373 libgncmod-csv-export.so
374 libgncmod-csv-import.so
375 libgncmod-customer-import.so
377 libgncmod-generic-import.so
378 libgncmod-gnome-search.so
379 libgncmod-gnome-utils.so
381 libgncmod-ledger-core.so
382 libgncmod-locale-reports-us.so
383 libgncmod-log-replay.so
385 libgncmod-qif-import.so
387 libgncmod-register-core.so
388 libgncmod-register-gnome.so
389 libgncmod-report-gnome.so
390 libgncmod-report-system.so
391 libgncmod-stylesheets.so
393 lib/gnucash/scm/ccache/2.2/
398 commodity-utilities.go
404 gnc-menu-extensions.go
430 lib/gnucash/scm/ccache/2.2/gnucash/
440 lib/gnucash/scm/ccache/2.2/gnucash/import-export/
443 lib/gnucash/scm/ccache/2.2/gnucash/report/
450 eguile-html-utilities.go
466 stylesheet-head-or-tail.go
474 welcome-to-gnucash.go
475 lib/gnucash/scm/ccache/2.2/gnucash/report/locale-specific/
478 lib/gnucash/scm/ccache/2.2/gnucash/report/report-system/
482 lib/gnucash/scm/ccache/2.2/gnucash/report/standard-reports/
485 advanced-portfolio.go
488 budget-balance-sheet.go
491 budget-income-statement.go
500 income-gst-statement.go
510 lib/gnucash/scm/ccache/2.2/gnucash/tax/
513 lib/gnucash/scm/ccache/2.2/qif-import/
523 share/appdata/gnucash.appdata.xml
524 share/applications/gnucash.desktop
525 share/glib-2.0/schemas/
526 org.gnucash.dialogs.business.gschema.xml
527 org.gnucash.dialogs.checkprinting.gschema.xml
528 org.gnucash.dialogs.commodities.gschema.xml
529 org.gnucash.dialogs.export.csv.gschema.xml
530 org.gnucash.dialogs.gschema.xml
531 org.gnucash.dialogs.import.csv.gschema.xml
532 org.gnucash.dialogs.import.generic.gschema.xml
533 org.gnucash.dialogs.import.hbci.gschema.xml
534 org.gnucash.dialogs.import.ofx.gschema.xml
535 org.gnucash.dialogs.import.qif.gschema.xml
536 org.gnucash.dialogs.reconcile.gschema.xml
537 org.gnucash.dialogs.sxs.gschema.xml
538 org.gnucash.dialogs.totd.gschema.xml
539 org.gnucash.general.finance-quote.gschema.xml
540 org.gnucash.gschema.xml
541 org.gnucash.history.gschema.xml
542 org.gnucash.warnings.gschema.xml
543 org.gnucash.window.pages.account.tree.gschema.xml
544 org.gnucash.window.pages.gschema.xml
546 make-prefs-migration-script.xsl
549 share/gnucash/accounts/C/
550 acctchrt_brokerage.gnucash-xea
551 acctchrt_business.gnucash-xea
552 acctchrt_carloan.gnucash-xea
553 acctchrt_cdmoneymkt.gnucash-xea
554 acctchrt_checkbook.gnucash-xea
555 acctchrt_childcare.gnucash-xea
556 acctchrt_common.gnucash-xea
557 acctchrt_eduloan.gnucash-xea
558 acctchrt_fixedassets.gnucash-xea
559 acctchrt_homeloan.gnucash-xea
560 acctchrt_homeown.gnucash-xea
561 acctchrt_otherloan.gnucash-xea
562 acctchrt_renter.gnucash-xea
563 acctchrt_retiremt.gnucash-xea
564 acctchrt_spouseinc.gnucash-xea
565 acctchrt_spouseretire.gnucash-xea
566 share/gnucash/accounts/ca/
567 acctchrt_brokerage.gnucash-xea
568 acctchrt_carloan.gnucash-xea
569 acctchrt_cdmoneymkt.gnucash-xea
570 acctchrt_childcare.gnucash-xea
571 acctchrt_common.gnucash-xea
572 acctchrt_currency.gnucash-xea
573 acctchrt_eduloan.gnucash-xea
574 acctchrt_fixedassets.gnucash-xea
575 acctchrt_homeloan.gnucash-xea
576 acctchrt_homeown.gnucash-xea
577 acctchrt_otherloan.gnucash-xea
578 acctchrt_renter.gnucash-xea
579 acctchrt_retiremt.gnucash-xea
580 acctchrt_spouseinc.gnucash-xea
581 acctchrt_spouseretire.gnucash-xea
582 share/gnucash/accounts/cs/
583 acctchrt_brokerage.gnucash-xea
584 acctchrt_carloan.gnucash-xea
585 acctchrt_cdmoneymkt.gnucash-xea
586 acctchrt_childcare.gnucash-xea
587 acctchrt_common.gnucash-xea
588 acctchrt_currency.gnucash-xea
589 acctchrt_eduloan.gnucash-xea
590 acctchrt_fixedassets.gnucash-xea
591 acctchrt_homeloan.gnucash-xea
592 acctchrt_homeown.gnucash-xea
593 acctchrt_otherloan.gnucash-xea
594 acctchrt_renter.gnucash-xea
595 acctchrt_retiremt.gnucash-xea
596 acctchrt_spouseinc.gnucash-xea
597 acctchrt_spouseretire.gnucash-xea
598 share/gnucash/accounts/da/
599 acctchrt_car.gnucash-xea
600 acctchrt_common.gnucash-xea
601 acctchrt_homeloan.gnucash-xea
602 acctchrt_homeown.gnucash-xea
603 share/gnucash/accounts/de_AT/
604 acctchrt_auto.gnucash-xea
605 acctchrt_autoloan.gnucash-xea
606 acctchrt_brokerage.gnucash-xea
607 acctchrt_business.gnucash-xea
608 acctchrt_common.gnucash-xea
609 acctchrt_houseown.gnucash-xea
610 acctchrt_investment.gnucash-xea
611 acctchrt_kids.gnucash-xea
612 share/gnucash/accounts/de_CH/
613 acctchrt_brokerage.gnucash-xea
614 acctchrt_chkmu.gnucash-xea
615 acctchrt_common.gnucash-xea
616 acctchrt_kids.gnucash-xea
617 acctchrt_otherasset.gnucash-xea
618 acctchrt_otherloan.gnucash-xea
619 share/gnucash/accounts/de_DE/
620 acctchrt_auto.gnucash-xea
621 acctchrt_autoloan.gnucash-xea
622 acctchrt_brokerage.gnucash-xea
623 acctchrt_common.gnucash-xea
624 acctchrt_houseown.gnucash-xea
625 acctchrt_investment.gnucash-xea
626 acctchrt_kids.gnucash-xea
627 acctchrt_otherasset.gnucash-xea
628 acctchrt_otherloan.gnucash-xea
629 acctchrt_skr03.gnucash-xea
630 acctchrt_skr04.gnucash-xea
631 acctchrt_skr49.gnucash-xea
632 acctchrt_studium.gnucash-xea
633 acctchrt_wohnungsw.gnucash-xea
634 share/gnucash/accounts/el_GR/
635 acctchrt_brokerage.gnucash-xea
636 acctchrt_carloan.gnucash-xea
637 acctchrt_common.gnucash-xea
638 share/gnucash/accounts/en_GB/
639 acctchrt_brokerage.gnucash-xea
640 acctchrt_business.gnucash-xea
641 acctchrt_carloan.gnucash-xea
642 acctchrt_cdmoneymkt.gnucash-xea
643 acctchrt_checkbook.gnucash-xea
644 acctchrt_childcare.gnucash-xea
645 acctchrt_common.gnucash-xea
646 acctchrt_eduloan.gnucash-xea
647 acctchrt_fixedassets.gnucash-xea
648 acctchrt_homeloan.gnucash-xea
649 acctchrt_homeown.gnucash-xea
650 acctchrt_otherloan.gnucash-xea
651 acctchrt_renter.gnucash-xea
652 acctchrt_retiremt.gnucash-xea
653 acctchrt_spouseinc.gnucash-xea
654 acctchrt_spouseretire.gnucash-xea
656 share/gnucash/accounts/en_IN/acctchrt_gstindia.gnucash-xea
657 share/gnucash/accounts/es_ES/
658 acctchrt_brokerage.gnucash-xea
659 acctchrt_carloan.gnucash-xea
660 acctchrt_cdmoneymkt.gnucash-xea
661 acctchrt_childcare.gnucash-xea
662 acctchrt_common.gnucash-xea
663 acctchrt_currency.gnucash-xea
664 acctchrt_eduloan.gnucash-xea
665 acctchrt_fixedassets.gnucash-xea
666 acctchrt_homeloan.gnucash-xea
667 acctchrt_homeown.gnucash-xea
668 acctchrt_otherloan.gnucash-xea
669 acctchrt_renter.gnucash-xea
670 acctchrt_retiremt.gnucash-xea
671 acctchrt_spouseinc.gnucash-xea
672 acctchrt_spouseretire.gnucash-xea
673 share/gnucash/accounts/es_MX/
674 acctchrt_brokerage.gnucash-xea
675 acctchrt_carloan.gnucash-xea
676 acctchrt_cdmoneymkt.gnucash-xea
677 acctchrt_childcare.gnucash-xea
678 acctchrt_common.gnucash-xea
679 acctchrt_currency.gnucash-xea
680 acctchrt_eduloan.gnucash-xea
681 acctchrt_fixedassets.gnucash-xea
682 acctchrt_homeloan.gnucash-xea
683 acctchrt_homeown.gnucash-xea
684 acctchrt_otherloan.gnucash-xea
685 acctchrt_renter.gnucash-xea
686 acctchrt_retiremt.gnucash-xea
687 acctchrt_spouseinc.gnucash-xea
688 acctchrt_spouseretire.gnucash-xea
689 share/gnucash/accounts/fi_FI/
690 acctchrt_common.gnucash-xea
691 acctchrt_ry.gnucash-xea
692 acctchrt_sbr-xbrl.gnucash-xea
693 share/gnucash/accounts/fr_CA/
694 acctchrt_actifsfixes.gnucash-xea
695 acctchrt_automobile.gnucash-xea
696 acctchrt_basecommune.gnucash-xea
697 acctchrt_cdmarchemon.gnucash-xea
698 acctchrt_chequier.gnucash-xea
699 acctchrt_conjointretraite.gnucash-xea
700 acctchrt_conjointrev.gnucash-xea
701 acctchrt_courtage.gnucash-xea
702 acctchrt_etudeemprunt.gnucash-xea
703 acctchrt_garderie.gnucash-xea
704 acctchrt_locataire.gnucash-xea
705 acctchrt_proprietaire.gnucash-xea
706 acctchrt_retraite.gnucash-xea
707 acctchrt_revenus.gnucash-xea
708 share/gnucash/accounts/fr_CH/
709 acctchrt_brokerage.gnucash-xea
710 acctchrt_business.gnucash-xea
711 acctchrt_carloan.gnucash-xea
712 acctchrt_cdmoneymkt.gnucash-xea
713 acctchrt_childcare.gnucash-xea
714 acctchrt_common.gnucash-xea
715 acctchrt_currency.gnucash-xea
716 acctchrt_eduloan.gnucash-xea
717 acctchrt_fixedassets.gnucash-xea
718 acctchrt_homeloan.gnucash-xea
719 acctchrt_homeown.gnucash-xea
720 acctchrt_otherloan.gnucash-xea
721 acctchrt_renter.gnucash-xea
722 acctchrt_retiremt.gnucash-xea
723 acctchrt_spouseinc.gnucash-xea
724 acctchrt_spouseretire.gnucash-xea
725 share/gnucash/accounts/fr_FR/
726 acctchrt_brokerage.gnucash-xea
727 acctchrt_business.gnucash-xea
728 acctchrt_carloan.gnucash-xea
729 acctchrt_cdmoneymkt.gnucash-xea
730 acctchrt_childcare.gnucash-xea
731 acctchrt_common.gnucash-xea
732 acctchrt_currency.gnucash-xea
733 acctchrt_eduloan.gnucash-xea
734 acctchrt_fixedassets.gnucash-xea
735 acctchrt_homeloan.gnucash-xea
736 acctchrt_homeown.gnucash-xea
737 acctchrt_otherloan.gnucash-xea
738 acctchrt_renter.gnucash-xea
739 acctchrt_retiremt.gnucash-xea
740 acctchrt_spouseinc.gnucash-xea
741 acctchrt_spouseretire.gnucash-xea
742 share/gnucash/accounts/hu_HU/
743 acctchrt_brokerage.gnucash-xea
744 acctchrt_business.gnucash-xea
745 acctchrt_carloan.gnucash-xea
746 acctchrt_cdmoneymkt.gnucash-xea
747 acctchrt_checkbook.gnucash-xea
748 acctchrt_childcare.gnucash-xea
749 acctchrt_common.gnucash-xea
750 acctchrt_eduloan.gnucash-xea
751 acctchrt_fixedassets.gnucash-xea
752 acctchrt_homeloan.gnucash-xea
753 acctchrt_homeown.gnucash-xea
754 acctchrt_otherloan.gnucash-xea
755 acctchrt_renter.gnucash-xea
756 acctchrt_retiremt.gnucash-xea
757 acctchrt_spouseinc.gnucash-xea
758 acctchrt_spouseretire.gnucash-xea
759 share/gnucash/accounts/it/
760 acctchrt_brokerage.gnucash-xea
761 acctchrt_carloan.gnucash-xea
762 acctchrt_checkbook.gnucash-xea
763 acctchrt_childcare.gnucash-xea
764 acctchrt_common.gnucash-xea
765 acctchrt_fixedassets.gnucash-xea
766 acctchrt_homeloan.gnucash-xea
767 acctchrt_homeown.gnucash-xea
768 acctchrt_otherloan.gnucash-xea
769 acctchrt_renter.gnucash-xea
770 acctchrt_retiremt.gnucash-xea
771 acctchrt_spouseinc.gnucash-xea
772 acctchrt_spouseretire.gnucash-xea
773 share/gnucash/accounts/ja/
774 acctchrt_brokerage.gnucash-xea
775 acctchrt_business.gnucash-xea
776 acctchrt_carloan.gnucash-xea
777 acctchrt_cdmoneymkt.gnucash-xea
778 acctchrt_checkbook.gnucash-xea
779 acctchrt_childcare.gnucash-xea
780 acctchrt_common.gnucash-xea
781 acctchrt_eduloan.gnucash-xea
782 acctchrt_fixedassets.gnucash-xea
783 acctchrt_full.gnucash-xea
784 acctchrt_homeloan.gnucash-xea
785 acctchrt_homeown.gnucash-xea
786 acctchrt_otherloan.gnucash-xea
787 acctchrt_renter.gnucash-xea
788 acctchrt_retiremt.gnucash-xea
789 acctchrt_spouseinc.gnucash-xea
790 acctchrt_spouseretire.gnucash-xea
791 share/gnucash/accounts/ko/
792 acctchrt_brokerage.gnucash-xea
793 acctchrt_business.gnucash-xea
794 acctchrt_carloan.gnucash-xea
795 acctchrt_cdmoneymkt.gnucash-xea
796 acctchrt_checkbook.gnucash-xea
797 acctchrt_childcare.gnucash-xea
798 acctchrt_common.gnucash-xea
799 acctchrt_eduloan.gnucash-xea
800 acctchrt_fixedassets.gnucash-xea
801 acctchrt_homeloan.gnucash-xea
802 acctchrt_homeown.gnucash-xea
803 acctchrt_otherloan.gnucash-xea
804 acctchrt_renter.gnucash-xea
805 acctchrt_retiremt.gnucash-xea
806 acctchrt_spouseinc.gnucash-xea
807 acctchrt_spouseretire.gnucash-xea
808 share/gnucash/accounts/lt/acctchrt_business.gnucash-xea
809 share/gnucash/accounts/lv/
810 acctchrt_brokerage.gnucash-xea
811 acctchrt_business.gnucash-xea
812 acctchrt_carloan.gnucash-xea
813 acctchrt_cdmoneymkt.gnucash-xea
814 acctchrt_checkbook.gnucash-xea
815 acctchrt_childcare.gnucash-xea
816 acctchrt_common.gnucash-xea
817 acctchrt_eduloan.gnucash-xea
818 acctchrt_fixedassets.gnucash-xea
819 acctchrt_homeloan.gnucash-xea
820 acctchrt_homeown.gnucash-xea
821 acctchrt_otherloan.gnucash-xea
822 acctchrt_renter.gnucash-xea
823 acctchrt_retiremt.gnucash-xea
824 acctchrt_spouseinc.gnucash-xea
825 acctchrt_spouseretire.gnucash-xea
826 share/gnucash/accounts/nb/
827 acctchrt_brokerage.gnucash-xea
828 acctchrt_business.gnucash-xea
829 acctchrt_carloan.gnucash-xea
830 acctchrt_cdmoneymkt.gnucash-xea
831 acctchrt_checkbook.gnucash-xea
832 acctchrt_childcare.gnucash-xea
833 acctchrt_common.gnucash-xea
834 acctchrt_eduloan.gnucash-xea
835 acctchrt_fixedassets.gnucash-xea
836 acctchrt_full.gnucash-xea
837 acctchrt_homeloan.gnucash-xea
838 acctchrt_homeown.gnucash-xea
839 acctchrt_otherloan.gnucash-xea
840 acctchrt_renter.gnucash-xea
841 acctchrt_retiremt.gnucash-xea
842 acctchrt_spouseinc.gnucash-xea
843 acctchrt_spouseretire.gnucash-xea
844 share/gnucash/accounts/nl/
845 acctchrt_checkbook.gnucash-xea
846 acctchrt_full.gnucash-xea
847 acctchrt_rgs_1.1.gnucash-xea
848 share/gnucash/accounts/pl/
849 acctchrt_brokerage.gnucash-xea
850 acctchrt_business.gnucash-xea
851 acctchrt_carloan.gnucash-xea
852 acctchrt_cdmoneymkt.gnucash-xea
853 acctchrt_checkbook.gnucash-xea
854 acctchrt_childcare.gnucash-xea
855 acctchrt_common.gnucash-xea
856 acctchrt_eduloan.gnucash-xea
857 acctchrt_fixedassets.gnucash-xea
858 acctchrt_homeloan.gnucash-xea
859 acctchrt_homeown.gnucash-xea
860 acctchrt_otherloan.gnucash-xea
861 acctchrt_renter.gnucash-xea
862 acctchrt_retiremt.gnucash-xea
863 acctchrt_spouseinc.gnucash-xea
864 acctchrt_spouseretire.gnucash-xea
865 share/gnucash/accounts/pt_BR/
866 acctchrt_brokerage.gnucash-xea
867 acctchrt_carloan.gnucash-xea
868 acctchrt_cdmoneymkt.gnucash-xea
869 acctchrt_childcare.gnucash-xea
870 acctchrt_common.gnucash-xea
871 acctchrt_currency.gnucash-xea
872 acctchrt_eduloan.gnucash-xea
873 acctchrt_fixedassets.gnucash-xea
874 acctchrt_homeloan.gnucash-xea
875 acctchrt_homeown.gnucash-xea
876 acctchrt_otherloan.gnucash-xea
877 acctchrt_renter.gnucash-xea
878 acctchrt_retiremt.gnucash-xea
879 acctchrt_spouseinc.gnucash-xea
880 acctchrt_spouseretire.gnucash-xea
881 share/gnucash/accounts/pt_PT/
882 acctchrt_brokerage.gnucash-xea
883 acctchrt_carloan.gnucash-xea
884 acctchrt_cdmoneymkt.gnucash-xea
885 acctchrt_childcare.gnucash-xea
886 acctchrt_common.gnucash-xea
887 acctchrt_eduloan.gnucash-xea
888 acctchrt_fixedassets.gnucash-xea
889 acctchrt_homeloan.gnucash-xea
890 acctchrt_homeown.gnucash-xea
891 acctchrt_otherloan.gnucash-xea
892 acctchrt_renter.gnucash-xea
893 acctchrt_retiremt.gnucash-xea
894 acctchrt_spouseinc.gnucash-xea
895 acctchrt_spouseretire.gnucash-xea
896 share/gnucash/accounts/ru/
897 acctchrt_auto.gnucash-xea
898 acctchrt_autoloan.gnucash-xea
899 acctchrt_common.gnucash-xea
900 acctchrt_homeloan.gnucash-xea
901 acctchrt_homeown.gnucash-xea
902 acctchrt_kids.gnucash-xea
903 acctchrt_otherloan.gnucash-xea
904 acctchrt_renter.gnucash-xea
905 share/gnucash/accounts/sk/
906 acctchrt_brokerage.gnucash-xea
907 acctchrt_carloan.gnucash-xea
908 acctchrt_cdmoneymkt.gnucash-xea
909 acctchrt_childcare.gnucash-xea
910 acctchrt_common.gnucash-xea
911 acctchrt_currency.gnucash-xea
912 acctchrt_eduloan.gnucash-xea
913 acctchrt_fixedassets.gnucash-xea
914 acctchrt_homeloan.gnucash-xea
915 acctchrt_homeown.gnucash-xea
916 acctchrt_otherloan.gnucash-xea
917 acctchrt_renter.gnucash-xea
918 acctchrt_retiremt.gnucash-xea
919 acctchrt_spouseinc.gnucash-xea
920 acctchrt_spouseretire.gnucash-xea
921 share/gnucash/accounts/sv_AX/
922 acctchrt_common.gnucash-xea
923 acctchrt_rf.gnucash-xea
924 acctchrt_sbr-xbrl.gnucash-xea
925 share/gnucash/accounts/sv_FI/
926 acctchrt_common.gnucash-xea
927 acctchrt_rf.gnucash-xea
928 acctchrt_sbr-xbrl.gnucash-xea
929 share/gnucash/accounts/sv_SE/
930 acctchrt_common.gnucash-xea
932 share/gnucash/accounts/tr_TR/
933 acctchrt_TEKDUZ.gnucash-xea
934 acctchrt_brokerage.gnucash-xea
935 acctchrt_carloan.gnucash-xea
936 acctchrt_cdmoneymkt.gnucash-xea
937 acctchrt_checkbook.gnucash-xea
938 acctchrt_common.gnucash-xea
939 acctchrt_fixedassets.gnucash-xea
940 acctchrt_homeloan.gnucash-xea
941 share/gnucash/accounts/zh_CN/
942 acctchrt_brokerage.gnucash-xea
943 acctchrt_business.gnucash-xea
944 acctchrt_carloan.gnucash-xea
945 acctchrt_cdmoneymkt.gnucash-xea
946 acctchrt_checkbook.gnucash-xea
947 acctchrt_childcare.gnucash-xea
948 acctchrt_common.gnucash-xea
949 acctchrt_eduloan.gnucash-xea
950 acctchrt_fixedassets.gnucash-xea
951 acctchrt_homeloan.gnucash-xea
952 acctchrt_homeown.gnucash-xea
953 acctchrt_otherloan.gnucash-xea
954 acctchrt_renter.gnucash-xea
955 acctchrt_retiremt.gnucash-xea
956 acctchrt_spouseinc.gnucash-xea
957 acctchrt_spouseretire.gnucash-xea
958 share/gnucash/accounts/zh_HK/acctchrt_business.gnucash-xea
959 share/gnucash/accounts/zh_TW/acctchrt_business.gnucash-xea
960 share/gnucash/checks/
968 share/gnucash/gtkbuilder/
969 assistant-ab-initial.glade
970 assistant-acct-period.glade
971 assistant-csv-account-import.glade
972 assistant-csv-export.glade
973 assistant-csv-price-import.glade
974 assistant-csv-trans-import.glade
975 assistant-hierarchy.glade
977 assistant-qif-import.glade
978 assistant-stock-split.glade
979 assistant-xml-encoding.glade
980 business-options-gnome.glade
984 dialog-account-picker.glade
986 dialog-bi-import-gui.glade
987 dialog-billterms.glade
988 dialog-book-close.glade
989 dialog-choose-owner.glade
990 dialog-commodities.glade
991 dialog-commodity.glade
992 dialog-custom-report.glade
993 dialog-customer-import-gui.glade
994 dialog-customer.glade
995 dialog-date-close.glade
996 dialog-employee.glade
997 dialog-file-access.glade
999 dialog-find-account.glade
1000 dialog-imap-editor.glade
1002 dialog-invoice.glade
1004 dialog-lot-viewer.glade
1005 dialog-new-user.glade
1006 dialog-object-references.glade
1007 dialog-options.glade
1009 dialog-payment.glade
1010 dialog-preferences.glade
1012 dialog-print-check.glade
1013 dialog-progress.glade
1014 dialog-query-view.glade
1016 dialog-reset-warnings.glade
1019 dialog-tax-info.glade
1020 dialog-tax-table.glade
1022 dialog-trans-assoc.glade
1023 dialog-transfer.glade
1024 dialog-userpass.glade
1026 gnc-date-format.glade
1028 gnc-plugin-page-budget.glade
1029 gnc-plugin-page-register.glade
1030 gnc-plugin-page-register2.glade
1031 gnc-recurrence.glade
1032 gnc-tree-view-owner.glade
1033 window-autoclear.glade
1034 window-reconcile.glade
1035 share/gnucash/icons/hicolor/16x16/actions/
1036 gnc-account-delete.png
1037 gnc-account-edit.png
1039 gnc-account-open.png
1040 gnc-account-report.png
1043 gnc-invoice-duplicate.png
1044 gnc-invoice-edit.png
1047 gnc-invoice-post.png
1048 gnc-invoice-unpost.png
1054 share/gnucash/icons/hicolor/24x24/actions/
1055 gnc-account-delete.png
1056 gnc-account-edit.png
1058 gnc-account-open.png
1059 gnc-account-report.png
1062 gnc-invoice-duplicate.png
1063 gnc-invoice-edit.png
1066 gnc-invoice-post.png
1067 gnc-invoice-unpost.png
1073 share/gnucash/jqplot/
1074 jqplot.BezierCurveRenderer.js
1075 jqplot.barRenderer.js
1076 jqplot.blockRenderer.js
1077 jqplot.bubbleRenderer.js
1078 jqplot.canvasAxisLabelRenderer.js
1079 jqplot.canvasAxisTickRenderer.js
1080 jqplot.canvasTextRenderer.js
1081 jqplot.categoryAxisRenderer.js
1084 jqplot.dateAxisRenderer.js
1085 jqplot.donutRenderer.js
1087 jqplot.enhancedLegendRenderer.js
1088 jqplot.funnelRenderer.js
1089 jqplot.highlighter.js
1091 jqplot.logAxisRenderer.js
1092 jqplot.mekkoAxisRenderer.js
1093 jqplot.mekkoRenderer.js
1094 jqplot.meterGaugeRenderer.js
1095 jqplot.ohlcRenderer.js
1096 jqplot.pieRenderer.js
1097 jqplot.pointLabels.js
1102 share/gnucash/pixmaps/
1103 gnucash-icon-48x48.bmp
1107 business-options.scm
1111 commodity-utilities.scm
1114 engine-interface.scm
1115 engine-utilities.scm
1117 gnc-menu-extensions.scm
1128 html-style-sheet.scm
1133 options-utilities.scm
1136 report-utilities.scm
1143 share/gnucash/scm/gnucash/
1153 share/gnucash/scm/gnucash/import-export/
1156 share/gnucash/scm/gnucash/report/
1159 balsheet-eg.eguile.scm
1161 business-reports.scm
1162 customer-summary.scm
1165 eguile-html-utilities.scm
1166 eguile-utilities.scm
1179 standard-reports.scm
1181 stylesheet-fancy.scm
1182 stylesheet-footer.scm
1183 stylesheet-head-or-tail.scm
1184 stylesheet-plain.scm
1187 taxinvoice.eguile.scm
1193 welcome-to-gnucash.scm
1194 share/gnucash/scm/gnucash/report/locale-specific/
1197 share/gnucash/scm/gnucash/report/report-system/
1200 report-collectors.scm
1201 share/gnucash/scm/gnucash/report/standard-reports/
1202 account-piecharts.scm
1204 advanced-portfolio.scm
1207 budget-balance-sheet.scm
1210 budget-income-statement.scm
1213 cashflow-barchart.scm
1214 category-barchart.scm
1216 equity-statement.scm
1219 income-gst-statement.scm
1220 income-statement.scm
1229 share/gnucash/scm/gnucash/tax/
1232 share/gnucash/scm/qif-import/
1233 qif-dialog-utils.scm
1237 qif-merge-groups.scm
1243 gnc-main-window-ui.xml
1244 gnc-plugin-account-tree-ui.xml
1245 gnc-plugin-aqbanking-ui.xml
1246 gnc-plugin-basic-commands-ui.xml
1247 gnc-plugin-bi-import-ui.xml
1248 gnc-plugin-budget-ui.xml
1249 gnc-plugin-business-ui.xml
1250 gnc-plugin-csv-export-ui.xml
1251 gnc-plugin-csv-import-ui.xml
1252 gnc-plugin-customer-import-ui.xml
1253 gnc-plugin-file-history-ui.xml
1254 gnc-plugin-log-replay-ui.xml
1255 gnc-plugin-ofx-ui.xml
1256 gnc-plugin-page-account-tree-ui.xml
1257 gnc-plugin-page-account-tree2-ui.xml
1258 gnc-plugin-page-budget-ui.xml
1259 gnc-plugin-page-invoice-ui.xml
1260 gnc-plugin-page-owner-tree-ui.xml
1261 gnc-plugin-page-register-ui.xml
1262 gnc-plugin-page-register2-ui.xml
1263 gnc-plugin-page-report-ui.xml
1264 gnc-plugin-page-sx-list-ui.xml
1265 gnc-plugin-page-sx-list2-ui.xml
1266 gnc-plugin-page-sxregister-ui.xml
1267 gnc-plugin-qif-import-ui.xml
1268 gnc-plugin-register-ui.xml
1269 gnc-plugin-register2-ui.xml
1270 gnc-plugin-register22-ui.xml
1271 gnc-plugin-stylesheets-ui.xml
1272 gnc-reconcile-window-ui.xml
1273 gnc-sxed-to-create-window-ui.xml
1274 gnc-sxed-window-ui-full.xml
1275 gnc-sxed-window-ui.xml
1276 gnc-windows-menu-ui-quartz.xml
1277 gnc-windows-menu-ui.xml
1279 share/icons/hicolor/128x128/apps/gnucash-icon.png
1280 share/icons/hicolor/16x16/apps/gnucash-icon.png
1281 share/icons/hicolor/22x22/apps/gnucash-icon.png
1282 share/icons/hicolor/24x24/apps/gnucash-icon.png
1283 share/icons/hicolor/256x256/apps/gnucash-icon.png
1284 share/icons/hicolor/32x32/apps/gnucash-icon.png
1285 share/icons/hicolor/48x48/apps/gnucash-icon.png
1286 share/icons/hicolor/64x64/apps/gnucash-icon.png
1287 share/icons/hicolor/96x96/apps/gnucash-icon.png
1288 share/icons/hicolor/scalable/apps/gnucash-icon.svg
1289 share/locale/ar/LC_MESSAGES/gnucash.mo
1290 share/locale/as/LC_MESSAGES/gnucash.mo
1291 share/locale/az/LC_MESSAGES/gnucash.mo
1292 share/locale/bg/LC_MESSAGES/gnucash.mo
1293 share/locale/brx/LC_MESSAGES/gnucash.mo
1294 share/locale/ca/LC_MESSAGES/gnucash.mo
1295 share/locale/cs/LC_MESSAGES/gnucash.mo
1296 share/locale/da/LC_MESSAGES/gnucash.mo
1297 share/locale/de/LC_MESSAGES/gnucash.mo
1298 share/locale/doi/LC_MESSAGES/gnucash.mo
1299 share/locale/el/LC_MESSAGES/gnucash.mo
1300 share/locale/en_GB/LC_MESSAGES/gnucash.mo
1301 share/locale/es/LC_MESSAGES/gnucash.mo
1302 share/locale/es_NI/LC_MESSAGES/gnucash.mo
1303 share/locale/eu/LC_MESSAGES/gnucash.mo
1304 share/locale/fa/LC_MESSAGES/gnucash.mo
1305 share/locale/fi/LC_MESSAGES/gnucash.mo
1306 share/locale/fr/LC_MESSAGES/gnucash.mo
1307 share/locale/gu/LC_MESSAGES/gnucash.mo
1308 share/locale/he/LC_MESSAGES/gnucash.mo
1309 share/locale/hi/LC_MESSAGES/gnucash.mo
1310 share/locale/hu/LC_MESSAGES/gnucash.mo
1311 share/locale/it/LC_MESSAGES/gnucash.mo
1312 share/locale/ja/LC_MESSAGES/gnucash.mo
1313 share/locale/kn/LC_MESSAGES/gnucash.mo
1314 share/locale/ko/LC_MESSAGES/gnucash.mo
1315 share/locale/kok/LC_MESSAGES/gnucash.mo
1316 share/locale/kok@latin/LC_MESSAGES/gnucash.mo
1317 share/locale/ks/LC_MESSAGES/gnucash.mo
1318 share/locale/lt/LC_MESSAGES/gnucash.mo
1319 share/locale/lv/LC_MESSAGES/gnucash.mo
1320 share/locale/mai/LC_MESSAGES/gnucash.mo
1321 share/locale/mni/LC_MESSAGES/gnucash.mo
1322 share/locale/mni@bengali/LC_MESSAGES/gnucash.mo
1323 share/locale/mr/LC_MESSAGES/gnucash.mo
1324 share/locale/nb/LC_MESSAGES/gnucash.mo
1325 share/locale/ne/LC_MESSAGES/gnucash.mo
1326 share/locale/nl/LC_MESSAGES/gnucash.mo
1327 share/locale/pl/LC_MESSAGES/gnucash.mo
1328 share/locale/pt/LC_MESSAGES/gnucash.mo
1329 share/locale/pt_BR/LC_MESSAGES/gnucash.mo
1330 share/locale/ro/LC_MESSAGES/gnucash.mo
1331 share/locale/ru/LC_MESSAGES/gnucash.mo
1332 share/locale/rw/LC_MESSAGES/gnucash.mo
1333 share/locale/sk/LC_MESSAGES/gnucash.mo
1334 share/locale/sr/LC_MESSAGES/gnucash.mo
1335 share/locale/sv/LC_MESSAGES/gnucash.mo
1336 share/locale/ta/LC_MESSAGES/gnucash.mo
1337 share/locale/te/LC_MESSAGES/gnucash.mo
1338 share/locale/tr/LC_MESSAGES/gnucash.mo
1339 share/locale/uk/LC_MESSAGES/gnucash.mo
1340 share/locale/ur/LC_MESSAGES/gnucash.mo
1341 share/locale/vi/LC_MESSAGES/gnucash.mo
1342 share/locale/zh_CN/LC_MESSAGES/gnucash.mo
1343 share/locale/zh_TW/LC_MESSAGES/gnucash.mo
1350 [FILE:661:manifests/plist.docs]
1357 Money95mfunds_fr.qif
1358 Money95stocks_fr.qif
1361 README-ca.win32-bin.txt
1362 README-de.win32-bin.txt
1363 README-fr.win32-bin.txt
1364 README-it.win32-bin.txt
1365 README-lv.win32-bin.txt
1366 README-nl.win32-bin.txt
1367 README-zh_CN.win32-bin.txt
1368 README-zh_TW.win32-bin.txt
1372 README.win32-bin.txt
1378 currency_tree_xml.gnucash
1391 [FILE:1086:patches/patch-CMakeLists.txt]
1392 --- CMakeLists.txt.orig 2018-04-30 18:58:18 UTC
1394 @@ -43,6 +43,7 @@ INCLUDE (MacroAppendForeach)
1395 INCLUDE (MacroAddSourceFileCompileFlags)
1396 INCLUDE (GncAddSwigCommand)
1397 INCLUDE (CheckIncludeFiles)
1398 +INCLUDE (CheckSymbolExists)
1399 INCLUDE (GncAddSchemeTargets)
1400 INCLUDE (GncAddGSchemaTargets)
1401 INCLUDE (GncAddTest)
1402 @@ -550,8 +551,8 @@ SET(CMAKE_CXX_FLAGS "-std=gnu++11 ${CMAK
1406 - SET( CMAKE_C_FLAGS "-Werror -Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-unused ${CMAKE_C_FLAGS}")
1407 - SET( CMAKE_CXX_FLAGS "-Werror -Wall -Wmissing-declarations -Wno-unused ${CMAKE_CXX_FLAGS}")
1408 + SET( CMAKE_C_FLAGS "-Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-unused ${CMAKE_C_FLAGS}")
1409 + SET( CMAKE_CXX_FLAGS "-Wall -Wmissing-declarations -Wno-unused ${CMAKE_CXX_FLAGS}")
1410 SET( CMAKE_C_FLAGS "-Wno-deprecated-declarations -std=gnu11 ${CMAKE_C_FLAGS}")
1411 SET( CMAKE_C_FLAGS_RELEASE "-O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 ${CMAKE_C_FLAGS}")
1415 [FILE:902:patches/patch-gnucash_import-export_ofx_gnc-ofx-import.c]
1416 --- gnucash/import-export/ofx/gnc-ofx-import.c.orig 2018-04-14 23:51:50 UTC
1417 +++ gnucash/import-export/ofx/gnc-ofx-import.c
1418 @@ -337,8 +337,26 @@ fix_ofx_bug_39 (time64 t)
1422 +#if defined __FreeBSD__ || defined __DragonFly__
1425 + * FreeBSD has it's own libc implementation which differs from glibc. In particular:
1426 + * There is no daylight global.
1427 + * tzname members are set to the string " " (three spaces) when not explicitly
1430 + * To check that the current timezone does not observe DST I check if tzname[1]
1431 + * starts with a space.
1433 + now = gnc_time (NULL);
1434 + gnc_localtime_r(&now, &stm);
1437 + if (tzname[1][0] != ' ' && !stm.tm_isdst)
1439 gnc_localtime_r(&t, &stm);
1440 if (daylight && !stm.tm_isdst)
1447 [FILE:286:patches/patch-gnucash_report_locale-specific_us_CMakeLists.txt]
1448 --- gnucash/report/locale-specific/us/CMakeLists.txt.orig 2018-05-18 23:22:44 UTC
1449 +++ gnucash/report/locale-specific/us/CMakeLists.txt
1450 @@ -35,7 +35,6 @@ SET(GUILE_DEPENDS
1460 [FILE:305:patches/patch-libgnucash_app-utils_guile-util.c]
1461 --- libgnucash/app-utils/guile-util.c.orig 2018-04-14 23:51:51 UTC
1462 +++ libgnucash/app-utils/guile-util.c
1463 @@ -1095,6 +1095,8 @@ gnc_parse_time_to_time64 (const gchar *s
1465 g_return_val_if_fail(s && format, -1);
1467 + bzero(&tm, sizeof(tm));
1469 if (!strptime(s, format, &tm))
1474 [FILE:55306:patches/patch-missing-files]
1475 --- /dev/null 2018-05-18 23:11:46 UTC
1476 +++ src/optional/python-bindings/__init__.py
1478 +# import all the symbols from gnucash_core, so basic gnucash stuff can be
1480 +# >>> from gnucash import thingy
1482 +# >>> from gnucash.gnucash_core import thingy
1483 +from gnucash_core import *
1485 +# @brief helper file for the importing of gnucash
1486 +# @author Mark Jenkins, ParIT Worker Co-operative <mark@parit.ca>
1487 +# @author Jeff Green, ParIT Worker Co-operative <jeff@parit.ca>
1488 +# @ingroup python_bindings
1489 --- /dev/null 2018-05-18 23:11:46 UTC
1490 +++ src/optional/python-bindings/function_class.py
1492 +# function_class.py -- Library for making python classes from a set
1495 +# Copyright (C) 2008 ParIT Worker Co-operative <paritinfo@parit.ca>
1496 +# This program is free software; you can redistribute it and/or
1497 +# modify it under the terms of the GNU General Public License as
1498 +# published by the Free Software Foundation; either version 2 of
1499 +# the License, or (at your option) any later version.
1501 +# This program is distributed in the hope that it will be useful,
1502 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
1503 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1504 +# GNU General Public License for more details.
1506 +# You should have received a copy of the GNU General Public License
1507 +# along with this program; if not, contact:
1508 +# Free Software Foundation Voice: +1-617-542-5942
1509 +# 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
1510 +# Boston, MA 02110-1301, USA gnu@gnu.org
1512 +# @author Mark Jenkins, ParIT Worker Co-operative <mark@parit.ca>
1515 +# @brief Library for making python classes from a set of functions.
1516 +# @author Mark Jenkins, ParIT Worker Co-operative <mark@parit.ca>
1517 +# @author Jeff Green, ParIT Worker Co-operative <jeff@parit.ca>
1518 +# @ingroup python_bindings
1520 +INSTANCE_ARGUMENT = "instance"
1522 +class ClassFromFunctions(object):
1523 + """Inherit this class to give yourself a python class that wraps a set of
1524 + functions that together constitute the methods of the class.
1526 + The method functions must all have as a first argument an object
1527 + holding the instance data. There must also be a function that
1528 + returns a new instance of the class, the constructor.
1530 + Your subclass must define
1531 + _module - The module where the method functions, including the
1532 + constructor can be found
1533 + _new_instance - The name of a function that serves as a constructor,
1534 + returning the instance data.
1536 + To access the instance data, use the read-only property instance.
1538 + To add some functions from _module as methods, call classmethods like
1539 + add_method and add_methods_with_prefix.
1541 + def __new__(cls, *args, **kargs):
1542 + # why reimpliment __new__? Because later on we're going to
1543 + # use new to avoid creating new instances when existing instances
1544 + # already exist with the same __instance value, or equivalent __instance
1545 + # values, where this is desirable...
1546 + return super(ClassFromFunctions, cls).__new__(cls)
1548 + def __init__(self, *args, **kargs):
1549 + """Construct a new instance, using either the function
1550 + self._module[self._new_instance] or using existing instance
1551 + data. (specified with the keyword argument, instance)
1553 + Pass the arguments that should be passed on to
1554 + self._module[self._new_instance] . Any arguments of that
1555 + are instances of ClassFromFunctions will be switched with the instance
1556 + data. (by calling the .instance property)
1558 + if INSTANCE_ARGUMENT in kargs:
1559 + self.__instance = kargs[INSTANCE_ARGUMENT]
1561 + self.__instance = getattr(self._module, self._new_instance)(
1562 + *process_list_convert_to_instance(args) )
1564 + def get_instance(self):
1565 + """Get the instance data.
1567 + You can also call the instance property
1569 + return self.__instance
1571 + instance = property(get_instance)
1576 + def add_method(cls, function_name, method_name):
1577 + """Add the function, method_name to this class as a method named name
1579 + def method_function(self, *meth_func_args):
1580 + return getattr(self._module, function_name)(
1582 + *process_list_convert_to_instance(meth_func_args) )
1584 + setattr(cls, method_name, method_function)
1585 + setattr(method_function, "__name__", method_name)
1586 + return method_function
1589 + def ya_add_classmethod(cls, function_name, method_name):
1590 + """Add the function, method_name to this class as a classmethod named name
1592 + Taken from function_class and slightly modified.
1594 + def method_function(self, *meth_func_args):
1595 + return getattr(self._module, function_name)(
1597 + *process_list_convert_to_instance(meth_func_args) )
1599 + setattr(cls, method_name, classmethod(method_function))
1600 + setattr(method_function, "__name__", method_name)
1601 + return method_function
1604 + def ya_add_method(cls, function_name, method_name):
1605 + """Add the function, method_name to this class as a method named name
1607 + Taken from function_class and slightly modified.
1609 + def method_function(self, *meth_func_args):
1610 + return getattr(self._module, function_name)(
1612 + *process_list_convert_to_instance(meth_func_args) )
1614 + setattr(cls, method_name, method_function)
1615 + setattr(method_function, "__name__", method_name)
1616 + return method_function
1619 + def add_methods_with_prefix(cls, prefix):
1620 + """Add a group of functions with the same prefix
1622 + for function_name, function_value, after_prefix in \
1623 + extract_attributes_with_prefix(cls._module, prefix):
1624 + cls.add_method(function_name, after_prefix)
1627 + def add_constructor_and_methods_with_prefix(cls, prefix, constructor):
1628 + """Add a group of functions with the same prefix, and set the
1629 + _new_instance attribute to prefix + constructor
1631 + cls.add_methods_with_prefix(prefix)
1632 + cls._new_instance = prefix + constructor
1635 + def decorate_functions(cls, decorator, *args):
1636 + for function_name in args:
1637 + setattr( cls, function_name,
1638 + decorator( getattr(cls, function_name) ) )
1640 +def method_function_returns_instance(method_function, cls):
1641 + """A function decorator that is used to decorate method functions that
1642 + return instance data, to return instances instead.
1644 + You can't use this decorator with @, because this function has a second
1647 + assert( 'instance' == INSTANCE_ARGUMENT )
1648 + def new_function(*args):
1649 + kargs = { INSTANCE_ARGUMENT : method_function(*args) }
1650 + if kargs['instance'] == None:
1653 + return cls( **kargs )
1655 + return new_function
1657 +def method_function_returns_instance_list(method_function, cls):
1658 + def new_function(*args):
1659 + return [ cls( **{INSTANCE_ARGUMENT: item} )
1660 + for item in method_function(*args) ]
1661 + return new_function
1663 +def methods_return_instance_lists(cls, function_dict):
1664 + for func_name, instance_name in function_dict.iteritems():
1665 + setattr(cls, func_name,
1666 + method_function_returns_instance_list(
1667 + getattr(cls, func_name), instance_name))
1669 +def default_arguments_decorator(function, *args):
1670 + """Decorates a function to give it default, positional arguments
1672 + You can't use this decorator with @, because this function has more
1673 + than one argument.
1675 + def new_function(*function_args):
1676 + new_argset = list(function_args)
1677 + new_argset.extend( args[ len(function_args): ] )
1678 + return function( *new_argset )
1679 + return new_function
1681 +def return_instance_if_value_has_it(value):
1682 + """Return value.instance if value is an instance of ClassFromFunctions,
1685 + if isinstance(value, ClassFromFunctions):
1686 + return value.instance
1690 +def process_list_convert_to_instance( value_list ):
1691 + """Return a list built from value_list, where if a value is in an instance
1692 + of ClassFromFunctions, we put value.instance in the list instead.
1694 + Things that are not instances of ClassFromFunctions are returned to
1695 + the new list unchanged.
1697 + return [ return_instance_if_value_has_it(value)
1698 + for value in value_list ]
1700 +def extract_attributes_with_prefix(obj, prefix):
1701 + """Generator that iterates through the attributes of an object and
1702 + for any attribute that matches a prefix, this yields
1703 + the attribute name, the attribute value, and the text that appears
1704 + after the prefix in the name
1706 + for attr_name, attr_value in obj.__dict__.iteritems():
1707 + if attr_name.startswith(prefix):
1708 + after_prefix = attr_name[ len(prefix): ]
1709 + yield attr_name, attr_value, after_prefix
1711 +def methods_return_instance(cls, function_dict):
1712 + """Iterates through a dictionary of function name strings and instance names
1713 + and sets the function to return the associated instance
1715 + for func_name, instance_name in function_dict.iteritems():
1716 + setattr(cls, func_name,
1717 + method_function_returns_instance( getattr(cls, func_name), instance_name))
1719 --- /dev/null 2018-05-18 23:11:46 UTC
1720 +++ src/optional/python-bindings/gnucash_business.py
1722 +# gnucash_business.py -- High level python wrapper classes for the business
1725 +# Copyright (C) 2008,2010 ParIT Worker Co-operative <paritinfo@parit.ca>
1726 +# This program is free software; you can redistribute it and/or
1727 +# modify it under the terms of the GNU General Public License as
1728 +# published by the Free Software Foundation; either version 2 of
1729 +# the License, or (at your option) any later version.
1731 +# This program is distributed in the hope that it will be useful,
1732 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
1733 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1734 +# GNU General Public License for more details.
1736 +# You should have received a copy of the GNU General Public License
1737 +# along with this program; if not, contact:
1738 +# Free Software Foundation Voice: +1-617-542-5942
1739 +# 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
1740 +# Boston, MA 02110-1301, USA gnu@gnu.org
1742 +# @author Mark Jenkins, ParIT Worker Co-operative <mark@parit.ca>
1743 +# @author Jeff Green, ParIT Worker Co-operative <jeff@parit.ca>
1745 +# @brief High level python wrapper classes for the business parts of GnuCash
1746 +# @author Mark Jenkins, ParIT Worker Co-operative <mark@parit.ca>
1747 +# @author Jeff Green, ParIT Worker Co-operative <jeff@parit.ca>
1748 +# @ingroup python_bindings
1750 +import gnucash_core_c
1752 +from function_class import \
1753 + ClassFromFunctions, extract_attributes_with_prefix, \
1754 + default_arguments_decorator, method_function_returns_instance, \
1755 + methods_return_instance, methods_return_instance_lists
1757 +from gnucash_core import \
1758 + GnuCashCoreClass, GncNumeric, GncCommodity, Transaction, \
1759 + Split, Book, GncLot, Account
1761 +from gnucash_core_c import GNC_OWNER_CUSTOMER, GNC_OWNER_JOB, \
1762 + GNC_OWNER_EMPLOYEE, GNC_OWNER_VENDOR, \
1763 + GNC_PAYMENT_CASH, GNC_PAYMENT_CARD, \
1764 + GNC_DISC_PRETAX, GNC_DISC_SAMETIME, GNC_DISC_POSTTAX, \
1765 + GNC_TAXINCLUDED_YES, GNC_TAXINCLUDED_NO, GNC_TAXINCLUDED_USEGLOBAL, \
1766 + GNC_AMT_TYPE_VALUE, GNC_AMT_TYPE_PERCENT, GNC_ID_INVOICE
1770 +class GnuCashBusinessEntity(GnuCashCoreClass):
1771 + def __init__(self, book=None, id=None, currency=None, name=None,
1773 + if instance == None:
1774 + if book==None or id==None or currency==None:
1776 + "you must call GnuCashBusinessEntity.__init__ "
1777 + "with either a book, id, and currency, or an existing "
1778 + "low level swig proxy in the argument instance")
1779 + GnuCashCoreClass.__init__(self, book)
1782 + self.SetCurrency(currency)
1784 + self.SetName(name)
1787 + GnuCashCoreClass.__init__(self, instance=instance)
1789 +class Customer(GnuCashBusinessEntity): pass
1791 +class Employee(GnuCashBusinessEntity): pass
1793 +class Vendor(GnuCashBusinessEntity): pass
1795 +class Job(GnuCashBusinessEntity):
1796 + # override the superclass constructor, as Job doesn't require
1797 + # a currency but it does require an owner
1798 + def __init__(self, book=None, id=None, owner=None, name=None,
1800 + if instance == None:
1801 + if book==None or id==None or owner==None:
1803 + "you must call Job.__init__ "
1804 + "with either a book, id, and owner or an existing "
1805 + "low level swig proxy in the argument instance")
1806 + GnuCashCoreClass.__init__(self, book)
1808 + self.SetOwner(owner)
1810 + self.SetName(name)
1812 + GnuCashCoreClass.__init__(self, instance=instance)
1814 +class Address(GnuCashCoreClass): pass
1816 +class BillTerm(GnuCashCoreClass): pass
1818 +class TaxTable(GnuCashCoreClass):
1819 + def __init__(self, book=None, name=None, first_entry=None, instance=None):
1820 + if instance == None:
1821 + if book==None or name==None or first_entry==None:
1823 + "you must call TaxTable.__init__ with either a "
1824 + "book, name, and first_entry, or an existing "
1825 + "low level swig proxy in the argument instance")
1826 + GnuCashCoreClass.__init__(self, book)
1827 + self.SetName(name)
1828 + self.AddEntry(first_entry)
1830 + GnuCashCoreClass.__init__(self, instance=instance)
1832 +class TaxTableEntry(GnuCashCoreClass):
1833 + def __init__(self, account=None, percent=True, amount=None, instance=None):
1834 + """TaxTableEntry constructor
1836 + You must provide an account, or be initizing this with an existing
1837 + swig proxy object via the instance keyword argument.
1839 + You may also optionally set the percent keyword argument to False to get
1840 + a fixed value instead of percentage based tax (which is the default, or
1841 + when percent=True).
1843 + The tax will be zero percent or zero unless you set the amount keyword
1844 + argument to a GncNumeric value as well.
1847 + if instance == None:
1850 + "you must call TaxTableEntry.__init__ with either a "
1851 + "account or an existing "
1852 + "low level swig proxy in the argument instance")
1853 + GnuCashCoreClass.__init__(self)
1854 + self.SetAccount(account)
1856 + self.SetType(GNC_AMT_TYPE_PERCENT)
1858 + self.SetType(GNC_AMT_TYPE_VALUE)
1859 + if amount != None:
1860 + self.SetAmount(amount)
1862 + GnuCashCoreClass.__init__(self, instance=instance)
1864 +class Invoice(GnuCashCoreClass):
1865 + def __init__(self, book=None, id=None, currency=None, owner=None,
1866 + date_opened=None, instance=None):
1867 + """Invoice Contstructor
1869 + You must provide a book, id, currency and owner
1870 + (Customer, Job, Employee, Vendor) or an existing swig proxy object
1871 + in the keyword argument instance.
1873 + Optionally, you may provide a date the invoice is opened on
1874 + (datetime.date or datetime.datetime), otherwise today's date is used.
1876 + if instance == None:
1877 + if book==None or id==None or currency==None or owner==None:
1879 + "you must call Invoice.__init__ "
1880 + "with either a book, id, currency and owner, or an existing"
1881 + "low level swig proxy in the argument instance")
1882 + GnuCashCoreClass.__init__(self, book)
1885 + self.SetCurrency(currency)
1886 + self.SetOwner(owner)
1887 + if date_opened == None:
1888 + date_opened = datetime.date.today()
1889 + self.SetDateOpened(date_opened)
1892 + GnuCashCoreClass.__init__(self, instance=instance)
1894 +class Bill(Invoice):
1897 +def decorate_to_return_instance_instead_of_owner(dec_function):
1898 + def new_get_owner_function(self):
1899 + (owner_type, instance) = dec_function(self)
1900 + if owner_type == GNC_OWNER_CUSTOMER:
1901 + return Customer(instance=instance)
1902 + elif owner_type == GNC_OWNER_JOB:
1903 + return Job(instance=instance)
1904 + elif owner_type == GNC_OWNER_EMPLOYEE:
1905 + return Employee(instance=instance)
1906 + elif owner_type == GNC_OWNER_VENDOR:
1907 + return Vendor(instance=instance)
1910 + return new_get_owner_function
1912 +class Entry(GnuCashCoreClass):
1913 + def __init__(self, book=None, invoice=None, date=None, instance=None):
1914 + """Invoice Entry constructor
1916 + You must provide a book or be initizing this with an existing
1917 + swig proxy object via the instance keyword argument.
1919 + The optional invoice argument can be set to a Bill or Invoice
1920 + that you would like to associate the entry with. You might as well
1921 + assign one now, as an Entry can't exist without one, but you can
1922 + always use Invoice.AddEntry or Bill.AddEntry later on.
1924 + By default, the entry will be set to today's date unless you
1925 + override with the date argument.
1927 + if instance == None:
1930 + "you must call Entry.__init__ with either a "
1931 + "book or an existing "
1932 + "low level swig proxy in the argument instance")
1933 + GnuCashCoreClass.__init__(self, book)
1936 + date = datetime.date.today()
1937 + self.SetDate(date)
1938 + if invoice != None:
1939 + invoice.AddEntry(self)
1942 + GnuCashCoreClass.__init__(self, instance=instance)
1944 + def test_type(self, invoice):
1945 + if invoice.GetTypeString() == "Invoice" and self.GetInvoice() == None:
1946 + raise Exception("Entry type error. Check that Entry type matches Invoice.")
1947 + if invoice.GetTypeString() == "Bill" and self.GetBill() == None:
1948 + raise Exception("Entry type error. Check that Entry type matches Bill.")
1952 +GnuCashBusinessEntity.add_methods_with_prefix('gncOwner')
1955 + 'GetCustomer' : Customer,
1956 + 'GetVendor' : Vendor,
1957 + 'GetEmployee' : Employee,
1959 + 'GetAddr' : Address,
1960 + 'GetCurrency' : GncCommodity,
1961 + 'GetEndOwner': GnuCashBusinessEntity,
1962 + 'GetBalanceInCurrency': GncNumeric,
1964 +methods_return_instance(GnuCashBusinessEntity, owner_dict)
1966 +methods_return_instance_lists(
1967 + GnuCashBusinessEntity, {
1968 + 'GetCommoditiesList': GncCommodity
1972 +Customer.add_constructor_and_methods_with_prefix('gncCustomer', 'Create')
1975 + 'GetAddr' : Address,
1976 + 'GetShipAddr' : Address,
1977 + 'GetDiscount' : GncNumeric,
1978 + 'GetCredit' : GncNumeric,
1979 + 'GetTerms' : BillTerm,
1980 + 'GetCurrency' : GncCommodity,
1981 + 'GetTaxTable': TaxTable,
1983 +methods_return_instance(Customer, customer_dict)
1986 +Employee.add_constructor_and_methods_with_prefix('gncEmployee', 'Create')
1990 + 'GetAddr' : Address,
1991 + 'GetWorkday' : GncNumeric,
1992 + 'GetRate' : GncNumeric,
1993 + 'GetCurrency' : GncCommodity
1995 +methods_return_instance(Employee, employee_dict)
1998 +Vendor.add_constructor_and_methods_with_prefix('gncVendor', 'Create')
2001 + 'GetAddr' : Address,
2002 + 'GetTerms' : BillTerm,
2003 + 'GetCurrency' : GncCommodity,
2004 + 'GetTaxTable': TaxTable,
2006 +methods_return_instance(Vendor, vendor_dict)
2009 +Job.add_constructor_and_methods_with_prefix('gncJob', 'Create')
2010 +Job.decorate_functions(
2011 + decorate_to_return_instance_instead_of_owner,
2015 +Address.add_constructor_and_methods_with_prefix('gncAddress', 'Create')
2018 +BillTerm.add_constructor_and_methods_with_prefix('gncBillTerm', 'Create')
2021 + 'LookupByName' : BillTerm,
2022 + 'GetDiscount' : GncNumeric,
2023 + 'GetParent' : BillTerm,
2024 + 'ReturnChild' : BillTerm
2026 +methods_return_instance(BillTerm, billterm_dict)
2029 +TaxTable.add_constructor_and_methods_with_prefix('gncTaxTable', 'Create')
2032 + 'GetParent': TaxTable,
2034 +methods_return_instance(TaxTable, taxtable_dict)
2037 +TaxTableEntry.add_constructor_and_methods_with_prefix(
2038 + 'gncTaxTableEntry', 'Create')
2040 +taxtableentry_dict = {
2041 + 'GetAccount': Account,
2042 + 'GetAmount': GncNumeric,
2046 +Invoice.add_constructor_and_methods_with_prefix('gncInvoice', 'Create')
2047 +methods_return_instance_lists(
2048 + Invoice, { 'GetEntries': Entry })
2051 +Bill.add_methods_with_prefix('gncBill')
2054 + 'GetTerms': BillTerm,
2055 + 'GetCurrency': GncCommodity,
2056 + 'GetToChargeAmount': GncNumeric,
2057 + 'GetPostedLot': GncLot,
2058 + 'GetPostedTxn': Transaction,
2059 + 'GetPostedAcc': Account,
2060 + 'GetTotal': GncNumeric,
2061 + 'GetTotalOf': GncNumeric,
2062 + 'GetTotalSubtotal': GncNumeric,
2063 + 'GetTotalTax': GncNumeric,
2064 + 'PostToAccount': Transaction,
2067 +methods_return_instance(Invoice, invoice_dict)
2068 +Invoice.decorate_functions(
2069 + decorate_to_return_instance_instead_of_owner,
2070 + 'GetOwner', 'GetBillTo')
2073 +Entry.add_constructor_and_methods_with_prefix('gncEntry', 'Create')
2076 + 'GetQuantity': GncNumeric,
2077 + 'GetInvAccount': Account,
2078 + 'GetInvPrice': GncNumeric,
2079 + 'GetInvDiscount': GncNumeric,
2080 + 'GetInvTaxTable': TaxTable,
2081 + 'GetBillAccount': Account,
2082 + 'GetBillPrice': GncNumeric,
2083 + 'GetBillTaxTable': TaxTable,
2085 + 'GetInvoice': Invoice,
2086 + 'GetBill': Invoice
2088 +methods_return_instance(Entry, entry_dict)
2089 +Entry.decorate_functions(
2090 + decorate_to_return_instance_instead_of_owner,
2092 --- /dev/null 2018-05-18 23:11:46 UTC
2093 +++ src/optional/python-bindings/gnucash_core.py
2095 +# gnucash_core.py -- High level python wrapper classes for the core parts
2098 +# Copyright (C) 2008 ParIT Worker Co-operative <paritinfo@parit.ca>
2099 +# This program is free software; you can redistribute it and/or
2100 +# modify it under the terms of the GNU General Public License as
2101 +# published by the Free Software Foundation; either version 2 of
2102 +# the License, or (at your option) any later version.
2104 +# This program is distributed in the hope that it will be useful,
2105 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
2106 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2107 +# GNU General Public License for more details.
2109 +# You should have received a copy of the GNU General Public License
2110 +# along with this program; if not, contact:
2111 +# Free Software Foundation Voice: +1-617-542-5942
2112 +# 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
2113 +# Boston, MA 02110-1301, USA gnu@gnu.org
2115 +# @author Mark Jenkins, ParIT Worker Co-operative <mark@parit.ca>
2116 +# @author Jeff Green, ParIT Worker Co-operative <jeff@parit.ca>
2118 +# The following is for doxygen
2120 +# @brief High level python wrapper classes for the core parts of GnuCash
2121 +# @author Mark Jenkins, ParIT Worker Co-operative <mark@parit.ca>
2122 +# @author Jeff Green, ParIT Worker Co-operative <jeff@parit.ca>
2123 +# @ingroup python_bindings
2125 +import gnucash_core_c
2127 +from function_class import \
2128 + ClassFromFunctions, extract_attributes_with_prefix, \
2129 + default_arguments_decorator, method_function_returns_instance, \
2130 + methods_return_instance, process_list_convert_to_instance, \
2131 + method_function_returns_instance_list, methods_return_instance_lists
2133 +from gnucash_core_c import gncInvoiceLookup, gncInvoiceGetInvoiceFromTxn, \
2134 + gncInvoiceGetInvoiceFromLot, gncEntryLookup, gncInvoiceLookup, \
2135 + gncCustomerLookup, gncVendorLookup, gncJobLookup, gncEmployeeLookup, \
2136 + gncTaxTableLookup, gncTaxTableLookupByName, gnc_search_invoice_on_id, \
2137 + gnc_search_customer_on_id, gnc_search_bill_on_id , gnc_search_vendor_on_id, \
2138 + gncInvoiceNextID, gncCustomerNextID, gncTaxTableGetTables, gncVendorNextID
2140 +class GnuCashCoreClass(ClassFromFunctions):
2141 + _module = gnucash_core_c
2143 + def do_lookup_create_oo_instance(self, lookup_function, cls, *args):
2144 + thing = lookup_function(self.get_instance(), *args)
2146 + thing = cls(instance=thing)
2150 +class GnuCashBackendException(Exception):
2151 + def __init__(self, msg, errors):
2152 + Exception.__init__(self, msg)
2153 + self.errors = errors
2155 +class Session(GnuCashCoreClass):
2156 + """A GnuCash book editing session
2158 + To commit changes to the session you may need to call save,
2159 + (this is always the case with the file backend).
2161 + When you're down with a session you may need to call end()
2163 + Every Session has a Book in the book attribute, which you'll definitely
2164 + be interested in, as every GnuCash entity (Transaction, Split, Vendor,
2165 + Invoice..) is associated with a particular book where it is stored.
2168 + def __init__(self, book_uri=None, ignore_lock=False, is_new=False,
2169 + force_new= False):
2170 + """A convenient constructor that allows you to specify a book URI,
2171 + begin the session, and load the book.
2173 + This can give you the power of calling
2174 + qof_session_new, qof_session_begin, and qof_session_load all in one!
2176 + book_uri can be None to skip the calls to qof_session_begin and
2177 + qof_session_load, or it can be a string like "file:/test.xac"
2179 + qof_session_load is only called if is_new is set to False
2181 + is_new is passed to qof_session_begin as the argument create,
2182 + and force_new as the argument force. Is_new will create a new
2183 + database or file; force will force creation even if it will
2184 + destroy an existing dataset.
2186 + ignore_lock is passed to qof_session_begin's argument of the
2187 + same name and is used to break an existing lock on a dataset.
2191 + This function can raise a GnuCashBackendException. If it does,
2192 + you don't need to cleanup and call end() and destroy(), that is handled
2193 + for you, and the exception is raised.
2195 + GnuCashCoreClass.__init__(self)
2196 + if book_uri is not None:
2198 + self.begin(book_uri, ignore_lock, is_new, force_new)
2199 + # Take care of backend inconsistency
2200 + # New xml file can't be loaded, new sql store
2201 + # has to be loaded before it can be altered
2202 + # Any existing store obviously has to be loaded
2203 + # More background: https://bugzilla.gnome.org/show_bug.cgi?id=726891
2204 + if book_uri[:3] != "xml" or not is_new:
2206 + except GnuCashBackendException, backend_exception:
2211 + def raise_backend_errors(self, called_function="qof_session function"):
2212 + """Raises a GnuCashBackendException if there are outstanding
2213 + QOF_BACKEND errors.
2215 + set called_function to name the function that was last called
2217 + errors = self.pop_all_errors()
2219 + raise GnuCashBackendException(
2220 + "call to %s resulted in the "
2221 + "following errors, %s" % (called_function, backend_error_dict[errors[0]]),
2224 + def generate_errors(self):
2225 + """A generator that yields any outstanding QofBackend errors
2227 + while self.get_error() is not ERR_BACKEND_NO_ERR:
2228 + error = self.pop_error()
2231 + def pop_all_errors(self):
2232 + """Returns any accumulated qof backend errors as a tuple
2234 + return tuple( self.generate_errors() )
2238 + def raise_backend_errors_after_call(function):
2239 + """A function decorator that results in a call to
2240 + raise_backend_errors after execution.
2242 + def new_function(self, *args):
2243 + return_value = function(self, *args)
2244 + self.raise_backend_errors(function.__name__)
2245 + return return_value
2246 + return new_function
2248 +class Book(GnuCashCoreClass):
2249 + """A Book encapsulates all of the GnuCash data, it is the place where
2250 + all GnuCash entities (Transaction, Split, Vendor, Invoice...), are
2251 + stored. You'll notice that all of the constructors for those entities
2252 + need a book to be associated with.
2254 + The most common way to get a book is through the book property in the
2255 + Session class, that is, create a session that connects to some storage,
2256 + such as through 'my_session = Session('file:my_books.xac')', and access
2257 + the book via the book property, 'my_session.book'
2259 + If you would like to create a Book without any backing storage, call the
2260 + Book constructor without any parameters, 'Book()'. You can later merge
2261 + such a book into a book with actual store by using merge_init.
2263 + Methods of interest
2264 + get_root_account -- Returns the root level Account
2265 + get_table -- Returns a commodity lookup table, of type GncCommodityTable
2267 + def InvoiceLookup(self, guid):
2268 + from gnucash_business import Invoice
2269 + return self.do_lookup_create_oo_instance(
2270 + gncInvoiceLookup, Invoice, guid.get_instance() )
2272 + def EntryLookup(self, guid):
2273 + from gnucash_business import Entr
2274 + return self.do_lookup_create_oo_instance(
2275 + gncEntryLookup, Entry, guid.get_instance() )
2277 + def CustomerLookup(self, guid):
2278 + from gnucash_business import Customer
2279 + return self.do_lookup_create_oo_instance(
2280 + gncCustomerLookup, Customer, guid.get_instance())
2282 + def JobLookup(self, guid):
2283 + from gnucash_business import Job
2284 + return self.do_lookup_create_oo_instance(
2285 + gncJobLookup, Job, guid.get_instance() )
2287 + def VendorLookup(self, guid):
2288 + from gnucash_business import Vendor
2289 + return self.do_lookup_create_oo_instance(
2290 + gncVendorLookup, Vendor, guid.get_instance() )
2292 + def EmployeeLookup(self, guid):
2293 + from gnucash_business import Employee
2294 + return self.do_lookup_create_oo_instance(
2295 + gncEmployeeLookup, Employee, guid.get_instance() )
2297 + def TaxTableLookup(self, guid):
2298 + from gnucash_business import TaxTable
2299 + return self.do_lookup_create_oo_instance(
2300 + gncTaxTableLookup, TaxTable, guid.get_instance() )
2302 + def TaxTableLookupByName(self, name):
2303 + from gnucash_business import TaxTable
2304 + return self.do_lookup_create_oo_instance(
2305 + gncTaxTableLookupByName, TaxTable, name)
2307 + def TaxTableGetTables(self):
2308 + from gnucash_business import TaxTable
2309 + return [ TaxTable(instance=item) for item in gncTaxTableGetTables(self.instance) ]
2311 + def BillLoookupByID(self, id):
2312 + from gnucash_business import Bill
2313 + return self.do_lookup_create_oo_instance(
2314 + gnc_search_bill_on_id, Bill, id)
2316 + def InvoiceLookupByID(self, id):
2317 + from gnucash_business import Invoice
2318 + return self.do_lookup_create_oo_instance(
2319 + gnc_search_invoice_on_id, Invoice, id)
2321 + def CustomerLookupByID(self, id):
2322 + from gnucash_business import Customer
2323 + return self.do_lookup_create_oo_instance(
2324 + gnc_search_customer_on_id, Customer, id)
2326 + def VendorLookupByID(self, id):
2327 + from gnucash_business import Vendor
2328 + return self.do_lookup_create_oo_instance(
2329 + gnc_search_vendor_on_id, Vendor, id)
2331 + def InvoiceNextID(self, customer):
2332 + ''' Return the next invoice ID.
2333 + This works but I'm not entirely happy with it. FIX ME'''
2334 + from gnucash.gnucash_core_c import gncInvoiceNextID
2335 + return gncInvoiceNextID(self.get_instance(),customer.GetEndOwner().get_instance()[1])
2337 + def BillNextID(self, vendor):
2338 + ''' Return the next Bill ID. '''
2339 + from gnucash.gnucash_core_c import gncInvoiceNextID
2340 + return gncInvoiceNextID(self.get_instance(),vendor.GetEndOwner().get_instance()[1])
2342 + def CustomerNextID(self):
2343 + ''' Return the next Customer ID. '''
2344 + from gnucash.gnucash_core_c import gncCustomerNextID
2345 + return gncCustomerNextID(self.get_instance())
2347 + def VendorNextID(self):
2348 + ''' Return the next Vendor ID. '''
2349 + from gnucash.gnucash_core_c import gncVendorNextID
2350 + return gncVendorNextID(self.get_instance())
2352 +class GncNumeric(GnuCashCoreClass):
2353 + """Object used by GnuCash to store all numbers. Always consists of a
2354 + numerator and denominator.
2356 + The constants GNC_DENOM_AUTO,
2357 + GNC_HOW_RND_FLOOR, GNC_HOW_RND_CEIL, GNC_HOW_RND_TRUNC,
2358 + GNC_HOW_RND_PROMOTE, GNC_HOW_RND_ROUND_HALF_DOWN,
2359 + GNC_HOW_RND_ROUND_HALF_UP, GNC_HOW_RND_ROUND, GNC_HOW_RND_NEVER,
2360 + GNC_HOW_DENOM_EXACT, GNC_HOW_DENOM_REDUCE, GNC_HOW_DENOM_LCD,
2361 + and GNC_HOW_DENOM_FIXED are available for arithmetic
2362 + functions like GncNumeric.add
2364 + Look at gnc-numeric.h to see how to use these
2367 + def __init__(self, num=0, denom=1, **kargs):
2368 + """Constructor that allows you to set the numerator and denominator or
2369 + leave them blank with a default value of 0 (not a good idea since there
2370 + is currently no way to alter the value after instantiation)
2372 + GnuCashCoreClass.__init__(self, num, denom, **kargs)
2373 + #if INSTANCE_ARG in kargs:
2374 + # GnuCashCoreClass.__init__(**kargs)
2376 + # self.set_denom(denom) # currently undefined
2377 + # self.set_num(num) # currently undefined
2379 + def __unicode__(self):
2380 + """Returns a human readable numeric value string as UTF8."""
2381 + if self.denom() == 0:
2382 + return "Division by zero"
2384 + value_float = self.to_double()
2385 + value_str = u"{0:.{1}f}".format(value_float,2) ## The second argument is the precision. It would be nice to be able to make it configurable.
2388 + def __str__(self):
2389 + """returns a human readable numeric value string as bytes."""
2390 + return unicode(self).encode('utf-8')
2392 +class GncPrice(GnuCashCoreClass):
2394 + Each priceEach price in the database represents an "instantaneous"
2395 + quote for a given commodity with respect to another commodity.
2396 + For example, a given price might represent the value of LNUX in USD on 2001-02-03.
2399 + * commodity: the item being priced.
2400 + * currency: the denomination of the value of the item being priced.
2401 + * value: the value of the item being priced.
2402 + * time: the time the price was valid.
2403 + * source: a string describing the source of the quote. These strings will be something like this:
2404 + "Finance::Quote", "user:misc", "user:foo", etc. If the quote came from a user, as a matter of policy,
2405 + you *must* prefix the string you give with "user:". For now, the only other reserved values are
2406 + "Finance::Quote" and "old-file-import". Any string used must be added to the source_list array in
2407 + dialog-price-edit-db.c so that it can be properly translated. (There are unfortunately many strings
2408 + in users' databases, so this string must be translated on output instead of always being used in untranslated form).
2409 + * type: the type of quote - types possible right now are bid, ask, last, nav, and
2410 + unknown.Each price in the database represents an "instantaneous" quote for a given
2411 + commodity with respect to another commodity.
2412 + For example, a given price might represent the value of LNUX in USD on 2001-02-03.
2414 + See also http://code.gnucash.org/docs/head/group__Price.html
2417 +GncPrice.add_methods_with_prefix('gnc_price_')
2420 +class GncPriceDB(GnuCashCoreClass):
2422 + a simple price database for gnucash.
2423 + The PriceDB is intended to be a database of price quotes, or more specifically,
2424 + a database of GNCPrices. For the time being, it is still a fairly simple
2425 + database supporting only fairly simple queries. It is expected that new
2426 + queries will be added as needed, and that there is some advantage to delaying
2427 + complex queries for now in the hope that we get a real DB implementation
2428 + before they're really needed.
2430 + Every QofBook contains a GNCPriceDB, accessible via gnc_pricedb_get_db.
2432 + Definition in file gnc-pricedb.h.
2433 + See also http://code.gnucash.org/docs/head/gnc-pricedb_8h.html
2436 +GncPriceDB.add_methods_with_prefix('gnc_pricedb_')
2438 + 'lookup_latest' : GncPrice,
2439 + 'lookup_nearest_in_time' : GncPrice,
2440 + 'lookup_latest_before' : GncPrice,
2441 + 'convert_balance_latest_price' : GncNumeric,
2442 + 'convert_balance_nearest_price' : GncNumeric,
2444 +methods_return_instance(GncPriceDB,PriceDB_dict)
2445 +GncPriceDB.get_prices = method_function_returns_instance_list(
2446 + GncPriceDB.get_prices, GncPrice )
2449 +class GncCommodity(GnuCashCoreClass): pass
2451 +class GncCommodityTable(GnuCashCoreClass):
2452 + """A CommodityTable provides a way to store and lookup commodities.
2453 + Commodities are primarily currencies, but other tradable things such as
2454 + stocks, mutual funds, and material substances are possible.
2456 + Users of this library should not create their own CommodityTable, instead
2457 + the get_table method from the Book class should be used.
2459 + This table is automatically populated with the GnuCash default commodity's
2460 + which includes most of the world's currencies.
2465 +class GncCommodityNamespace(GnuCashCoreClass):
2468 +class GncLot(GnuCashCoreClass):
2469 + def GetInvoiceFromLot(self):
2470 + from gnucash_business import Invoice
2471 + return self.do_lookup_create_oo_instance(
2472 + gncInvoiceGetInvoiceFromLot, Invoice )
2474 +class Transaction(GnuCashCoreClass):
2475 + """A GnuCash Transaction
2477 + Consists of at least one (generally two) splits to represent a transaction
2478 + between two accounts.
2481 + Has a GetImbalance() method that returns a list of all the imbalanced
2482 + currencies. Each list item is a two element tuple, the first element is
2483 + the imbalanced commodity, the second element is the value.
2485 + Warning, the commodity.get_instance() value can be None when there
2486 + is no currency set for the transaction.
2488 + _new_instance = 'xaccMallocTransaction'
2489 + def GetNthSplit(self, n):
2490 + return self.GetSplitList().pop(n)
2492 + def GetInvoiceFromTxn(self):
2493 + from gnucash_business import Transaction
2494 + return self.do_lookup_create_oo_instance(
2495 + gncInvoiceGetInvoiceFromTxn, Transaction )
2497 +def decorate_monetary_list_returning_function(orig_function):
2498 + def new_function(self):
2499 + # warning, item.commodity has been shown to be None
2500 + # when the transaction doesn't have a currency
2501 + return [(GncCommodity(instance=item.commodity),
2502 + GncNumeric(instance=item.value))
2503 + for item in orig_function(self) ]
2504 + return new_function
2506 +class Split(GnuCashCoreClass):
2507 + """A GnuCash Split
2509 + The most basic representation of a movement of currency from one account to
2512 + _new_instance = 'xaccMallocSplit'
2514 +class Account(GnuCashCoreClass):
2515 + """A GnuCash Account.
2517 + A fundamental entity in accounting, an Account provides representation
2518 + for a financial object, such as a ACCT_TYPE_BANK account, an
2519 + ACCT_TYPE_ASSET (like a building),
2520 + a ACCT_TYPE_LIABILITY (such as a bank loan), a summary of some type of
2521 + ACCT_TYPE_EXPENSE, or a summary of some source of ACCT_TYPE_INCOME .
2523 + The words in upper case are the constants that GnuCash and this library uses
2524 + to describe account type. Here is the full list:
2525 + ACCT_TYPE_ASSET, ACCT_TYPE_BANK, ACCT_TYPE_CASH, ACCT_TYPE_CHECKING, \
2526 + ACCT_TYPE_CREDIT, ACCT_TYPE_EQUITY, ACCT_TYPE_EXPENSE, ACCT_TYPE_INCOME, \
2527 + ACCT_TYPE_LIABILITY, ACCT_TYPE_MUTUAL, ACCT_TYPE_PAYABLE, \
2528 + ACCT_TYPE_RECEIVABLE, ACCT_TYPE_STOCK, ACCT_TYPE_ROOT, ACCT_TYPE_TRADING
2530 + These are not strings, they are attributes you can import from this
2533 + _new_instance = 'xaccMallocAccount'
2535 +class GUID(GnuCashCoreClass):
2536 + _new_instance = 'guid_new_return'
2539 +Session.add_constructor_and_methods_with_prefix('qof_session_', 'new')
2541 +def one_arg_default_none(function):
2542 + return default_arguments_decorator(function, None, None)
2543 +Session.decorate_functions(one_arg_default_none, "load", "save")
2545 +Session.decorate_functions( Session.raise_backend_errors_after_call,
2546 + "begin", "load", "save", "end")
2547 +Session.get_book = method_function_returns_instance(
2548 + Session.get_book, Book )
2550 +Session.book = property( Session.get_book )
2552 +# import all of the session backend error codes into this module
2553 +this_module_dict = globals()
2554 +for error_name, error_value, error_name_after_prefix in \
2555 + extract_attributes_with_prefix(gnucash_core_c, 'ERR_'):
2556 + this_module_dict[ error_name ] = error_value
2558 +#backend error codes used for reverse lookup
2559 +backend_error_dict = {}
2560 +for error_name, error_value, error_name_after_prefix in \
2561 + extract_attributes_with_prefix(gnucash_core_c, 'ERR_'):
2562 + backend_error_dict[ error_value ] = error_name
2564 +# GncNumeric denominator computation schemes
2565 +# Used for the denom argument in arithmetic functions like GncNumeric.add
2566 +from gnucash.gnucash_core_c import GNC_DENOM_AUTO
2568 +# GncNumeric rounding instructions
2569 +# used for the how argument in arithmetic functions like GncNumeric.add
2570 +from gnucash.gnucash_core_c import \
2571 + GNC_HOW_RND_FLOOR, GNC_HOW_RND_CEIL, GNC_HOW_RND_TRUNC, \
2572 + GNC_HOW_RND_PROMOTE, GNC_HOW_RND_ROUND_HALF_DOWN, \
2573 + GNC_HOW_RND_ROUND_HALF_UP, GNC_HOW_RND_ROUND, GNC_HOW_RND_NEVER
2575 +# GncNumeric denominator types
2576 +# used for the how argument in arithmetic functions like GncNumeric.add
2577 +from gnucash.gnucash_core_c import \
2578 + GNC_HOW_DENOM_EXACT, GNC_HOW_DENOM_REDUCE, GNC_HOW_DENOM_LCD, \
2579 + GNC_HOW_DENOM_FIXED
2581 +# import account types
2582 +from gnucash.gnucash_core_c import \
2583 + ACCT_TYPE_ASSET, ACCT_TYPE_BANK, ACCT_TYPE_CASH, ACCT_TYPE_CHECKING, \
2584 + ACCT_TYPE_CREDIT, ACCT_TYPE_EQUITY, ACCT_TYPE_EXPENSE, ACCT_TYPE_INCOME, \
2585 + ACCT_TYPE_LIABILITY, ACCT_TYPE_MUTUAL, ACCT_TYPE_PAYABLE, \
2586 + ACCT_TYPE_RECEIVABLE, ACCT_TYPE_STOCK, ACCT_TYPE_ROOT, ACCT_TYPE_TRADING
2589 +Book.add_constructor_and_methods_with_prefix('qof_book_', 'new')
2590 +Book.add_method('gnc_book_get_root_account', 'get_root_account')
2591 +Book.add_method('gnc_book_set_root_account', 'set_root_account')
2592 +Book.add_method('gnc_commodity_table_get_table', 'get_table')
2593 +Book.add_method('gnc_pricedb_get_db', 'get_price_db')
2594 +Book.add_method('qof_book_increment_and_format_counter', 'increment_and_format_counter')
2596 +#Functions that return Account
2597 +Book.get_root_account = method_function_returns_instance(
2598 + Book.get_root_account, Account )
2599 +#Functions that return GncCommodityTable
2600 +Book.get_table = method_function_returns_instance(
2601 + Book.get_table, GncCommodityTable )
2602 +#Functions that return GNCPriceDB
2603 +Book.get_price_db = method_function_returns_instance(
2604 + Book.get_price_db, GncPriceDB)
2607 +GncNumeric.add_constructor_and_methods_with_prefix('gnc_numeric_', 'create')
2609 +gncnumeric_dict = {
2610 + 'same' : GncNumeric,
2611 + 'add' : GncNumeric,
2612 + 'sub' : GncNumeric,
2613 + 'mul' : GncNumeric,
2614 + 'div' : GncNumeric,
2615 + 'neg' : GncNumeric,
2616 + 'abs' : GncNumeric,
2617 + 'add_fixed' : GncNumeric,
2618 + 'sub_fixed' : GncNumeric,
2619 + 'add_with_error' : GncNumeric,
2620 + 'sub_with_error' : GncNumeric,
2621 + 'mul_with_error' : GncNumeric,
2622 + 'div_with_error' : GncNumeric,
2623 + 'convert' : GncNumeric,
2624 + 'reduce' : GncNumeric
2626 +methods_return_instance(GncNumeric, gncnumeric_dict)
2629 +GncCommodity.add_constructor_and_methods_with_prefix('gnc_commodity_', 'new')
2630 +#Functions that return GncCommodity
2631 +GncCommodity.clone = method_function_returns_instance(
2632 + GncCommodity.clone, GncCommodity )
2634 +# GncCommodityTable
2635 +GncCommodityTable.add_methods_with_prefix('gnc_commodity_table_')
2636 +commoditytable_dict = {
2637 + 'lookup' : GncCommodity,
2638 + 'lookup_unique' : GncCommodity,
2639 + 'find_full' : GncCommodity,
2640 + 'insert' : GncCommodity,
2641 + 'add_namespace': GncCommodityNamespace,
2642 + 'find_namespace': GncCommodityNamespace,
2644 +methods_return_instance(GncCommodityTable, commoditytable_dict)
2646 +methods_return_instance_lists(
2647 + GncCommodityTable, { 'get_namespaces': GncCommodityNamespace,
2648 + 'get_namespaces_list': GncCommodityNamespace,
2649 + 'get_commodities': GncCommodity,
2650 + 'get_quotable_commodities': GncCommodity,
2654 +# GncCommodityNamespace
2655 +GncCommodityNamespace.add_methods_with_prefix('gnc_commodity_namespace_')
2656 +GncCommodityNamespace.get_commodity_list = \
2657 + method_function_returns_instance_list(
2658 + GncCommodityNamespace.get_commodity_list, GncCommodity )
2661 +GncLot.add_constructor_and_methods_with_prefix('gnc_lot_', 'new')
2664 + 'get_account' : Account,
2665 + 'get_book' : Book,
2666 + 'get_earliest_split' : Split,
2667 + 'get_latest_split' : Split,
2668 + 'get_balance' : GncNumeric,
2669 + 'lookup' : GncLot,
2670 + 'make_default' : GncLot
2672 +methods_return_instance(GncLot, gnclot_dict)
2675 +Transaction.add_methods_with_prefix('xaccTrans')
2676 +Transaction.add_method('gncTransGetGUID', 'GetGUID');
2679 + 'GetSplit': Split,
2680 + 'FindSplitByAccount': Split,
2681 + 'Clone': Transaction,
2682 + 'Reverse': Transaction,
2683 + 'GetReversedBy': Transaction,
2684 + 'GetImbalanceValue': GncNumeric,
2685 + 'GetAccountValue': GncNumeric,
2686 + 'GetAccountAmount': GncNumeric,
2687 + 'GetAccountConvRate': GncNumeric,
2688 + 'GetAccountBalance': GncNumeric,
2689 + 'GetCurrency': GncCommodity,
2693 +methods_return_instance(Transaction, trans_dict)
2694 +methods_return_instance_lists(
2695 + Transaction, { 'GetSplitList': Split,
2697 +Transaction.decorate_functions(
2698 + decorate_monetary_list_returning_function, 'GetImbalance')
2701 +Split.add_methods_with_prefix('xaccSplit')
2702 +Split.add_method('gncSplitGetGUID', 'GetGUID');
2706 + 'GetAccount': Account,
2707 + 'GetParent': Transaction,
2709 + 'GetOtherSplit': Split,
2710 + 'GetAmount': GncNumeric,
2711 + 'GetValue': GncNumeric,
2712 + 'GetSharePrice': GncNumeric,
2713 + 'ConvertAmount': GncNumeric,
2714 + 'GetBaseValue': GncNumeric,
2715 + 'GetBalance': GncNumeric,
2716 + 'GetClearedBalance': GncNumeric,
2717 + 'GetReconciledBalance': GncNumeric,
2718 + 'VoidFormerAmount': GncNumeric,
2719 + 'VoidFormerValue': GncNumeric,
2722 +methods_return_instance(Split, split_dict)
2724 +Split.account = property( Split.GetAccount, Split.SetAccount )
2725 +Split.parent = property( Split.GetParent, Split.SetParent )
2728 +Account.add_methods_with_prefix('xaccAccount')
2729 +Account.add_methods_with_prefix('gnc_account_')
2730 +Account.add_method('gncAccountGetGUID', 'GetGUID');
2733 + 'get_book' : Book,
2734 + 'Lookup' : Account,
2735 + 'get_parent' : Account,
2736 + 'get_root' : Account,
2737 + 'nth_child' : Account,
2738 + 'lookup_by_code' : Account,
2739 + 'lookup_by_name' : Account,
2740 + 'lookup_by_full_name' : Account,
2741 + 'FindTransByDesc' : Transaction,
2742 + 'FindSplitByDesc' : Split,
2743 + 'GetBalance' : GncNumeric,
2744 + 'GetClearedBalance' : GncNumeric,
2745 + 'GetReconciledBalance' : GncNumeric,
2746 + 'GetPresentBalance' : GncNumeric,
2747 + 'GetProjectedMinimumBalance' : GncNumeric,
2748 + 'GetBalanceAsOfDate' : GncNumeric,
2749 + 'ConvertBalanceToCurrency' : GncNumeric,
2750 + 'ConvertBalanceToCurrencyAsOfDate' : GncNumeric,
2751 + 'GetBalanceInCurrency' : GncNumeric,
2752 + 'GetClearedBalanceInCurrency' : GncNumeric,
2753 + 'GetReconciledBalanceInCurrency' : GncNumeric,
2754 + 'GetPresentBalanceInCurrency' : GncNumeric,
2755 + 'GetProjectedMinimumBalanceInCurrency' : GncNumeric,
2756 + 'GetBalanceAsOfDateInCurrency' : GncNumeric,
2757 + 'GetBalanceChangeForPeriod' : GncNumeric,
2758 + 'GetCommodity' : GncCommodity,
2761 +methods_return_instance(Account, account_dict)
2762 +methods_return_instance_lists(
2763 + Account, { 'GetSplitList': Split,
2764 + 'get_children': Account,
2765 + 'get_children_sorted': Account,
2766 + 'get_descendants': Account,
2767 + 'get_descendants_sorted': Account
2769 +Account.name = property( Account.GetName, Account.SetName )
2772 +GUID.add_methods_with_prefix('guid_')
2773 +GUID.add_method('xaccAccountLookup', 'AccountLookup')
2774 +GUID.add_method('xaccTransLookup', 'TransLookup')
2775 +GUID.add_method('xaccSplitLookup', 'SplitLookup')
2777 +## define addition methods for GUID object - do we need these
2778 +GUID.add_method('guid_to_string', 'to_string')
2779 +#GUID.add_method('string_to_guid', 'string_to_guid')
2783 + 'TransLookup': Transaction,
2784 + 'AccountLookup': Account,
2785 + 'SplitLookup': Split
2787 +methods_return_instance(GUID, guid_dict)
2790 +class GUIDString(GnuCashCoreClass):
2793 +GUIDString.add_constructor_and_methods_with_prefix('string_', 'to_guid')
2796 +from gnucash_core_c import \
2803 +from gnucash_core_c import \
2804 + QOF_STRING_MATCH_NORMAL, \
2805 + QOF_STRING_MATCH_CASEINSENSITIVE
2807 +from gnucash_core_c import \
2809 + QOF_COMPARE_LTE, \
2810 + QOF_COMPARE_EQUAL, \
2812 + QOF_COMPARE_GTE, \
2815 +from gnucash_core_c import \
2818 +from gnucash_core_c import \
2821 +class Query(GnuCashCoreClass):
2824 +Query.add_constructor_and_methods_with_prefix('qof_query_', 'create')
2826 +Query.add_method('qof_query_set_book', 'set_book')
2827 +Query.add_method('qof_query_search_for', 'search_for')
2828 +Query.add_method('qof_query_run', 'run')
2829 +Query.add_method('qof_query_add_term', 'add_term')
2830 +Query.add_method('qof_query_add_boolean_match', 'add_boolean_match')
2831 +Query.add_method('qof_query_destroy', 'destroy')
2833 +class QueryStringPredicate(GnuCashCoreClass):
2836 +QueryStringPredicate.add_constructor_and_methods_with_prefix('qof_query_', 'string_predicate')
2838 +class QueryBooleanPredicate(GnuCashCoreClass):
2841 +QueryBooleanPredicate.add_constructor_and_methods_with_prefix('qof_query_', 'boolean_predicate')
2843 +class QueryInt32Predicate(GnuCashCoreClass):
2846 +QueryInt32Predicate.add_constructor_and_methods_with_prefix('qof_query_', 'int32_predicate')