Re: [NTG-context] Creating business cards with CSV

2019-02-11 Thread Pablo Rodriguez
On 2/10/19 11:01 AM, Jan U. Hasecke wrote:
> Thanks Pablo,
> 
> great documentation and just the tool I was looking for.

Jan Ulrich,

Jaroslav Hajtmar has done a great job with the handlecsv module.

I have used it and I find it extremely useful. The least I could do was
to write the documentation.

Cheers,

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Creating business cards with CSV

2019-02-10 Thread Jan U. Hasecke
Thanks Pablo,

great documentation and just the tool I was looking for.

juh
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Creating business cards with CSV

2019-02-08 Thread Pablo Rodriguez
On 2/7/19 2:27 PM, Jan U. Hasecke wrote:
> Hi all,
> 
> I found some hints to CSV in the wiki, but they all refer to tables.
> 
> What are the building block to create business cards from a csv file?
Hi Jan Ulrich,

there is a module that does it (handlecsv, which comes with the ConTeXt
Suite [I wrote the documentation for it]):

I attach both the ConTeXt source and a sample CSV file. It could be a
good starting point.

Just in case it helps,

Pablo
-- 
http://www.ousia.tk
\usemodule[handlecsv]
\setheader
\opencsvfile{bscard.csv}

\starttext
\startbuffer[bscard]
\startTEXpage[offset=3em]
{\bf \Vorname\ \Name}\\
\Function

\blank

\Company\\
\Street\\
\PLZ-\City\\
\Country\\
Telefon: \TelNo\\
\eMail\\
\URLAddress
\stopTEXpage
\stopbuffer
\doloopif{\cA}{~=}{}{\getbuffer[bscard]}
\stoptext
"Vorname";"Name";"Function";"Company";"Street";"PLZ";"City";"Country";"TelNo";"eMail";"URLAddress"
"Mustermann";"Jan";"Assistant";"Boring";"25 Street";123;"Moscow";"Russian Federation";2323323;"j...@boring.com";"boring.com"
"Musterfrau";"Erika";"CEO";"Awesome";"993 Square Root";212;"Berlin";"Germany";8382939;"e...@awesome.com";"awesome.com"
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Creating business cards with CSV

2019-02-07 Thread Jan U. Hasecke
Hi all,

I found some hints to CSV in the wiki, but they all refer to tables.

What are the building block to create business cards from a csv file?


My business-card.tex looks like this:

\starttext

{\bf Vorname Name}\\
Function

\blank

Company\\
Street\\
PLZ City\\
Germany\\
Telefon: 12345678\\
n...@example.com\\
www.example.com\\

\stoptext

In pseudo code I think something like this could work:

for i in csv:
{\bf $Vorname $Name}\\
$Function

\blank

$Company\\
$Street\\
etc.
\page

The variables ($Vorname, $Name etc) could be named according to the
columns in the first row in the csv-file.

Each row starting from the second is creating a page (business card).

TIA
juh


___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___