Opened 9 years ago

Last modified 2 years ago

#6589 new enhancement

Start poorman with sharing directory argument

Reported by: streak Owned by: nobody
Priority: normal Milestone: R1
Component: Applications/PoorMan Version: R1/alpha2
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

This feature i miss in poorman: to start porman from terminal with directory shared argument like:

poorman /root/shareddirectory/

this creates a lot of possibilities to quick run a lot of different dirs, without configuring anything extra.

i need for example to share 3 different dir's in poorman depends on what im doing right now.

Change History (4)

comment:1 Changed 2 years ago by kainjow

I can work on this. However, what should the behavior be if the directory is passed through the command line when the Settings window opens? It currently causes the directory from the settings to be reloaded, wiping out the directory passed in the argv. One method is to disallow changing the directory altogether, but that's not user friendly. The other is to check if the actual directory was changed, and then use it, otherwise stick to the current directory.

comment:2 in reply to:  1 Changed 2 years ago by humdinger

Replying to kainjow:

The other is to check if the actual directory was changed, and then use it, otherwise stick to the current directory.

That's sensible. Use the passed directory, use the one from the settings if no directory was provided, pop up the "defaults" alert if there are no settings.

Question is, if you passed a directory to PoorMan, will that be set as the new standard and saved in the settings. Then PoorMan, when started without passing a directory or via double-click, will from now on use that last passed directory. I'm not sure, but I guess I'd go with keeping the folder declared in the settings untouched when you pass another directory on the commandline/script. acting as an "override".

comment:3 Changed 2 years ago by pulkomandy

I would suggest command line users to use Python's SimpleHttpServer instead of Poorman.

http://www.linuxjournal.com/content/tech-tip-really-simple-http-server-python

I'm wondering if we should continue work on Poorman or just replace it with a GUI frontend for some other HTTP server...

comment:4 Changed 2 years ago by kainjow

Well, apart from my HEAD bug I found, PoorMan seems to work. Probably worth spending time fixing other issues than refactoring this program, just figured I could implement this feature but also makes sense to not fix either as you suggest, and use a real web server for anything more advanced.

Note: See TracTickets for help on using tickets.