Re: [NTG-context] ConTeXt as a service

2019-11-21 Thread Jan U. Hasecke
Am 20.11.19 um 18:10 schrieb Henning Hraban Ramm:
> Hi!
> 
> I’m running ConTeXt on my web server e.g. to generate shipping forms for a 
> customer.
> 
> As Hans said, it makes sense to use an asynchronous setup; in my case it’s 
> celery/RabbitMQ behind Django.
> 
> You probably need to set a few environment variables: I find HOME, PATH, 
> TEXROOT and TEXMFOS in my setup. I don’t know if you really need all of them, 
> it’s already running for several years…
> Also your web server process might only run binaries that belong to some 
> user/group like wwwrun.
> 
> It won’t work in shared hosting, because you can’t install your own programs.

Generally this is correct. But there are providers such as the
Hostsharing cooperative where it is possible to install programs in a
shared hosting environment. We do it for years. ;-)

> Otherwise: What kind of documentation do you need? Installing ConTeXt on a 
> (web) server is not different from any other Linux system. Calling ConTeXt 
> from a web application is not different from calling any other external 
> program. The rest depends on your setup and web frameworks.

I am very interested in running ConTeXt as a service, too. I am still
nurturing the idea of a publishing cooperative for self publishers with
a Markdown --> Pandoc --> ConTeXt workflow with a nice web frontend. I
hope to make it to the next ConTeXt meeting to discuss it.

Many greetings
juh

-- 
Hostsharing eG – die Hosting-Genossenschaft
Souveränität – Nachhaltigkeit – Exzellenz
https://www.hostsharing.net
___
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] ConTeXt as a service

2019-11-21 Thread Brian Ballsun-Stanton
In reply to: https://mailman.ntg.nl/pipermail/ntg-context/2019/096313.html

I personally run ConTeXt as a service (as a sort of do-it-yourself
Overleaf).

I use floobits (https://floobits.com/Denubis) as an intermediary code
server, and their floomatic sevice(https://floobits.com/help/floomatic)
running  on a server I have. That then calls a shell script that invokes
ConTeXt, which writes logs and pdfs to an nginx monitored folder. It's been
running for about 4 years now and has been solid enough for me to use
without thinking too much about.

Happy to share code and details. My deployment is super-hacky, but it works?

-Brian
___
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] LuaTeX incompatible with Lua

2019-11-21 Thread Hans Hagen

On 11/21/2019 8:17 AM, Henri Menke wrote:

Dear list,

The following Lua script behaves differently when executed in Lua vs.
LuaTeX.

     print(os.execute("date"))

It seems that the definition of os_execute in loslibext.c was copied
over from Lua 5.1 and not adapted to newer versions.

     $ lua5.1 test.lua
     0
     $ lua5.2 test.lua
     true    exit    0
     $ lua5.3 test.lua
     true    exit    0
     $ texlua test.lua
     0
     $ luajit test.lua
     0
     $ texluajit test.lua
     0

As you can see from the example, this comes with the additional
complication that LuaJIT has Lua 5.1 behaviour and should also retain
that.
Indeed, the old interface was kept (also for compatibility reasons as 
lua is used for scripts in texlive etc).


If one used lua as well as luatex as lua engine for the same script one 
can write a wrapper if needed (I have been thinking of that on context 
but again it would also mean adapting older scripts laying around.)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___