Re: Nginx Directory Autoindex

2018-03-02 Thread James

On 02/03/2018 14:17, Vladimir Homutov wrote:


Perhaps I should have expressed it as I'd like other people to sort by
date and that isn't going to happen unless it's easy, ie, built in.

autoindex on | off | date | text | ... ;



Well, if you want some interactive sorting, you have to do it  in
javascript; the native autoindex module is able to output json/jsonp,
so a simple js script may be used to implement any desired behaviour.


No, I want *other* people to sort their indices by date where 
appropriate.  It's more likely to happen if it's easy - no plugin, no 
scripting.


Having just done my monthly check for software updates on 421 projects I 
have a reason.  Many are in text sorted directory listings and would 
benefit from date ordering.



James.


___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


Re: Nginx Directory Autoindex

2018-03-02 Thread Vladimir Homutov
On Fri, Mar 02, 2018 at 02:03:36PM +, James wrote:
> On 02/03/2018 11:33, Luciano Mannucci wrote:
>
> >> I'd like the option of order by date, "ls -t", "ls -rt".  This helps
> >> because the text order of numbers is "10 11 8 9", see:
> >>
> >> http://nginx.org/download/
> > Well, this is way less trivial than simply add a flag to reverse sort
> > order. It belongs indeed to fancyindex, that already does that:
> ...
> > Though you need to compile your own nginx to get that working (and
> > follow the module installation instructions :-).
>
> Perhaps I should have expressed it as I'd like other people to sort by
> date and that isn't going to happen unless it's easy, ie, built in.
>
> autoindex on | off | date | text | ... ;
>
>
Well, if you want some interactive sorting, you have to do it  in
javascript; the native autoindex module is able to output json/jsonp,
so a simple js script may be used to implement any desired behaviour.


___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


Re: Nginx Directory Autoindex

2018-03-02 Thread James

On 02/03/2018 11:33, Luciano Mannucci wrote:


I'd like the option of order by date, "ls -t", "ls -rt".  This helps
because the text order of numbers is "10 11 8 9", see:

http://nginx.org/download/

Well, this is way less trivial than simply add a flag to reverse sort
order. It belongs indeed to fancyindex, that already does that:

...

Though you need to compile your own nginx to get that working (and
follow the module installation instructions :-).


Perhaps I should have expressed it as I'd like other people to sort by 
date and that isn't going to happen unless it's easy, ie, built in.


autoindex on | off | date | text | ... ;


James.
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


Re: Nginx Directory Autoindex

2018-03-02 Thread Luciano Mannucci
On Fri, 2 Mar 2018 10:33:45 +
James  wrote:

> I'd like the option of order by date, "ls -t", "ls -rt".  This helps 
> because the text order of numbers is "10 11 8 9", see:
> 
> http://nginx.org/download/
Well, this is way less trivial than simply add a flag to reverse sort
order. It belongs indeed to fancyindex, that already does that:

fancyindex_default_sort

Syntax: fancyindex_default_sort [name | size | date | name_desc |
size_desc | date_desc]

Though you need to compile your own nginx to get that working (and
follow the module installation instructions :-).

Cheers,

Luciano.
-- 
 /"\ /Via A. Salaino, 7 - 20144 Milano (Italy)
 \ /  ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250
  X   AGAINST HTML MAIL/  E-MAIL: posthams...@sublink.sublink.org
 / \  AND POSTINGS/   WWW: http://www.lesassaie.IT/
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


Re: Nginx Directory Autoindex

2018-03-02 Thread James

On 01/03/2018 11:54, Luciano Mannucci wrote:


It is probably trivial to add an option
to the configuration, something like "autoindex_reverse_sort" (set to
off by default), though I don'nt know if it would be usefull for other
nginx users...


I'd like the option of order by date, "ls -t", "ls -rt".  This helps 
because the text order of numbers is "10 11 8 9", see:


http://nginx.org/download/

The latest version is 2/3 of the way down and if I was looking for an 
update then 1.13.10 would not be next to the current 1.13.9.

___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


Re: Nginx Directory Autoindex

