Re: [NTG-context] mail merge in mkiv?

2014-11-10 Thread Pablo Rodriguez
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
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] mail merge in mkiv?

2014-11-09 Thread 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=JRsVFQdsJhwoWyAdFwQROwZWBFkwERgeFzAEJjMbLSYcKAAcHxYUAS8XVkIkIhAVHyYsFgsZEzYXAw
  
Examples of more complex and comprehensive application of my

t-scancsv.lua mudule are available at:
http://public.hajtmar.com/?cesta=JRsVFQdsJhwoWyAdFwQROwZWBFkwERgeFzAEJjMbLSYcKAAcHxYUAS8X
  
I zip the entire folder and you can download it at:

http://public.hajtmar.com/files/TeX/context/t-scancsv_ConTeXt_module/t-scancsv_ConTeXt_module.zip

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


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] mail merge in mkiv?

2014-11-09 Thread Pablo Rodriguez
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
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] mail merge in mkiv?

2014-11-09 Thread Jaroslav Hajtmar

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


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] mail merge in mkiv?

2014-11-09 Thread Keith Schultz
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 hajt...@gyza.cz:
 
 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=JRsVFQdsJhwoWyAdFwQROwZWBFkwERgeFzAEJjMbLSYcKAAcHxYUAS8XVkIkIhAVHyYsFgsZEzYXAw
  Examples of more complex and comprehensive application of my
 t-scancsv.lua mudule are available at:
 http://public.hajtmar.com/?cesta=JRsVFQdsJhwoWyAdFwQROwZWBFkwERgeFzAEJjMbLSYcKAAcHxYUAS8X
  I zip the entire folder and you can download it at:
 http://public.hajtmar.com/files/TeX/context/t-scancsv_ConTeXt_module/t-scancsv_ConTeXt_module.zip
 
 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,
 
 

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] mail merge in mkiv?

2014-11-08 Thread Pablo Rodriguez
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=JRsVFQdsJhwoWyAdFwQROwZWBFkwERgeFzAEJjMbLSYcKAAcHxYUAS8XVkIkIhAVHyYsFgsZEzYXAw
  
 Examples of more complex and comprehensive application of my 
 t-scancsv.lua mudule are available at:
 http://public.hajtmar.com/?cesta=JRsVFQdsJhwoWyAdFwQROwZWBFkwERgeFzAEJjMbLSYcKAAcHxYUAS8X
  
 I zip the entire folder and you can download it at:
 http://public.hajtmar.com/files/TeX/context/t-scancsv_ConTeXt_module/t-scancsv_ConTeXt_module.zip
 
 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
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] mail merge in mkiv?

2014-11-07 Thread Jaroslav Hajtmar

Hello Pablo.

Here is the solution of your minimal example:
http://public.hajtmar.com/?cesta=JRsVFQdsJhwoWyAdFwQROwZWBFkwERgeFzAEJjMbLSYcKAAcHxYUAS8XVkIkIhAVHyYsFgsZEzYXAw


Examples of more complex and comprehensive application of my 
t-scancsv.lua mudule are available at:

http://public.hajtmar.com/?cesta=JRsVFQdsJhwoWyAdFwQROwZWBFkwERgeFzAEJjMbLSYcKAAcHxYUAS8X


I zip the entire folder and you can download it at:
http://public.hajtmar.com/files/TeX/context/t-scancsv_ConTeXt_module/t-scancsv_ConTeXt_module.zip

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;;Here;
You;Square;;There;

Many thanks for your help,


Pablo


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] mail merge in mkiv?

2014-11-06 Thread Pablo Rodriguez
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;;Here;
You;Square;;There;

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] mail merge in mkiv?

2014-11-05 Thread Jaroslav Hajtmar

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_merge_google_plus_and_facebook,
which seems spam to me.

Is there any way to do mail merge with mkiv?

Many thanks for your help,


Pablo


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] mail merge in mkiv?

2014-11-03 Thread Aditya Mahajan

BTW, searching for merge at the wiki, I found
http://wiki.contextgarden.net/An_Update_On_Essential_Elements_In_how_can_i_merge_google_plus_and_facebook,
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
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___