Re: [NTG-context] new module installer and .tar.gz compression

2023-05-09 Thread Hans Hagen via ntg-context

On 5/9/2023 9:30 AM, Hans van der Meer via ntg-context wrote:



On 9 May 2023, at 01:19, Hans Hagen via ntg-context 
 wrote:


On 5/8/2023 8:55 PM, Henning Hraban Ramm via ntg-context wrote:

But either the module scripts should re-pack tgz archives or the 
installer must learn to handle them.

The script now

-- before installing uninstalls a previous installation
-- can uninstall an installed module
-- can list installed modules



Please don't do this! I fear it will break my habit of keeping older 
versions that worked for me. As a safeguard against things that are 
broken and will have to wait when repaired!
well, if you install a new module th eold module can interfere; nothing 
else get touched, we're talking modules that users esxplcitly install


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] new module installer and .tar.gz compression

2023-05-09 Thread Hans van der Meer via ntg-context


> On 9 May 2023, at 01:19, Hans Hagen via ntg-context  
> wrote:
> 
> On 5/8/2023 8:55 PM, Henning Hraban Ramm via ntg-context wrote:
> 
>> But either the module scripts should re-pack tgz archives or the installer 
>> must learn to handle them.
> The script now
> 
> -- before installing uninstalls a previous installation
> -- can uninstall an installed module
> -- can list installed modules
> 

Please don't do this! I fear it will break my habit of keeping older versions 
that worked for me. As a safeguard against things that are broken and will have 
to wait when repaired!

dr. Hans van der Meer


> For the moment I disable a few badly packages zips:
> 
> metaducks, sudoku, aquamints, simpleslides
> 
> as they put files in the root and their own directories and I am not adding a 
> zip-root remover and additional checkers.
> 
> No upload yet,
> 
> 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 / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] new module installer and .tar.gz compression

2023-05-09 Thread Hans Hagen via ntg-context

On 5/9/2023 7:17 AM, Henning Hraban Ramm via ntg-context wrote:

Am 09.05.23 um 01:19 schrieb Hans Hagen via ntg-context:

On 5/8/2023 8:55 PM, Henning Hraban Ramm via ntg-context wrote:

But either the module scripts should re-pack tgz archives or the 
installer must learn to handle them.



The script now

-- before installing uninstalls a previous installation
-- can uninstall an installed module
-- can list installed modules


Great!


For the moment I disable a few badly packages zips:

metaducks, sudoku, aquamints, simpleslides

as they put files in the root and their own directories and I am not 
adding a zip-root remover and additional checkers.


I regard it good practice to have README, LICENSE and VERSION files in 
the root. A public git repository without these is incomplete, and if we 
use the zip/tgz packaging of platforms like github or gitea (codeberg), 
we can’t exclude them.

The installer script could just ignore/delete them.
I currently wipe them but it's extra work and who knows what shows up in 
the future.


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] new module installer and .tar.gz compression

2023-05-08 Thread Henning Hraban Ramm via ntg-context

Am 09.05.23 um 01:19 schrieb Hans Hagen via ntg-context:

On 5/8/2023 8:55 PM, Henning Hraban Ramm via ntg-context wrote:

But either the module scripts should re-pack tgz archives or the 
installer must learn to handle them.



The script now

-- before installing uninstalls a previous installation
-- can uninstall an installed module
-- can list installed modules


Great!


For the moment I disable a few badly packages zips:

metaducks, sudoku, aquamints, simpleslides

as they put files in the root and their own directories and I am not 
adding a zip-root remover and additional checkers.


I regard it good practice to have README, LICENSE and VERSION files in 
the root. A public git repository without these is incomplete, and if we 
use the zip/tgz packaging of platforms like github or gitea (codeberg), 
we can’t exclude them.

The installer script could just ignore/delete them.

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] new module installer and .tar.gz compression

2023-05-08 Thread Hans Hagen via ntg-context

On 5/8/2023 8:55 PM, Henning Hraban Ramm via ntg-context wrote:

But either the module scripts should re-pack tgz archives or the 
installer must learn to handle them.

The script now

-- before installing uninstalls a previous installation
-- can uninstall an installed module
-- can list installed modules

For the moment I disable a few badly packages zips:

metaducks, sudoku, aquamints, simpleslides

as they put files in the root and their own directories and I am not 
adding a zip-root remover and additional checkers.


No upload yet,

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] new module installer and .tar.gz compression

2023-05-08 Thread Hans Hagen via ntg-context

On 5/8/2023 8:55 PM, Henning Hraban Ramm via ntg-context wrote:

Am 08.05.23 um 19:40 schrieb Pablo Rodriguez via ntg-context:

On 5/8/23 17:58, Bruce Horrocks via ntg-context wrote:

On 8 May 2023, at 16:20, Pablo Rodriguez wrote:
[...]
Sorry, but I don’t know how to force git urls to be added as zip
packages in https://modules.contextgarden.net.


Use 
 as the link to download as a Zip file.


I thought https://codeberg.org/fiee/context-simpleslides as git URL 
would have worked for me, but the new script actually installs the 
outdated simpleslides.zip.


So I used a link to the release ZIP for a new release:
https://codeberg.org/fiee/context-simpleslides/archive/2023-04-13.zip

But the script still only installs the old ZIP.

Actually, no, it doesn’t install anything, but doesn’t complain:

"""
~/lmtx/tex $ mtxrun --script install-modules --install t-simpleslides

mtx-install-modules | loading entries from file 
'~/lmtx/tex/texmf-context/tex/context/modules/third/mtx-install-imp-modules.lua'
mtx-install-modules | loading entries from file 
'~/lmtx/tex/texmf-context/tex/context/modules/third/mtx-install-imp-tikz.lua'

mtx-install-modules |
mtx-install-modules |
mtx-install-modules | renewing file database
mtx-install-modules |
system  | lua | compiling 
'~/lmtx/tex/texmf-cache/luametatex-cache/context/c821363a6b068765c2a3bbfe3917fcf5/trees/71c82419867f9a0df8a150196c03c86f.lua' into '~/lmtx/tex/texmf-cache/luametatex-cache/context/c821363a6b068765c2a3bbfe3917fcf5/trees/71c82419867f9a0df8a150196c03c86f.lud'

...
system  | lua | dumping 
'~/lmtx/tex/texmf-cache/luametatex-cache/context/c821363a6b068765c2a3bbfe3917fcf5/trees/dcb651482955ac31eaab7723b70e0184.lua' into '~/lmtx/tex/texmf-cache/luametatex-cache/context/c821363a6b068765c2a3bbfe3917fcf5/trees/dcb651482955ac31eaab7723b70e0184.lud' stripped

mtx-install-modules |
mtx-install-modules | installed: t-simpleslides
mtx-install-modules |
"""


"mtxrun --script install-modules --install simpleslides" (without "t-") 
works.


But either the module scripts should re-pack tgz archives or the 
installer must learn to handle them.
There is code for unpacking gzip and tar but I don't think we should 
start mixing formats and zip is kind of what we always did.


The modules are in the imp files (mentioned when loaded) but the urls 
are sort of abstract (and resolved in the installer).


I've added an option to directly pass an url but I suppose that is only 
for testing. After all, we expect some quality checks and thats what the 
garden does.


>mtxrun --script install-modules --install --module 
https://codeberg.org/fiee/context-simpleslides/archive/2023-04-13.zip

win64/bin/lib/luametatex/curl/libcurl.dll'
mtx-install-modules | from 
'https://codeberg.org/fiee/context-simpleslides/archive/2023-04-13.zip'

mtx-install-modules | into 'texmf-modules'
   8 files of   83 done,  25247 bytes, 0.003 seconds
  16 files of   83 done,3504028 bytes, 0.025 seconds
  24 files of   83 done,4655619 bytes, 0.039 seconds


but as said, it's only for testing (or for modules not yet mentioned in 
the imp file).


Keep in mind that no files are deleted. When all modules are 
consistently packages I can make a 'remove old' feature.


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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] new module installer and .tar.gz compression

2023-05-08 Thread Henning Hraban Ramm via ntg-context

Am 08.05.23 um 19:40 schrieb Pablo Rodriguez via ntg-context:

On 5/8/23 17:58, Bruce Horrocks via ntg-context wrote:

On 8 May 2023, at 16:20, Pablo Rodriguez wrote:
[...]
Sorry, but I don’t know how to force git urls to be added as zip
packages in https://modules.contextgarden.net.


Use  
as the link to download as a Zip file.


I thought https://codeberg.org/fiee/context-simpleslides as git URL 
would have worked for me, but the new script actually installs the 
outdated simpleslides.zip.


So I used a link to the release ZIP for a new release:
https://codeberg.org/fiee/context-simpleslides/archive/2023-04-13.zip

But the script still only installs the old ZIP.

Actually, no, it doesn’t install anything, but doesn’t complain:

