Re: [NTG-context] Best way to create a large number of documents from database

2020-04-22 Thread Mojca Miklavec
On Fri, 17 Apr 2020 at 21:11, Hans Hagen wrote: > On 4/17/2020 4:37 PM, Mojca Miklavec wrote: > > > One of the interesting statistics. > > I used a bunch of images (the same png images in all documents; cca. > > 290k in total). > > It can actually make a difference what kind of png image you use. S

Re: [NTG-context] Best way to create a large number of documents from database

2020-04-17 Thread Hans Hagen
On 4/17/2020 4:37 PM, Mojca Miklavec wrote: One of the interesting statistics. I used a bunch of images (the same png images in all documents; cca. 290k in total). It can actually make a difference what kind of png image you use. Some png images demand a conversion (or split of map etc) to th

Re: [NTG-context] Best way to create a large number of documents from database

2020-04-17 Thread Mojca Miklavec
On Thu, 16 Apr 2020 at 16:38, Mojca Miklavec wrote: > On Thu, 16 Apr 2020 at 11:29, Taco Hoekwater wrote: > > > On 16 Apr 2020, at 11:12, Mojca Miklavec wrote: > > > > > > I have been asked to create a few thousand PDF documents from a CSV > > > "database" today > > > > In CPU cycles, the fastest w

Re: [NTG-context] Best way to create a large number of documents from database

2020-04-16 Thread Hans Hagen
On 4/16/2020 8:32 PM, Mojca Miklavec wrote: Where would be the best way to document this / under what wiki topic, as I'm sure I'll need it again and forget until then unless I write it down immediately? "Mail merge"? ;) maybe a 'workflows' entry? Hans -

Re: [NTG-context] Best way to create a large number of documents from database

2020-04-16 Thread Pablo Rodriguez
On 4/16/20 8:32 PM, Mojca Miklavec wrote: > [...] > Where would be the best way to document this / under what wiki topic, > as I'm sure I'll need it again and forget until then unless I write it > down immediately? "Mail merge"? ;) Hi Mojca, “Document merge” could be also fine. Pablo -- http://w

Re: [NTG-context] Best way to create a large number of documents from database

2020-04-16 Thread Mojca Miklavec
On Thu, 16 Apr 2020 at 16:52, Hans Hagen wrote: > On 4/16/2020 4:38 PM, Mojca Miklavec wrote: > > On Thu, 16 Apr 2020 at 11:29, Taco Hoekwater wrote: > >>> On 16 Apr 2020, at 11:12, Mojca Miklavec wrote: > >>> > >>> One option is that I quickly draft a python script that creates a few > >>> thousan

Re: [NTG-context] Best way to create a large number of documents from database

2020-04-16 Thread kaddour kardio
A relatively simple way is to use a templating system such as jinja2 and iterate over a mkiv template. Calling context with subprocess and you got the result. Le jeu. 16 avr. 2020 à 15:52, Hans Hagen a écrit : > On 4/16/2020 4:38 PM, Mojca Miklavec wrote: > > On Thu, 16 Apr 2020 at 11:29, Taco H

Re: [NTG-context] Best way to create a large number of documents from database

2020-04-16 Thread Hans Hagen
On 4/16/2020 4:38 PM, Mojca Miklavec wrote: On Thu, 16 Apr 2020 at 11:29, Taco Hoekwater wrote: On 16 Apr 2020, at 11:12, Mojca Miklavec wrote: I have been asked to create a few thousand PDF documents from a CSV "database" today In CPU cycles, the fastest way is to do a single context —once r

Re: [NTG-context] Best way to create a large number of documents from database

2020-04-16 Thread Mojca Miklavec
On Thu, 16 Apr 2020 at 11:29, Taco Hoekwater wrote: > > On 16 Apr 2020, at 11:12, Mojca Miklavec wrote: > > > > I have been asked to create a few thousand PDF documents from a CSV > > "database" today > > In CPU cycles, the fastest way is to do a single context —once > run generating all the pages

Re: [NTG-context] Best way to create a large number of documents from database

2020-04-16 Thread Taco Hoekwater
> On 16 Apr 2020, at 11:12, Mojca Miklavec > wrote: > > Hi, > > I have been asked to create a few thousand PDF documents from a CSV > "database" today (which I can easily transform into any other form, > like XML or a lua table or TeX definitions or whatever). > > Generating a few thousand p

[NTG-context] Best way to create a large number of documents from database

2020-04-16 Thread Mojca Miklavec
Hi, I have been asked to create a few thousand PDF documents from a CSV "database" today (which I can easily transform into any other form, like XML or a lua table or TeX definitions or whatever). Generating a few thousand pages would be straightforward, but I'm sure there are some clever ways to