2018-12-29 GnuCash IRC logs
00:39:15 *** boldstripe has quit IRC
00:40:11 *** boldstripe has joined #gnucash
01:20:23 *** fell has quit IRC
01:21:41 *** fell has joined #gnucash
01:38:02 *** Mechtilde has joined #gnucash
02:24:23 *** sbluhm has joined #gnucash
02:39:08 <sbluhm> Hello all, I am currently working on Gnucash 3.3 with Python bindings (Python 3.4). In the background is a MySQL database. It appears to me, that the new transaction date format (SetDatePostedSecs and SetDateEnteredSecs) has an issue with time zones. My understanding: Input format is Date only, no time. So I input datetime.datetime.today() which should return an ISO date. In the mysql database, today() - 1 hr gets stored (I live in UTC+1). I am still trying
02:39:09 <sbluhm> Does anyone have any experience with this? What could be a solution? My expectation is, that GnuCash would enter any date as local timezone into the DB, not UTC/DB timezome.
02:39:56 *** boldstripe has quit IRC
02:40:51 *** boldstripe has joined #gnucash
02:43:27 *** nimish has quit IRC
02:46:59 *** nimish has joined #gnucash
03:13:40 *** gour has joined #gnucash
04:03:11 *** nimish has quit IRC
04:03:12 *** nimish_ has joined #gnucash
04:03:44 *** nimish_ is now known as nimish
04:05:16 *** nimish has quit IRC
04:05:44 *** nimish has joined #gnucash
04:31:04 <yyoshino> libgnucash/app-utils/date-utilities.scm:900 msgid "One Week Ago" is defined, but its scm function is not found?
04:32:58 <richard> I would think that if you round to nearest day, then you need to stick to the local time zone.
04:40:36 *** boldstripe has quit IRC
04:41:31 *** boldstripe has joined #gnucash
04:49:19 *** nimish_ has joined #gnucash
04:50:26 *** nimish has quit IRC
04:50:26 *** nimish_ is now known as nimish
05:29:12 *** maschinenhans has joined #gnucash
05:45:29 *** nimish has quit IRC
06:02:59 *** nimish has joined #gnucash
06:32:30 *** fabior has joined #gnucash
06:41:17 *** boldstripe has quit IRC
06:42:20 *** maschinenhans has quit IRC
06:56:24 *** oozer has joined #gnucash
07:05:42 *** jotrago has quit IRC
07:13:30 *** immae has quit IRC
07:13:51 *** jotrago has joined #gnucash
07:19:51 *** jotrago has quit IRC
07:19:52 *** immae has joined #gnucash
07:30:20 *** Jimraehl1 has joined #gnucash
07:30:42 *** Jimraehl1 has left #gnucash
08:22:11 *** monkeyjuice has joined #gnucash
08:28:42 *** O01eg has quit IRC
08:30:56 *** oozer has quit IRC
08:42:21 *** O01eg has joined #gnucash
08:47:13 *** gjanssens_afk is now known as gjanssens
08:49:36 <sbluhm> @richard, this is actually what I am trying to do (local time). As I don't pass any time itself, it is already "rounded" to the nearest day. It appears that the api is subtracting a UTC delta factor whilst this is not required. I am trying to track down the source code but was hoping someone already has this working and could help me out
08:49:36 <gncbot> sbluhm: Error: "richard," is not a valid command.
08:50:41 <sbluhm> richard, this is actually what I am trying to do (local time). As I don't pass any time itself, it is already "rounded" to the nearest day. It appears that the api is subtracting a UTC delta factor whilst this is not required. I am trying to track down the source code but was hoping someone already has this working and could help me out
09:06:59 *** boldstripe has joined #gnucash
09:12:46 *** boldstripe has quit IRC
09:13:46 *** boldstripe has joined #gnucash
09:19:57 <richard> @sbluhm Is this python or gnucash
09:19:57 <gncbot> richard: Error: "sbluhm" is not a valid command.
09:21:05 <richard> @sbluhm I am software dev, and new gnucash user.
09:21:05 <gncbot> richard: Error: "sbluhm" is not a valid command.
09:25:08 <richard> @sbluhm I would be interested in your experiances with python bindings. What can I do with them? I can use gnucash, but want a way to add invoices, with defaults. Customer A should default to 2 hours, £30/hour, etc. Customer B should auto pay (no need to click pay invoice). Can I do this with python bindings? Even if I have to create a User interface element, that is OK. I am not asking how, just some advice, as to whether it is a good
09:25:08 <gncbot> richard: Error: "sbluhm" is not a valid command.
09:25:09 <richard> direction to go.
09:31:23 *** tienne has joined #gnucash
10:00:41 <sbluhm> Hi richard, this is actually the python bindings from gnucash that I am currently working with. the bindings are no issues on gnucash 2.7. 3.3 Whilst I am adapting "my" scripts to python and gnucash 3, I am hitting this mentioned issue, which I am now assuming it is a bug. I am still working on the proof/disproof.
10:04:32 <sbluhm> with the python bindings, you can do a lot. I am not working with UI but am a script kiddy so am patching everything together and yet have to do more. I have not used the bindings for creating invoices but there are functions for customers and invoices. One way is to check out the example snipplets on github.
10:04:32 <sbluhm> I am using python to download CSVs from my online accounts and CC statements, auto-match the accounts, export to qif and from qif to gnucash. automatically every night
10:04:51 *** monkeyjuice has quit IRC
10:15:20 *** oozer has joined #gnucash
10:32:39 *** nimish has quit IRC
11:19:22 <yyoshino> still translating ...
11:36:24 *** nimish has joined #gnucash
11:37:58 *** boldstripe_ has joined #gnucash
11:38:12 *** boldstripe has quit IRC
11:38:12 *** boldstripe_ is now known as boldstripe
12:09:51 <jralls> sblum, richard: This has been around forever, see https://bugs.gnucash.org/show_bug.cgi?id=137017 + dozens of threads in the list archives.
12:13:14 *** finster has left #gnucash
12:21:21 <jralls> yyoshino: "One Week Ago" and friends needs some research for which I don't have time today... but on first look it appears that none of those strings are used anywhere.
12:22:00 <chris> more dead weight
12:22:04 * chris off sleep
12:23:44 <jralls> gjanssens: Do you have time to look over https://github.com/Gnucash/gnucash/pull/445 today? It looks mostly uncontroversial except for replacing the collectors. If not I'll just cherry pick the latest commit to fix bug 796994.
12:25:08 <gjanssens> jralls: no, I will have to leave in about 15 mins. But as you say it all looks uncontroversial to me as well so follow your own judgement.
12:25:37 <jralls> OK.
12:27:15 <sbluhm> Thanks jralls, I will have a look through the details. strange that I did not his this issue until moving from GnuCash 2.7 to 3.3.
12:29:01 <jralls> sbluhm: The short answer is that since 2.6.12 date-posted is stored as 10:59 AM UTC, that being the time that is date-stable across almost all time zones.
12:30:35 <jralls> But most dates have always been handled as unix time in GnuCash because in 1998 that was the only standard way to handle any sort of time in C.
12:32:06 <yyoshino> I don't see the exact meaning of 'head or tail' ...
12:32:23 <jralls> yyoshino: In what context?
12:37:03 *** nimish has quit IRC
12:37:27 *** nimish has joined #gnucash
12:37:48 <sbluhm> hmm, I just verified that it was working ok for me on 2.6.21 (centos 7 latest version)
12:40:06 <jralls> Your original post suggests that you were trying to feed a date somehow to SetDatePostedSecs. The "Secs" part of the function name tells you that it expects seconds since the epoch.
12:41:53 <jralls> If you want to pass it a date use SetDatePostedGDate, though I'm not sure how you get a GDate from the python bindings.
12:42:08 *** gjanssens has quit IRC
12:42:34 <jralls> BTW, date-entered is unadjusted, it's the second that the transaction was created.
12:43:28 *** nimish has quit IRC
12:43:58 *** nimish has joined #gnucash
12:44:19 <yyoshino> stylesheet name -- probably the meaning is a feature to place some metadata/annotations to head or to tail of the report
12:53:40 <sbluhm> thanks. I will try/verify the seconds from epoch. Not sure if I have done it. But even if I remove the SetDateEnteredSecs and let the Gnucash API handle this value, there is a 1hr offset in the DB. Anyways, I will have a read through the bugzilla now to get more background on it
12:56:34 <jralls> yyoshino: That might have been the original intent. It adds some lines about running the report between the title and the report table with the formatting of "Easy".
12:56:48 *** fabior has quit IRC
12:59:44 <jralls> sbluhm: Yeah, and it will be a 2-hour offset when you switch to Summer Time. It's UTC in the database. It's UTC in the XML file, too, just expressed as a "local" time with an offset -- and I'm going to change that soon to straight UTC as well.
13:32:01 <sbluhm> Thanks again jralls. Overall, I am more confused now on the behaviour that I am seeing but in the end, it is not worse. I definetley did not use seconds since epoch on DateEntered and this value is also not important to me. I "fixed" the SetDatePostedSec by using SetDate and it all worked fine (or better than before, I am not sure).
13:43:27 *** dBASE_User has joined #gnucash
13:46:31 <dBASE_User> Hi, I'm a dBASE user. I'm trying to figure out how to read a Gnucash transaction file using database or an XML parser. My level of experience here is about a 1 on a 1 to 10 scale. Thanks to anyone who responds.
14:09:40 *** nimish has quit IRC
14:17:09 *** frakturfreak has joined #gnucash
14:29:16 *** kapil___ has joined #gnucash
14:32:32 <fell> I hope, one day chris will also clean up the stylesheets. ;-) IMHO the additional fields should become part of the report options and the stylesheets only contain layout, colour etc.
14:33:47 *** gncbot sets mode: +o fell
14:34:08 <jralls> dBASE_User: You mean the old Ashton-Tate database program from the early 80's? Anyway, the databases you'd "read" with the appropriate command-line front end. The XML file is, well, XML. It might be compressed with gzip depending on your preference settings.
14:34:39 <jralls> fell: +1
14:45:04 <dBASE_User> Yes, dBASE was originally from the 80's, but it has been revised many times since then. So, keeping in mind that you're offering to help someone with an experience level of 1, could you direct me to a stand-alone parser that reads Gnucash xml files? Something with the code displayed would be helpful.
14:46:30 <fell> It might be easier to save in sql and convert then to dbase
14:47:11 <fell> e.g. via dump
14:49:31 <fell> or you create an XSLT
14:50:03 <yyoshino> uploaded the last version to TP, going to sleep :)
14:50:30 <fell> Thanks, yyoshino>!
14:54:47 *** max has joined #gnucash
14:55:41 <jralls> yyoshino: Awesome, thanks!
14:55:41 <dBASE_User> @Fell, when I look at the "save-as" options, I only see xml, Postgres, and sqlLite3. I don't have Postgres or sqlLite3. Any other suggestions?
14:55:41 <gncbot> dBASE_User: Error: "Fell," is not a valid command.
14:56:20 <dBASE_User> Fell, when I look at the "save-as" options, I only see xml, Postgres, and sqlLite3. I don't have Postgres or sqlLite3. Any other suggestions?
14:57:03 <jralls> What OS are you using?
14:59:13 <jralls> And what's the goal?
15:01:44 <dBASE_User> jrails: I'm using Widows 10, and I'd like to be able to manipulate the GnuCash data in dBASE.
15:04:42 <jralls> Does dBase understand SQL?
15:04:53 <fell> If you only need parts like transactions, you can also export ... to csv
15:06:50 <dBASE_User> jralls: dBASE understands local sql
15:06:50 <jralls> You can get sqlite3 tools pre-compiled for Windows from https://www.sqlite.org/download.html. With those you can dump the database to a file containing SQL commands to create and populate the tables.
15:07:35 <dBASE_User> feel: yes, I know how to export to csv, but I'm thinking there's a way to avoid that middle step and have dBASE read the data directly. any ideas?
15:08:24 <dBASE_User> fell: maybe a driver that works with gnucash to read the data?
15:10:07 *** boldstripe has quit IRC
15:11:15 *** boldstripe has joined #gnucash
15:11:53 <fell> In theory you can write a XSLT, but the other ways should be easier.
15:14:15 <dBASE_User> fell: I just Googled xlst. It's a language for transforming xml documents into other xml documents. I don't think that's what I need. Is there a gnucash driver for converting?
15:16:59 *** max has quit IRC
15:17:05 <dBASE_User> fell: and what are the other ways that you referenced?
15:17:08 *** max_ has joined #gnucash
15:17:20 *** max_ is now known as max
15:17:33 <fell> csv or SQL
15:20:25 *** tienne has quit IRC
15:20:50 <dBASE_User> fell: there's no driver for reading gnucash files?
15:22:22 <dBASE_User> fell: I'd like to be able to read the gnucash file as it exists (uncompressed), and without having to convert it.
15:22:58 *** tienne has joined #gnucash
15:24:06 <fell> https://www.google.com/search?client=firefox-b&q=xml+to+database
15:25:21 <fell> dbase, google replaced it on the first run
15:27:18 *** tienne has quit IRC
15:28:38 *** tienne has joined #gnucash
15:28:45 <dBASE_User> fell: yes, I know I could Google "XML to dBASE" but that will just get me generic ways to convert XML. I was thinking there's probably something more specific that pertains to Gnucash
15:29:41 <dBASE_User> fell: also, I'd prefer to find something that reads the existing Gnucash file, without having to convert it
15:29:54 <fell> Most of us left dbase decades ago, when SQL became a standard.
15:32:20 <dBASE_User> fell: OK, let's forget I mentioned dBASE. Is there a driver that could be used by another program to read a Gnucash file?
15:34:01 <fell> Install SQLite, Postgress, Mariadb, MySQL and save as SQL
15:34:42 <dBASE_User> fell: so, there's no driver?
15:36:52 <fell> We support 2 backends: libxml and libdbi. The latter supports above DBS.
15:37:19 <dBASE_User> fell: please explain DBS
15:37:33 <fell> DataBases
15:38:21 <fell> or DBMS (data base management systems) to be precise.
15:38:52 <dBASE_User> fell: OK, so if I install SQLite, it would be able to use libdbi and read a Gnucash file that was saved in that format?
15:40:19 <fell> Gnucash can then store it's data via libdbi in a SQLite data base.
15:41:11 <fell> Then you should be able to do almost everything with SQL command.
15:41:24 <fell> s
15:44:36 <dBASE_User> fell: I appreciate your suggestion, but it sounds like that solution will just give me a way to search through the Gnuscash data using SQL commands. That's not what I'm trying to do. I'm not looking for new search capability. I want a way to read the datafile.
15:44:49 <dBASE_User> fell: not search it. Read it.
15:45:45 <dBASE_User> fell: I'm not looking for a better way to perform queries.
15:45:48 <jralls> dBASE_User: Then just open the XML file in Notepad.
15:46:42 <jralls> dBASE_User: Make sure that you have "compress files" unchecked in Edit>Preferences, General tab before saving.
15:48:28 <dBASE_User> jralls: Thanks but I don't need help reading it myself. I can read it fine. What I want is for another program to be able to read it.
15:49:03 <dBASE_User> There's no ODBC or oleAutoclient for Gnucash?
15:49:46 <fell> Not in gnucash, but in the SQL DBMSes
15:50:38 <jralls> Of course not. There may be for SQLite3, Postgresql, and/or MySQL. Those are the database services that GnuCash can work with.
15:51:03 <fell> at least I know about ODBC. ole is MS specifuic.
15:53:26 <jralls> But once you have an ODBC connection you still need a program that understands GnuCash's database schema.
15:53:39 <dBASE_User> OK, what you're both saying is helpful, and I understand... no ODBC in Gnucash. Still, it seems to me that the data in Gnucash is already in a perfectly fine existing format. There should be a simple way to read it using another program.I'm sure someone has already thought of the way to do it.
15:53:57 <dBASE_User> Yes, what is the schema for Gnucash's XML format?
15:55:37 <jralls> https://github.com/Gnucash/gnucash/blob/maint/libgnucash/doc/xml/gnucash-v2.rnc
15:56:34 *** jotrago has joined #gnucash
15:56:50 <sbluhm> dBASE_User, I might be shipping in with an additional idea (without knowing what exactly you are trying to achieve...). There are python bindings that you can use to query all data directly. also on top of that a REST api (that I am not sur eon the maturity). Maybe that can get you further with your plan
15:56:51 <dBASE_User> jralls: thanks, I'm looking at this right now
15:58:23 <jralls> There's also https://github.com/sdementen/piecash, another Python library for working with GnuCash data stored in SQLite3.
15:59:53 *** tienne has quit IRC
16:00:21 <dBASE_User> jralls: the GitHub page 404'd
16:00:37 <jralls> Which one?
16:01:13 <fell> https://github.com/sdementen/piecash works for me
16:01:38 *** tienne has joined #gnucash
16:02:48 <dBASE_User> jralls: sorry, the first GitHub page you suggested 404'd
16:03:26 <jralls> Worked for me just now.
16:03:57 <dBASE_User> jralls: I will try again
16:04:25 <jralls> You could try starting from https://github.com/Gnucash/gnucash and following the path starting at libgnucash.
16:05:27 <dBASE_User> sbluhm: thanks for your suggestion. Do you know of any Pyrthon routine that queries the data in a Gnucash file? If so, I could adapt its methodology
16:06:33 <dBASE_User> jralls: the first GitHub page you suggested works, and it's helpful, but I need a push in the right direction for writing the code that uses the schema to read the file.
16:07:33 <jralls> dBASE_User: What language do you want to use?
16:09:25 *** tienne has quit IRC
16:09:30 <jralls> Actually, strike that. It's clear that you don't understand XML well enough to start writing. Go study XML.
16:11:13 *** tienne has joined #gnucash
16:12:47 <dBASE_User> jralls: thanks
16:12:52 <dBASE_User> Any other suggestions?
16:14:01 <dBASE_User> sbluhm: you mentioned a REST api. Please explain what you're suggesting.
16:42:19 *** tienne has quit IRC
16:43:38 *** tienne has joined #gnucash
16:55:11 *** lukepafford has joined #gnucash
16:55:38 *** lukepafford has left #gnucash
16:59:53 *** gour1 has joined #gnucash
17:01:41 *** gour has quit IRC
17:02:18 *** jotrago has quit IRC
17:02:45 *** jotrago has joined #gnucash
17:10:48 *** boldstripe has quit IRC
17:11:44 *** boldstripe has joined #gnucash
17:45:23 *** Mechtilde has quit IRC
17:46:12 *** boldstripe has quit IRC
17:47:39 *** boldstripe has joined #gnucash
17:56:39 *** gour1 has quit IRC
18:26:10 *** frakturfreak has quit IRC
18:52:42 *** dBASE_User has quit IRC
18:54:08 *** kapil___ has quit IRC
19:42:09 <warlord> .
20:11:21 *** oozer has quit IRC
20:32:46 *** nimish has joined #gnucash
20:58:05 *** nimish has quit IRC
20:58:28 *** nimish has joined #gnucash
21:15:42 *** max has quit IRC
21:35:54 *** tienne has quit IRC
21:49:33 *** boldstripe has quit IRC
21:50:30 *** boldstripe has joined #gnucash
23:50:14 *** boldstripe has quit IRC
23:51:09 *** boldstripe has joined #gnucash
23:54:05 *** nimish has quit IRC