"""
~/lmtx/tex $ mtxrun --script install-modules --install t-simpleslides

mtx-install-modules | loading entries from file 
'~/lmtx/tex/texmf-context/tex/context/modules/third/mtx-install-imp-modules.lua'
mtx-install-modules | loading entries from file 
'~/lmtx/tex/texmf-context/tex/context/modules/third/mtx-install-imp-tikz.lua'

mtx-install-modules |
mtx-install-modules |
mtx-install-modules | renewing file database
mtx-install-modules |
system  | lua | compiling 
'~/lmtx/tex/texmf-cache/luametatex-cache/context/c821363a6b068765c2a3bbfe3917fcf5/trees/71c82419867f9a0df8a150196c03c86f.lua' 
into 
'~/lmtx/tex/texmf-cache/luametatex-cache/context/c821363a6b068765c2a3bbfe3917fcf5/trees/71c82419867f9a0df8a150196c03c86f.lud'

...
system  | lua | dumping 
'~/lmtx/tex/texmf-cache/luametatex-cache/context/c821363a6b068765c2a3bbfe3917fcf5/trees/dcb651482955ac31eaab7723b70e0184.lua' 
into 
'~/lmtx/tex/texmf-cache/luametatex-cache/context/c821363a6b068765c2a3bbfe3917fcf5/trees/dcb651482955ac31eaab7723b70e0184.lud' 
stripped

mtx-install-modules |
mtx-install-modules | installed: t-simpleslides
mtx-install-modules |
"""


"mtxrun --script install-modules --install simpleslides" (without "t-") 
works.


But either the module scripts should re-pack tgz archives or the 
installer must learn to handle them.


Hraban

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] new module installer and .tar.gz compression

2023-05-08 Thread Pablo Rodriguez via ntg-context
On 5/8/23 17:58, Bruce Horrocks via ntg-context wrote:
>> On 8 May 2023, at 16:20, Pablo Rodriguez wrote:
>> [...]
>> Sorry, but I don’t know how to force git urls to be added as zip
>> packages in https://modules.contextgarden.net.
>
> Use  
> as the link to download as a Zip file.

Many thanks for your tip, Bruce.

Fixed and everything is working know.

Hans, I attach the diff for two new modules (packed as zip files).

Many thanks for your help,

Pablo
--- a/mtx-install-imp-modules.lua
+++ b/mtx-install-imp-modules.lua
@@ -35,6 +35,7 @@
 ["greek"] = { url = "modules", zips = { "t-greek.zip" } },
 ["grph-downsample"]   = { url = "modules", zips = { "grph-downsample.lua.zip" } },
 ["gs"]= { url = "modules", zips = { "t-gs.zip" } },
+["handlecsv"] = { url = "modules", zips = { "t-handlecsv.zip" } },
 ["high"]  = { url = "modules", zips = { "high.zip" } },
 ["inifile"]   = { url = "modules", zips = { "t-inifile.zip" } },
 ["karnaugh"]  = { url = "modules", zips = { "karnaugh.zip" } },
@@ -45,6 +46,7 @@
 ["lua-widow-control"] = { url = "modules", zips = { "lua-widow-control.zip" } },
 ["mathsets"]  = { url = "modules", zips = { "t-mathsets.zip" } },
 ["metaducks"] = { url = "modules", zips = { "metaducks.zip" } },
+["presvoz"]   = { url = "modules", zips = { "presvoz.zip" } },
 ["pret-c.lua"]= { url = "modules", zips = { "pret-c.lua.zip" } },
 ["rst"]   = { url = "modules", zips = { "t-rst.zip" } },
 ["rsteps"]= { url = "modules", zips = { "t-rsteps.zip" } },

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] new module installer and .tar.gz compression

2023-05-08 Thread Bruce Horrocks via ntg-context


> On 8 May 2023, at 16:20, Pablo Rodriguez via ntg-context  
> wrote:
> 
> Hans,
> 
> many thanks for the new script to install modules in LMTX.
> 
> I forced a new release of handlecsv
> (https://modules.contextgarden.net/cgi-bin/module.cgi/action=view/id=86).
> 
> I provide the contents with a git address, so I cannot choose which kind
> of compression the code will have.
> 
> Since imports from git use .tar.gz, these modules cannot be installed
> with the script (which seems to expect .zip compression exclusively).
> 
> Sorry, but I don’t know how to force git urls to be added as zip
> packages in https://modules.contextgarden.net.
> 

Use  
as the link to download as a Zip file.

—
Bruce Horrocks
Hampshire, UK

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___