Hal script to index removable storage medium ?
- From: "D Bera" <dbera web gmail com>
- To: dashboard-hackers gnome org
- Subject: Hal script to index removable storage medium ?
- Date: Thu, 10 Jul 2008 09:03:05 -0400
Hi,
Now that we have the feature to index USB drives, data CDs and
other kind of removable media, I was thinking if it is possible to
walk the last mile and provide HAL scripts to integrate the feature to
today's desktops.
I am not much familiar with HAL scripts and how the nice popups
"Open the Audio CD in Amarok" shows up when I insert an audio cd. I am
thinking something along the same lines:
(1) When the medium is inserted, if it of the "right kind", then show
the option "Index and search this medium".
(2) If the option is selected, probably a bash/python script is run
which does steps (3) to (6)
(3) If the medium is writable then create a .beagleindex directory in
the medium's root directory; if the directory already exists then skip
this step
(4) If the medium is not writable, inform the user and ask for a
separate location to store the index
(5) If the indexdirectory already contains RemovableIndex.xml (which
is a sign that a previous index already exists), then call
"beagle-removable-index --mount..." followed by
"beagle-removable-index --removable..."; otherwise call
"beagle-build-index --removable.." and then run
"beagle-removable-index --mount..."
(6) Running beagled will automatically add this index to its search
list and pick up changes as beagle-build-index finds new files
(7) (is this doable with HAL ?) When unmounting,
"beagle-removable-index --unmount..." needs to be called - the index
will be dropped from beagled's list and all open files in the
removable medium will be closed
Does anyone have experience with HAL scripts and such notifications ?
Ideally I would want to have something that works for both KDE and
Gnome - I guess the popup dialog's are DE dependent.
And input is highly appreciated.
Thanks,
- dBera
--
-----------------------------------------------------
Debajyoti Bera @ http://dtecht.blogspot.com
beagle / KDE fan
Mandriva / Inspiron-1100 user
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]