pip2pi icon indicating copy to clipboard operation
pip2pi copied to clipboard

Create index.html files instead of autoindexing?

Open stefanoborini opened this issue 5 years ago • 4 comments

It is my understanding that dir2pi just deploys packages in a simple pypi structure, but relies on autoindex to provide the html file that pip uses. Is there an option to generate (and keep up to date, if new packages are added) the index file? my current server creates a fancy javascript interface to represent directory content, but will show an index.html if present.

stefanoborini avatar Mar 23 '20 15:03 stefanoborini

dir2pi will create an index.html in each directory by default refer to https://github.com/wolever/pip2pi/blob/master/libpip2pi/commands.py#L220-L226

But I think https://github.com/wolever/pip2pi/blob/master/libpip2pi/commands.py#L376 this line should be changed to pkg_index += "<a href='%s/index.html'>%s</a><br />\n" %(

tom-shan avatar Apr 03 '20 10:04 tom-shan

@tom-shan yes, the problem is that it doesn't only do that. I would need a functionality just to create the index file from the currently deployed packages, but I could not find anything that does so.

stefanoborini avatar Apr 03 '20 14:04 stefanoborini

IIUC, if you really only want those index.htmls, how about deleting all the useless packages after the generation?

tom-shan avatar Apr 03 '20 14:04 tom-shan

@tom-shan that's not what I want. I have a pypi content with all the packages there and they have to stay there, but I don't have autoindex in the web server to generate the A HREF page. I need something to generate this page, and I need to get this done fast.

stefanoborini avatar Apr 03 '20 21:04 stefanoborini