ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] install-modules script and git URLs
@ 2023-12-19 17:29 Pablo Rodriguez via ntg-context
  2023-12-19 17:48 ` [NTG-context] " Henning Hraban Ramm
  0 siblings, 1 reply; 5+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2023-12-19 17:29 UTC (permalink / raw)
  To: ConTeXt users; +Cc: Pablo Rodriguez

Hi Hraban and Taco,

the install-modules script doesn’t allow .tar.gz as compression format
to install modules.

.tar.gz seems to be the compression format offered for modules that are
uploaded using a git URL.

Hraban explained in August that thee server could be configured to get
.zip compression for modules in git checkout.

Sorry, I know that you are both very busy, but could it be this issue fixed?

Using git to upload module versions is way more easy than uploading .zip
files.

Many thanks for your help to both,

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [NTG-context] Re: install-modules script and git URLs
  2023-12-19 17:29 [NTG-context] install-modules script and git URLs Pablo Rodriguez via ntg-context
@ 2023-12-19 17:48 ` Henning Hraban Ramm
  2023-12-19 21:47   ` Bruce Horrocks
  0 siblings, 1 reply; 5+ messages in thread
From: Henning Hraban Ramm @ 2023-12-19 17:48 UTC (permalink / raw)
  To: ntg-context

Am 19.12.23 um 18:29 schrieb Pablo Rodriguez via ntg-context:
> Hi Hraban and Taco,
> 
> the install-modules script doesn’t allow .tar.gz as compression format
> to install modules.
> 
> .tar.gz seems to be the compression format offered for modules that are
> uploaded using a git URL.
> 
> Hraban explained in August that the server could be configured to get
> .zip compression for modules in git checkout.
> 
> Sorry, I know that you are both very busy, but could it be this issue fixed?

I looked at the code and don’t understand enough of it… (it’s old Perl 
CGI code).
There are more changes that I’d like to do (e.g. add more licenses – 
needs db access).

> Using git to upload module versions is way more easy than uploading .zip
> files.

I agree.

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [NTG-context] Re: install-modules script and git URLs
  2023-12-19 17:48 ` [NTG-context] " Henning Hraban Ramm
@ 2023-12-19 21:47   ` Bruce Horrocks
  2023-12-19 21:59     ` Bruce Horrocks
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce Horrocks @ 2023-12-19 21:47 UTC (permalink / raw)
  To: ntg-context mailing list


> On 19 Dec 2023, at 17:48, Henning Hraban Ramm <texml@fiee.net> wrote:
> 
> Am 19.12.23 um 18:29 schrieb Pablo Rodriguez via ntg-context:
>> Hi Hraban and Taco,
>> the install-modules script doesn’t allow .tar.gz as compression format
>> to install modules.
>> .tar.gz seems to be the compression format offered for modules that are
>> uploaded using a git URL.
>> Hraban explained in August that the server could be configured to get
>> .zip compression for modules in git checkout.
>> Sorry, I know that you are both very busy, but could it be this issue fixed?
> 
> I looked at the code and don’t understand enough of it… (it’s old Perl CGI code).
> There are more changes that I’d like to do (e.g. add more licenses – needs db access).
> 
>> Using git to upload module versions is way more easy than uploading .zip
>> files.
> 
> I agree.

The Github API for retrieving a 'zipball' is documented here
<https://docs.github.com/en/rest/repos/contents?apiVersion=2022-11-28#download-a-repository-archive-zip>

The explanation of the allowed options is a little terse but, basically, a URL of the form

  https://api.github.com/repos/{OWNER}/{REPO}/zipball <https://api.github.com/repos/%7BOWNER%7D/%7BREPO%7D/zipball>

should be sufficient to result in a zipped download of the repository named {REPO} owned by {OWNER}.

You can test manually from a Unix/Linux command line using the command:

  $ curl -L https://api.github.com/repos/{OWNER}/{REPO}/zipball <https://api.github.com/repos/%7BOWNER%7D/%7BREPO%7D/zipball> > results.zip

If the existing Perl CGI uses a curl command like this then it may simply be enough for Pablo to specify a suitably formatted Github URL.

Note that the -L is necessary because the Github API generates a temporary, time-limited URL and redirects to it by returning a 302 response code.

Regards,
—
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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [NTG-context] Re: install-modules script and git URLs
  2023-12-19 21:47   ` Bruce Horrocks
@ 2023-12-19 21:59     ` Bruce Horrocks
  2023-12-20 11:59       ` Henning Hraban Ramm
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce Horrocks @ 2023-12-19 21:59 UTC (permalink / raw)
  To: ntg-context mailing list

Firstly, apologies for any confusion: Apple Mail has decided it knows best and has doubled-up the URLs containing { placeholders }. Since the URLs contain placeholders then they can't be used directly anyway but you knew that. :-)

Secondly, on re-reading, it comes over as instructions for Hraban when it was meant to be a suggestion to Pablo to try the alternate form of the Github repository URL first.


> On 19 Dec 2023, at 21:47, Bruce Horrocks <ntg@scorecrow.com> wrote:
> 
>> 
>> On 19 Dec 2023, at 17:48, Henning Hraban Ramm <texml@fiee.net> wrote:
>> 
>> Am 19.12.23 um 18:29 schrieb Pablo Rodriguez via ntg-context:
>>> Hi Hraban and Taco,
>>> the install-modules script doesn’t allow .tar.gz as compression format
>>> to install modules.
>>> .tar.gz seems to be the compression format offered for modules that are
>>> uploaded using a git URL.
>>> Hraban explained in August that the server could be configured to get
>>> .zip compression for modules in git checkout.
>>> Sorry, I know that you are both very busy, but could it be this issue fixed?
>> 
>> I looked at the code and don’t understand enough of it… (it’s old Perl CGI code).
>> There are more changes that I’d like to do (e.g. add more licenses – needs db access).
>> 
>>> Using git to upload module versions is way more easy than uploading .zip
>>> files.
>> 
>> I agree.
> 
> The Github API for retrieving a 'zipball' is documented here
> <https://docs.github.com/en/rest/repos/contents?apiVersion=2022-11-28#download-a-repository-archive-zip>
> 
> The explanation of the allowed options is a little terse but, basically, a URL of the form
> 
>  https://api.github.com/repos/{OWNER}/{REPO}/zipball<https://api.github.com/repos/%7BOWNER%7D/%7BREPO%7D/zipball>
> 
> should be sufficient to result in a zipped download of the repository named {REPO} owned by {OWNER}.
> 
> You can test manually from a Unix/Linux command line using the command:
> 
>  $ curl -L https://api.github.com/repos/{OWNER}/{REPO}/zipball<https://api.github.com/repos/%7BOWNER%7D/%7BREPO%7D/zipball> > results.zip
> 
> If the existing Perl CGI uses a curl command like this then it may simply be enough for Pablo to specify a suitably formatted Github URL.
> 
> Note that the -L is necessary because the Github API generates a temporary, time-limited URL and redirects to it by returning a 302 response code.
> 
> Regards,
> —
> 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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
> ___________________________________________________________________________________


—
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://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [NTG-context] Re: install-modules script and git URLs
  2023-12-19 21:59     ` Bruce Horrocks
@ 2023-12-20 11:59       ` Henning Hraban Ramm
  0 siblings, 0 replies; 5+ messages in thread
From: Henning Hraban Ramm @ 2023-12-20 11:59 UTC (permalink / raw)
  To: ntg-context

Just so that everyone knows:
Taco has fixed the modules management scripts, so that git checkouts and 
zip uploads work now.

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-12-20 12:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-19 17:29 [NTG-context] install-modules script and git URLs Pablo Rodriguez via ntg-context
2023-12-19 17:48 ` [NTG-context] " Henning Hraban Ramm
2023-12-19 21:47   ` Bruce Horrocks
2023-12-19 21:59     ` Bruce Horrocks
2023-12-20 11:59       ` Henning Hraban Ramm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).