2014-03-06 GnuCash IRC logs

00:11:30 *** O01eg has quit IRC
00:15:36 *** linas_ has joined #gnucash
00:15:37 *** linas has quit IRC
00:41:59 *** Sleep has quit IRC
00:48:59 *** benbergman has joined #gnucash
01:42:52 *** aqua_ has joined #gnucash
01:43:08 *** fell has joined #gnucash
01:43:10 *** gncbot sets mode: +o fell
01:51:45 *** aqua___ has quit IRC
02:18:28 *** jmd has joined #gnucash
02:21:11 *** fell_ has joined #gnucash
02:21:11 *** gncbot sets mode: +o fell_
02:30:38 *** fell has quit IRC
02:38:50 *** aqua_ has quit IRC
02:47:43 *** gjanssens has joined #gnucash
02:47:43 *** gncbot sets mode: +o gjanssens
02:52:02 *** Krzysiek_K has joined #gnucash
03:02:00 *** aqua___ has joined #gnucash
03:10:45 *** Krzysiek_K has left #gnucash
03:35:59 *** jmd` has joined #gnucash
04:08:54 *** amjam has quit IRC
05:21:32 *** MechtiIde has joined #gnucash
05:34:28 *** MechtiIde has quit IRC
05:40:31 *** MechtiIde has joined #gnucash
05:48:04 *** jmd` has quit IRC
06:05:18 *** MechtiIde has quit IRC
06:32:25 *** aqua___ has quit IRC
07:02:29 *** Jimraehl1 has joined #gnucash
07:07:48 *** Jimraehl1 has quit IRC
07:36:23 *** MechtiIde has joined #gnucash
08:00:43 *** warlord has joined #gnucash
08:00:43 *** gncbot sets mode: +o warlord
08:14:36 *** jmd` has joined #gnucash
08:14:43 *** jmd has quit IRC
08:18:33 *** StuM has quit IRC
09:07:05 *** benoitg has joined #gnucash
09:54:39 *** warlord has quit IRC
10:01:09 *** warlord has joined #gnucash
10:01:10 *** gncbot sets mode: +o warlord
10:07:11 *** ErKa has joined #gnucash
10:19:39 *** linas__ has joined #gnucash
10:19:40 *** linas_ has quit IRC
10:20:34 *** MechtiIde has quit IRC
11:13:11 *** O01eg has joined #gnucash
11:33:43 *** aqua___ has joined #gnucash
11:41:54 *** jmd` has quit IRC
11:47:52 *** jralls has joined #gnucash
11:47:53 *** gncbot sets mode: +o jralls
11:51:30 *** MechtiIde has joined #gnucash
12:13:37 *** Sleep has joined #gnucash
12:24:09 *** MechtiIde has quit IRC
12:30:20 *** warlord has quit IRC
13:15:43 *** MechtiIde has joined #gnucash
13:45:22 *** fell_ is now known as fell
13:46:40 *** ErKa has quit IRC
14:37:51 *** hhn10 has joined #gnucash
15:04:10 *** fell_ has joined #gnucash
15:04:11 *** gncbot sets mode: +o fell_
15:12:58 *** fell has quit IRC
15:20:33 *** ErKa has joined #gnucash
15:36:04 *** JeremyK has joined #gnucash
15:37:21 *** O01eg has quit IRC
15:39:20 <JeremyK> I am trying to load a picture at the bottom of a report. The location of the file is: C:\Users\first Name\.gnucash/v-mc-d-amex_900x178.jpg. I have found what I think is the correct code in html-text.scm. However I have tried many combinations of this line----- (display "src=\"") (display src) (display"\"") ----- Without success. Could someone help me out?
15:40:33 <JeremyK> I am using gnucash 2.61 on windows 7
15:43:36 *** O01eg has joined #gnucash
15:44:49 <gjanssens> JeremyK: Does your added src= text end up in your final html when the report is run ? You can check by exporting the html after running the report.
15:44:59 *** Ahmuck has joined #gnucash
15:45:07 <Ahmuck> hi. i need help with splits
15:50:10 <JeremyK> no it does not show up
15:50:45 *** MechtiIde has quit IRC
15:54:54 <gjanssens> JeremyK: Then you're probably adding code in the wrong place or ther wrong way
15:55:26 <gjanssens> Why are you changing html-text.scm ? That code is generic and used by all reports in many places
15:56:01 <gjanssens> I would expect you to try and add a gnc-markup-img call in the report you want to change
15:56:16 <gjanssens> Or in a style sheet if you want to apply the image to all reports
15:56:34 <gjanssens> But perhaps I don't understand very well what you are trying to achieve
15:58:25 <gjanssens> Ahmuck: please ask in more detail if you want help
16:01:07 <JeremyK> I am using the generic code from the html-text.scm to make a modified version of fancy-invoice.scm. Everything is working until I try to add the gnc:html-markup-img
16:08:24 <gjanssens> Just to get that clear: are you trying to add a call to gnc:html-markup-img in fancy-invoice.scm ?
16:08:51 <gjanssens> Or in a copy thereof somewhere in your .gnucash directory which you load as a custom report ?
16:12:38 <JeremyK> I created a copy of fancy-invoice and have added some customization. I have put this in my .gnucash directory. I have configured config.user to load the report. Gnucash will load the report and all works well. Now I am trying to add an image at the bottom.
16:16:24 <Ahmuck> how do i post an xml file here?
16:16:56 <gjanssens> Ok. So you are trying to call gnc:html-markup-img for this. What have you set the src parameter to ? he full image path, or just a path relative to your .gnucash directory ?
16:17:24 <gjanssens> Ahmuck: you don't really. Please put it somewhere on the (public) internet and post a link here
16:19:56 <Ahmuck> http://www.speedyshare.com/VkzDw/Junk-20140306.gnucash
16:20:36 <JeremyK> (display "src=\"") (file:///C:\Users\First Last\.gnucash/v-mc-d-amex_900x178.jpg) ("\"") does not work
16:21:51 <JeremyK> (display "src=\"") (v-mc-d-amex_900x178.jpg) ("\"") does not work either
16:22:14 <gjanssens> JeremyK: those are not calls to gnc:html-markup-img as far as I can see...
16:23:45 <gjanssens> gnc:html-markup-img writes to a string, display writes to standard out
16:24:08 <JeremyK> there is a paragraph that i have taken from html-text.scm. i am just changing the one line within this paragraph
16:24:31 <gjanssens> Ahmuck: again, if you need help you need to ask your question
16:25:41 <gjanssens> JeremyK: at the very least you will have to wrap your filename in a display statement as well
16:25:45 <gjanssens> Something like
16:26:24 <Ahmuck> how does it work?
16:26:25 <gjanssens> (display "src=\"") (display "v-mc-d-amex_900x178.jpg")(display "\"")
16:26:32 <Ahmuck> i can't get the amount to split correctly
16:27:49 <gjanssens> Ahmuck what are you trying to achieve ?
16:37:21 *** O01eg has quit IRC
16:41:13 <JeremyK> I have tried (display "src=\"") (display "v-mc-d-amex_900x178.jpg")(display "\"") and (display "src=\"") (C:\Users\First Last\.gnucash/"v-mc-d-amex_900x178.jpg")(display "\"")
16:41:35 <JeremyK> (display "src=\"") (display "C:\Users\First Last\.gnucash/v-mc-d-amex_900x178.jpg")(display "\"")
16:42:44 *** O01eg has joined #gnucash
16:43:08 <JeremyK> sorry hit enter before I could correct the first past. Tried the second post there too. still not working
16:46:03 <JeremyK> gjanssens: Thanks for helping, I appreciate this very much
16:46:17 <gjanssens> And do you get any error messages ? Either on screen on in the gnucash trace file ?
16:47:11 <gjanssens> Ahmuck: please be more specific about what you did, what you expected to happen and what happened instead
16:48:19 <JeremyK> I get Report error
16:48:19 <JeremyK> An error occurred while running the report.
16:48:43 <gjanssens> Ah, then the trace file likely holds more details
16:49:19 <JeremyK> the html report file just looks as it did before I entered an invoice .
16:51:16 <gjanssens> JeremyK: http://wiki.gnucash.org/wiki/Tracefile
16:51:22 <JeremyK> this is the whole paragraph to make sure we are on the same page
16:51:23 <JeremyK> (define (gnc:html-markup-img src . rest)
16:51:23 <JeremyK> (gnc:html-markup/attr/no-end
16:51:23 <JeremyK> "img"
16:51:23 <JeremyK> (with-output-to-string
16:51:23 <JeremyK> (lambda ()
16:51:24 <JeremyK> (display "src=\"") (display "v-mc-d-amex_900x178.jpg") (display"\"")
16:51:26 <JeremyK> (display " ")
16:51:28 <JeremyK> (for-each
16:51:30 <JeremyK> (lambda (kvp)
16:51:32 <JeremyK> (display (car kvp))
16:51:34 <JeremyK> (display "=\"")
16:51:36 <JeremyK> (display (cadr kvp))
16:51:38 <JeremyK> (display "\" "))
16:51:40 <JeremyK> rest)))))
16:51:42 <JeremyK>
16:55:15 <JeremyK> Bad define placement (define (gnc:html-markup-img src . rest) (gnc:html-markup/attr/no-end "img" (with-output-to-string (lambda () (display "src=\"") (display "v-mc-d-amex_900x178.jpg") (display "\"") (display " ") (for-each (lambda (kvp) (display #) (display "=\"") (display #) (display "\" ")) rest))))).
16:56:51 <gjanssens> There you go. You are putting the whole define statement in a place guile doesn't like.
16:57:41 <gjanssens> I wonder though why you want to add this function in your custom report ? Why not use it directly from its original location in html-text.scm
16:58:19 <gjanssens> I mean, have you tried adding (gnc:html-markup-img "v-mc-d-amex_900x178.jpg") to your report code at the spot you want the image inserted ?
16:59:32 <gjanssens> You may have to wrap this in a call to (gnc:html-document-add-object! document (gnc:html-markup-img ...))
16:59:49 <gjanssens> (Just reading in the existing code. I haven't actually tried all this)
16:59:57 *** Krzysiek_K has joined #gnucash
17:03:10 <JeremyK> I put (gnc:html-markup-img "v-mc-d-amex_900x178.jpg") in and the report does not crash anymore but the image does not load. Do I have to make a call somewhere near the top to look into html-text.scm?
17:04:14 *** StuM has joined #gnucash
17:06:21 <gjanssens> That's one step further :) Just calling gnc:html-markup-img will output the img html tag to the current output.
17:06:45 <gjanssens> But that's not what you want, you want it to be added to the report html the code is gradually building
17:07:00 <gjanssens> This report html is accumulated in the "document" variable
17:07:25 <gjanssens> So you need to make sure the output of gnc:html-markup-img is added to this variable
17:08:01 <gjanssens> I think that's why you need to wrap this call in (gnc:html-document-add-object! ...)
17:08:34 <JeremyK> (gnc:html-document-add-object!
17:08:34 <JeremyK> document
17:08:34 <JeremyK> (gnc:html-markup-img "v-mc-d-amex_900x178.jpg")
17:08:34 <JeremyK> )
17:08:50 <JeremyK> but the I get #proceedure down at the bottom of reprot
17:08:54 <JeremyK> *report
17:10:10 *** fell_ has quit IRC
17:13:29 <JeremyK> Wrong number of arguments to #<procedure gnc:html-document-add-object! (doc obj)>
17:17:33 *** lmat has quit IRC
17:19:18 <gjanssens> Hmm, looking for examples of gnc:html-markup-img leads me to stylesheets/fancy-stylesheet.scm
17:19:37 <gjanssens> It seems to add even more wrappers.
17:19:40 <gjanssens> How about
17:20:42 <JeremyK> (gnc:html-document-add-object!
17:20:43 <JeremyK> document
17:20:43 <JeremyK> (gnc:make-html-text
17:20:43 <JeremyK> (gnc:html-markup-img "v-mc-d-amex_900x178.jpg"))
17:20:43 <JeremyK> )
17:20:44 <gjanssens> (gnc:html-document-add-object! document (gnc:make-html-text (gnc:html-markup-img (make-file-url "v-mc-d-amex_900x178.jpg"))))
17:21:03 <JeremyK> report works. trace comes back with missing image
17:21:33 <gjanssens> Add the make-file-url bit. That may help locating the image
17:21:46 <gjanssens> Otherwise you could try to use an absolute path instead
17:23:26 <gjanssens> I've got to go for tonight...
17:23:34 <gjanssens> I hope you get it working
17:24:12 *** Krzysiek_K has quit IRC
17:24:13 <JeremyK> Thanks so much. Good timing the last one worked
17:24:22 *** gjanssens has quit IRC
17:26:39 *** JeremyK has quit IRC
17:26:41 *** Krzysiek_K has joined #gnucash
17:28:16 *** [^DraCuLin^] has joined #gnucash
17:58:20 *** amjam has joined #gnucash
18:05:05 *** benoitg1 has joined #gnucash
18:05:05 *** benoitg has quit IRC
18:36:01 *** O01eg has quit IRC
18:45:37 *** Krzysiek_K has left #gnucash
18:48:11 *** O01eg has joined #gnucash
19:16:36 *** benoitg1 has quit IRC
19:25:37 <Ahmuck> hi. i need help with splits
20:11:10 *** kpreid has joined #gnucash
20:14:32 <Ahmuck> hi. i need help with splits
20:33:52 *** jralls has quit IRC
20:41:56 *** O01eg has quit IRC
20:57:10 *** O01eg has joined #gnucash
21:04:51 <amjam> Ahmuck: what are splits?
21:08:05 *** Sleep has quit IRC
21:10:05 <Ahmuck> splitting a transaction into different categories for tax purposes
21:10:06 *** benbergman has quit IRC
21:10:26 <Ahmuck> ie, farm expenses from the same vendor, some are tax deductable others are not on the same transaction
21:10:49 *** benbergman has joined #gnucash
21:18:54 *** Ahmuck has quit IRC
21:47:34 *** ErKa has quit IRC
22:54:34 *** benbergman has quit IRC
23:03:35 *** benbergman has joined #gnucash
23:40:32 *** O01eg has quit IRC