2018-03-01 Thread Luciano Mannucci
On Thu, 1 Mar 2018 19:45:27 +0300
Roman Arutyunyan  wrote:

> Just in case you'll get back to XML/XSLT, here's a simple configuration to
> sort the files:
Many thanks!
I'll give it a try.

Cheers,

Luciano.
-- 
 /"\ /Via A. Salaino, 7 - 20144 Milano (Italy)
 \ /  ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250
  X   AGAINST HTML MAIL/  E-MAIL: posthams...@sublink.sublink.org
 / \  AND POSTINGS/   WWW: http://www.lesassaie.IT/
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


Re: Nginx Directory Autoindex

2018-03-01 Thread Roman Arutyunyan
Hi,

On Thu, Mar 01, 2018 at 05:27:49PM +0100, Luciano Mannucci wrote:
> On Thu, 1 Mar 2018 12:16:34 +
> Miguel C  wrote:
> 
> > there's a default sorting option for name/data etc
> > https://github.com/aperezdc/ngx-fancyindex#fancyindex-default-sort
> > 
> > I do see a default_sort as a directive but not for "ascending" "descending"
> > (doesn't since supper hard to implement in the code though, but I'm not a C
> > expert
> Yes, it sould'nt be that hard... :)
> 
> > Vladimir Homutov just suggested a different approach with the autoindex
> > module and xslt that seems to serve you're need, and that way there's no
> > need to install a 3rd party moduel :)
> I'm not comfortable with XML/XSLT, so I just made a small hack to the
> original autoindex that is quite enough for me (=works and made my
> users happy :).
> 
> If there is some interest I can post my patch to the apropriate list
> (nginx devel, if I recall correctly :).

Just in case you'll get back to XML/XSLT, here's a simple configuration to
sort the files:

location / {
autoindex on;
autoindex_format xml;
xslt_stylesheet conf/sort.xslt;
root html;
}


sort.xslt:


http://www.w3.org/1999/XSL/Transform;>




















-- 
Roman Arutyunyan
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


Re: Nginx Directory Autoindex

2018-03-01 Thread Luciano Mannucci
On Thu, 1 Mar 2018 12:16:34 +
Miguel C  wrote:

> there's a default sorting option for name/data etc
> https://github.com/aperezdc/ngx-fancyindex#fancyindex-default-sort
> 
> I do see a default_sort as a directive but not for "ascending" "descending"
> (doesn't since supper hard to implement in the code though, but I'm not a C
> expert
Yes, it sould'nt be that hard... :)

> Vladimir Homutov just suggested a different approach with the autoindex
> module and xslt that seems to serve you're need, and that way there's no
> need to install a 3rd party moduel :)
I'm not comfortable with XML/XSLT, so I just made a small hack to the
original autoindex that is quite enough for me (=works and made my
users happy :).

If there is some interest I can post my patch to the apropriate list
(nginx devel, if I recall correctly :).

Cheers,

Luciano.
-- 
 /"\ /Via A. Salaino, 7 - 20144 Milano (Italy)
 \ /  ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250
  X   AGAINST HTML MAIL/  E-MAIL: posthams...@sublink.sublink.org
 / \  AND POSTINGS/   WWW: http://www.lesassaie.IT/
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


Re: Nginx Directory Autoindex

2018-03-01 Thread Miguel C
Yeah I was looking in github and there's no update for a year now... which
tbh might be about the same time I last used it :D

there's a default sorting option for name/data etc
https://github.com/aperezdc/ngx-fancyindex#fancyindex-default-sort

I do see a default_sort as a directive but not for "ascending" "descending"
(doesn't since supper hard to implement in the code though, but I'm not a C
expert

Vladimir Homutov just suggested a different approach with the autoindex
module and xslt that seems to serve you're need, and that way there's no
need to install a 3rd party moduel :)


Melhores Cumprimentos // Best Regards
---
*Miguel Clara*
*IT - Sys Admin & Developer*

On Thu, Mar 1, 2018 at 11:54 AM, Luciano Mannucci 
wrote:

> On Wed, 28 Feb 2018 23:30:35 +
> Miguel C  wrote:
>
> > I'm unsure if thats possible without 3rd party module...
> >
> > I've used fancyindex before when I wanted sorting.
> I don't find fancyindex module in 1.13.9. It seems that some of its
> features are now in autoindex. It is probably trivial to add an option
> to the configuration, something like "autoindex_reverse_sort" (set to
> off by default), though I don'nt know if it would be usefull for other
> nginx users...
>
> Thanks for your answer,
>
> Luciano.
> --
>  /"\ /Via A. Salaino, 7 - 20144 Milano (Italy)
>  \ /  ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250
>   X   AGAINST HTML MAIL/  E-MAIL: posthams...@sublink.sublink.org
>  / \  AND POSTINGS/   WWW: http://www.lesassaie.IT/
> ___
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Re: Nginx Directory Autoindex

2018-03-01 Thread Vladimir Homutov
On Wed, Feb 28, 2018 at 07:03:22PM +0100, Luciano Mannucci wrote:
>
> Hello all,
>
> I have a directory served by nginx via autoindex (That works perfectly
> as documented :). I need to show the content in reverse order (ls -r),
> is there any rather simple method?
>
> Thanks in advance,

Hello Luciano,

you can set 
http://nginx.org/en/docs/http/ngx_http_autoindex_module.html#autoindex_format
to XML and combine with http://nginx.org/en/docs/http/ngx_http_xslt_module.html
to get any listing that you desire.

>
> Luciano.
> --
>  /"\ /Via A. Salaino, 7 - 20144 Milano (Italy)
>  \ /  ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250
>   X   AGAINST HTML MAIL/  E-MAIL: posthams...@sublink.sublink.org
>  / \  AND POSTINGS/   WWW: http://www.lesassaie.IT/
> ___
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


Re: Nginx Directory Autoindex

2018-03-01 Thread Luciano Mannucci
On Wed, 28 Feb 2018 23:30:35 +
Miguel C  wrote:

> I'm unsure if thats possible without 3rd party module...
> 
> I've used fancyindex before when I wanted sorting.
I don't find fancyindex module in 1.13.9. It seems that some of its
features are now in autoindex. It is probably trivial to add an option
to the configuration, something like "autoindex_reverse_sort" (set to
off by default), though I don'nt know if it would be usefull for other
nginx users...

Thanks for your answer,

Luciano.
-- 
 /"\ /Via A. Salaino, 7 - 20144 Milano (Italy)
 \ /  ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250
  X   AGAINST HTML MAIL/  E-MAIL: posthams...@sublink.sublink.org
 / \  AND POSTINGS/   WWW: http://www.lesassaie.IT/
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


Re: Nginx Directory Autoindex

2018-02-28 Thread Miguel C
I'm unsure if thats possible without 3rd party module...

I've used fancyindex before when I wanted sorting.

On Wednesday, February 28, 2018, Luciano Mannucci 
wrote:

>
> Hello all,
>
> I have a directory served by nginx via autoindex (That works perfectly
> as documented :). I need to show the content in reverse order (ls -r),
> is there any rather simple method?
>
> Thanks in advance,
>
> Luciano.
> --
>  /"\ /Via A. Salaino, 7 - 20144 Milano (Italy)
>  \ /  ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250
>   X   AGAINST HTML MAIL/  E-MAIL: posthams...@sublink.sublink.org
>  / \  AND POSTINGS/   WWW: http://www.lesassaie.IT/
> ___
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>


-- 
Miguel Clara,
IT Consuling
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Nginx Directory Autoindex

2018-02-28 Thread Luciano Mannucci

Hello all,

I have a directory served by nginx via autoindex (That works perfectly
as documented :). I need to show the content in reverse order (ls -r),
is there any rather simple method?

Thanks in advance,

Luciano.
-- 
 /"\ /Via A. Salaino, 7 - 20144 Milano (Italy)
 \ /  ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250
  X   AGAINST HTML MAIL/  E-MAIL: posthams...@sublink.sublink.org
 / \  AND POSTINGS/   WWW: http://www.lesassaie.IT/
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx