[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microdc-devel] Control microdc through web frontend? Any ideas?
From: |
Sebastian Ewert |
Subject: |
Re: [microdc-devel] Control microdc through web frontend? Any ideas? |
Date: |
Tue, 4 Apr 2006 14:48:05 +0200 |
User-agent: |
KMail/1.9.1 |
On Tuesday 04 April 2006 13:10, Sebastian Ewert wrote:
> Have a website with the possibility to enter a search term.
> After sending the search term a script (PHP?) is called; this script shall
> call microdc and initiate the search, wait a few seconds and display the
> results. Then the user can select a hit and another script starts up
> microdc again to download the requested file. Then the file is downloaded
> into a certain directory and can be downloaded (served by an apache
> webserver).
Perhaps this would be a solution:
The script writes a config file: at the end of this file a search command and
a results command is executed and after that an exit.
Then microdc could be called like this: microdc > microdc_output.txt
Then I could parse the output file and display the results as a webpage.
The downloading script could do something similar.
Problem: It does not work this way. Consider the following part of a config
file:
...
...
connect myhub.mydomain.com
search bla
results 1
exit
Then, calling microdc, this happens:
Scanning directory /mydata
Sharing 733792256 bytes (700MiB) totally
Listening on 0.0.0.0:20000.
Connecting to hub on myhub.mydomain.com
Not connected.
1: Invalid search index.
Shutting down hub connection.
=> Conclusion: the search and results commands and even the exit command is
executed even before microdc is conneted to the hub. It would also not wait
for the search results, I think.
So a 'wait' command would be great, so that the following behaviour is
possible; consider the following config file:
...
connect myhub.mydomain.com
wait 2
search bla
wait 5
results 1
wait 1
exit
where 'wait 2' means: wait 2 seconds.
This way microdc could give some time for the commands to complete and it
would be possible to script microdc...
Thank you in advance...