Dear list, I would like to be able to use ConTeXt at work for mail merging. The issue here is that I don’t have any clue on how to do it with MKIV. I don’t even know whehter this is possible at all. BTW, searching for "merge" at the wiki, I found http://wiki.contextgarden.net/An_Update_On_Essential_Elements_In_how_can_i_m..., which seems spam to me. Is there any way to do mail merge with mkiv? Many thanks for your help, Pablo -- http://www.ousia.tk
BTW, searching for "merge" at the wiki, I found http://wiki.contextgarden.net/An_Update_On_Essential_Elements_In_how_can_i_m..., which seems spam to me.
Thanks. Deleted. There have been quite a few such pages created recently. Perhaps, our spam detection algorithm when registering for a new account needs an update. Aditya
Hello Pablo. I do very often mailmerge using ConTeXt. I do it with my lua library and data in my external CSV file. Unfortunately I do not have a manual to the my lua library. If you send me a minimal example of how you imagine it, I'll send you back solving and my lualibrary too... Jaroslav Hajtmar Dne 3.11.2014 20:41, Pablo Rodriguez napsal(a):
Dear list,
I would like to be able to use ConTeXt at work for mail merging. The issue here is that I don’t have any clue on how to do it with MKIV. I don’t even know whehter this is possible at all.
BTW, searching for "merge" at the wiki, I found http://wiki.contextgarden.net/An_Update_On_Essential_Elements_In_how_can_i_m..., which seems spam to me.
Is there any way to do mail merge with mkiv?
Many thanks for your help,
Pablo
On 11/05/2014 04:42 PM, Jaroslav Hajtmar wrote:
Hello Pablo. I do very often mailmerge using ConTeXt. I do it with my lua library and data in my external CSV file. Unfortunately I do not have a manual to the my lua library. If you send me a minimal example of how you imagine it, I'll send you back solving and my lualibrary too...
Hi Jaroslav, many thanks for your reply. Is your library scancsv.lua and is it described at http://public.hajtmar.com/files/TeX/TeXperience2011/knihovna_ScanCSVlua.pdf? (I read a previous English version ;-)). Do you have any plans to release it as a module? Or to publish it at GitHub? The minimal sample would be envelopes such as: \setuppapersize[C6, landscape] \setuppagenumbering[location=] \starttext Name\\ Address\\ Postcode--City\\ \stoptext csv file would be: Name;Address;Postcode;City; Me;Street;0000;Here; You;Square;9999;There; Many thanks for your help, Pablo -- http://www.ousia.tk
Hello Pablo. Here is the solution of your minimal example: http://public.hajtmar.com/?cesta=JRsVFQdsJhwoWyAdFwQROwZWBFkwERgeFzAEJjMbLSY... Examples of more complex and comprehensive application of my t-scancsv.lua mudule are available at: http://public.hajtmar.com/?cesta=JRsVFQdsJhwoWyAdFwQROwZWBFkwERgeFzAEJjMbLSY... I zip the entire folder and you can download it at: http://public.hajtmar.com/files/TeX/context/t-scancsv_ConTeXt_module/t-scanc... Perhaps those that serve well. Jaroslav Hajtmar Dne 6.11.2014 18:57, Pablo Rodriguez napsal(a):
On 11/05/2014 04:42 PM, Jaroslav Hajtmar wrote:
Hello Pablo. I do very often mailmerge using ConTeXt. I do it with my lua library and data in my external CSV file. Unfortunately I do not have a manual to the my lua library. If you send me a minimal example of how you imagine it, I'll send you back solving and my lualibrary too... Hi Jaroslav,
many thanks for your reply.
Is your library scancsv.lua and is it described at http://public.hajtmar.com/files/TeX/TeXperience2011/knihovna_ScanCSVlua.pdf? (I read a previous English version ;-)).
Do you have any plans to release it as a module? Or to publish it at GitHub?
The minimal sample would be envelopes such as: \setuppapersize[C6, landscape] \setuppagenumbering[location=] \starttext Name\\ Address\\ Postcode--City\\ \stoptext
csv file would be:
Name;Address;Postcode;City; Me;Street;0000;Here; You;Square;9999;There;
Many thanks for your help,
Pablo
On 11/07/2014 12:44 PM, Jaroslav Hajtmar wrote:
Hello Pablo.
Here is the solution of your minimal example: http://public.hajtmar.com/?cesta=JRsVFQdsJhwoWyAdFwQROwZWBFkwERgeFzAEJjMbLSY...
Examples of more complex and comprehensive application of my t-scancsv.lua mudule are available at: http://public.hajtmar.com/?cesta=JRsVFQdsJhwoWyAdFwQROwZWBFkwERgeFzAEJjMbLSY...
I zip the entire folder and you can download it at: http://public.hajtmar.com/files/TeX/context/t-scancsv_ConTeXt_module/t-scanc...
Perhaps those that serve well.
Many thanks for your reply, Jaroslav. Since this feature may be useful to other users, how about including it as a third-party module in the ConTeXt Suite? Many thanks for your help again, Pablo -- http://www.ousia.tk
Hello Pablo. The module I created about before 4 years ago, when I wanted to learn to program in Lua. Therefore, I think that my module is too rudimentary and not quite optimized. Unfortunately, since I do not now use much Lua, so I dare not reasonably somehow finish. Before inclusion in third party modules that would probably have to take some experienced Lua expert and redo the whole module. For my needs it is enough. I use this module very often for my practise (I am teacher). Perhaps it helped a little. Greetings Jaroslav Hajtmar Dne 8.11.2014 11:09, Pablo Rodriguez napsal(a):
On 11/07/2014 12:44 PM, Jaroslav Hajtmar wrote:
Hello Pablo.
Here is the solution of your minimal example: http://public.hajtmar.com/?cesta=JRsVFQdsJhwoWyAdFwQROwZWBFkwERgeFzAEJjMbLSY...
Examples of more complex and comprehensive application of my t-scancsv.lua mudule are available at: http://public.hajtmar.com/?cesta=JRsVFQdsJhwoWyAdFwQROwZWBFkwERgeFzAEJjMbLSY...
I zip the entire folder and you can download it at: http://public.hajtmar.com/files/TeX/context/t-scancsv_ConTeXt_module/t-scanc...
Perhaps those that serve well. Many thanks for your reply, Jaroslav.
Since this feature may be useful to other users, how about including it as a third-party module in the ConTeXt Suite?
Many thanks for your help again,
Pablo
On 11/09/2014 03:59 PM, Jaroslav Hajtmar wrote:
Hello Pablo. The module I created about before 4 years ago, when I wanted to learn to program in Lua. Therefore, I think that my module is too rudimentary and not quite optimized. Unfortunately, since I do not now use much Lua, so I dare not reasonably somehow finish. Before inclusion in third party modules that would probably have to take some experienced Lua expert and redo the whole module. For my needs it is enough. I use this module very often for my practise (I am teacher). Perhaps it helped a little. Greetings Jaroslav Hajtmar
Many thanks for the module, Jaroslav. BTW, wouldn’t you know how can I set a \date using Lua that adds x working days to the current date? Many thanks for your help, Pablo -- http://www.ousia.tk
Hello Pablo. Here is example of add days in Lua: \startluacode x=5 -- add five days tex.print ('Actual date is :'..os.date('%d.%m.%Y')..'\\crlf') tex.print ( 'And x days added date is :'.. os.date('%d.%m.%Y',os.time()+ x * 24 * 3600)) \stopluacode Jaroslav Hajtmar Dne 9.11.2014 22:49, Pablo Rodriguez napsal(a):
On 11/09/2014 03:59 PM, Jaroslav Hajtmar wrote:
Hello Pablo. The module I created about before 4 years ago, when I wanted to learn to program in Lua. Therefore, I think that my module is too rudimentary and not quite optimized. Unfortunately, since I do not now use much Lua, so I dare not reasonably somehow finish. Before inclusion in third party modules that would probably have to take some experienced Lua expert and redo the whole module. For my needs it is enough. I use this module very often for my practise (I am teacher). Perhaps it helped a little. Greetings Jaroslav Hajtmar Many thanks for the module, Jaroslav.
BTW, wouldn’t you know how can I set a \date using Lua that adds x working days to the current date?
Many thanks for your help,
Pablo
On 11/10/2014 12:17 AM, Jaroslav Hajtmar wrote:
Hello Pablo. Here is example of add days in Lua:
\startluacode x=5 -- add five days tex.print ('Actual date is :'..os.date('%d.%m.%Y')..'\\crlf') tex.print ( 'And x days added date is :'.. os.date('%d.%m.%Y',os.time()+ x * 24 * 3600)) \stopluacode
Many thanks for the reply, Jaroslav. I wanted to avoid Saturdays and Sundays, so I wrote: \startluacode x = 1 final_date = os.date('%a',os.time()+ x * 24 * 3600) if final_date == "Sat" then x = x + 2 elseif final_date == "Sun" then x = x + 1 end tex.print ( os.date('%d/%m/%Y',os.time()+ x * 24 * 3600)) \stopluacode This is all Greek to me, but it seems to work. Many thanks for your help again, Pablo -- http://www.ousia.tk
Hello Jaraslav, You might be willing to wikify it. I would be helpful for others. regards Keith
Am 09.11.2014 um 15:59 schrieb Jaroslav Hajtmar
: Hello Pablo. The module I created about before 4 years ago, when I wanted to learn to program in Lua. Therefore, I think that my module is too rudimentary and not quite optimized. Unfortunately, since I do not now use much Lua, so I dare not reasonably somehow finish. Before inclusion in third party modules that would probably have to take some experienced Lua expert and redo the whole module. For my needs it is enough. I use this module very often for my practise (I am teacher). Perhaps it helped a little. Greetings Jaroslav Hajtmar
Dne 8.11.2014 11:09, Pablo Rodriguez napsal(a):
On 11/07/2014 12:44 PM, Jaroslav Hajtmar wrote:
Hello Pablo.
Here is the solution of your minimal example: http://public.hajtmar.com/?cesta=JRsVFQdsJhwoWyAdFwQROwZWBFkwERgeFzAEJjMbLSY... Examples of more complex and comprehensive application of my t-scancsv.lua mudule are available at: http://public.hajtmar.com/?cesta=JRsVFQdsJhwoWyAdFwQROwZWBFkwERgeFzAEJjMbLSY... I zip the entire folder and you can download it at: http://public.hajtmar.com/files/TeX/context/t-scancsv_ConTeXt_module/t-scanc...
Perhaps those that serve well. Many thanks for your reply, Jaroslav.
Since this feature may be useful to other users, how about including it as a third-party module in the ConTeXt Suite?
Many thanks for your help again,
participants (4)
-
Aditya Mahajan
-
Jaroslav Hajtmar
-
Keith Schultz
-
Pablo Rodriguez