HTML based file browser
HTML based file browser
I've been thinking about making a file browser and the idea of basing it on HTML hit me. What if I used the gtk-embed-mozilla widget, generated HTML based on the files in a folder, and then displayed this page. It would allow huge amounts of flexibility, frames, and scripting with javascript.
There could also be files in a folder defining how that folder is displayed, with custom HTML and javascript. You could make a media player folder for example, since music library navigation resembles file navigation this would work well. Using this method good looking multi-page control panels could also be made.
What do you guys think?
There could also be files in a folder defining how that folder is displayed, with custom HTML and javascript. You could make a media player folder for example, since music library navigation resembles file navigation this would work well. Using this method good looking multi-page control panels could also be made.
What do you guys think?
Your idea sounds like a good one to me, especially if you can make the "back" arrow work as it does in SeaMonkey. Neither Windows Explorer nor ROX return to the exact same window as before when you click their back arrows. It's very annoying to me to have to resize the window, move it to where I had it, then scroll back to where I was in the window, every time I go back a level in ROX. Windows does return to the same size and (IIRC) location, but I still have to scroll the window back to where it was.
I know nothing about it, but still it seems to me that you might be reinventing the wheel, at least to some extent. Menu -> Internet -> PuppyBrowser web browser seems to be pretty fast. Maybe you could modify or extend it to do what you want. At least, by looking into it you might learn some tricks you hadn't thought of.
I know nothing about it, but still it seems to me that you might be reinventing the wheel, at least to some extent. Menu -> Internet -> PuppyBrowser web browser seems to be pretty fast. Maybe you could modify or extend it to do what you want. At least, by looking into it you might learn some tricks you hadn't thought of.
It makes me uncomfortable mixing html/web/file system after the disaster which was the integration of internet explorer into the operating system ...as long as you don't start with active x speak I will continue to sleep soundly .
Perhaps without the paranoia, reproducing the most annoying aspect of windows XP on linux does seem a little perverse.
I shall leave your thread in peace
mike
ps I was hoping someone could enable the thumbnail feature of gtk2 file browser for firefox/mozilla but no one bit that one
Perhaps without the paranoia, reproducing the most annoying aspect of windows XP on linux does seem a little perverse.
I shall leave your thread in peace
mike
ps I was hoping someone could enable the thumbnail feature of gtk2 file browser for firefox/mozilla but no one bit that one
That's the file selector dialogue you're talking about, right mike?
There are Firefox extensions to turn it into a file browser, but last time I checked they were very slow (unlike Konqueror).
But what ITAmember's talking about involves adding html content and stuff to folders, turning them into web pages. AFAIK that hasn't been done on Linux before, although it has been a feature of Windows since at least Win98. The thing is, I've never seen anyone actually use the feature... it's rare enough to find someone even putting special things on the Windows desktop.
There are Firefox extensions to turn it into a file browser, but last time I checked they were very slow (unlike Konqueror).
But what ITAmember's talking about involves adding html content and stuff to folders, turning them into web pages. AFAIK that hasn't been done on Linux before, although it has been a feature of Windows since at least Win98. The thing is, I've never seen anyone actually use the feature... it's rare enough to find someone even putting special things on the Windows desktop.
Do you know a good gtkdialog program? Please post a link here
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
Classic Puppy quotes
ROOT FOREVER
GTK2 FOREVER
yes..more here...That's the file selector dialogue you're talking about, right mike?
http://www.murga-linux.com/puppy/viewtopic.php?t=50179
And I tried an addon too but as you say it was too slow.
when windows became a virus gateway.although it has been a feature of Windows since at least Win98
Ok first I flame the subject now I'm hyjacking the thread...off topic in the off topic area...where's my spade?
mike
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
You could write a bash wrapper for a lot of it, but then you would have to pick a wrapper extension that the browser can associate as a mimetype (.BROWSE for example) - here are some probably uninteligible streams of consciousness (probably not functional - just the idea of where to start to make it work)
associate .BROWSE with your script (lets say /usr/bin/browserbrowser)
for a directory link such as file:///usr/share/doc you would need the .BROWSER extension so it could build a new webpage when it is clicked
{to get only the directory name basename $1 .BROWSER}
ls -1 $DIRNAME > tmpfile
echo $HEADER > $DIRNAME/.$ONELINE.htm
for $ONELINE in tmpfile
if [ -d $DIRNAME/$ONELINE ]; then
echo "<a href="$DIRNAME/$ONELINE">$ONELINE</a>" >> $DIRNAME/.$ONELINE.htm
else
SUFFIX={I forget how to do this}
case $SUFFIX in ...
jpg,png,gif,...)
echo <img border="0" src="DIRNAME/$ONELINE" /></a> >> $DIRNAME/.$ONELINE.htm
mp4,avi,...)
echo "<EMBED type='application/x-mplayer2' src="$DIRNAME/$ONELINE" autostart="false" designtimesp='5311' loop="true"></EMBED>" >> $DIRNAME/.$ONELINE.htm
echo $FOOTER >> $DIRNAME/.$ONELINE.htm
#seamonkey -remote "OPENFILE($DIRNAME)"
#note that you may need to do it different for different browsers... you can use "`which firefox`" opera, dillo etc
EDIT Nevermind, Can't do it in the same window this way... unless you can refresh by sending CTRL+R to the open browser using the pidof the browser and a program that I can never remember the name of
Either way that would mean your script is actually browsing and keeping track of the the location and the webpage would be dynamically updated (not moving around in directories)
associate .BROWSE with your script (lets say /usr/bin/browserbrowser)
for a directory link such as file:///usr/share/doc you would need the .BROWSER extension so it could build a new webpage when it is clicked
{to get only the directory name basename $1 .BROWSER}
ls -1 $DIRNAME > tmpfile
echo $HEADER > $DIRNAME/.$ONELINE.htm
for $ONELINE in tmpfile
if [ -d $DIRNAME/$ONELINE ]; then
echo "<a href="$DIRNAME/$ONELINE">$ONELINE</a>" >> $DIRNAME/.$ONELINE.htm
else
SUFFIX={I forget how to do this}
case $SUFFIX in ...
jpg,png,gif,...)
echo <img border="0" src="DIRNAME/$ONELINE" /></a> >> $DIRNAME/.$ONELINE.htm
mp4,avi,...)
echo "<EMBED type='application/x-mplayer2' src="$DIRNAME/$ONELINE" autostart="false" designtimesp='5311' loop="true"></EMBED>" >> $DIRNAME/.$ONELINE.htm
echo $FOOTER >> $DIRNAME/.$ONELINE.htm
#seamonkey -remote "OPENFILE($DIRNAME)"
#note that you may need to do it different for different browsers... you can use "`which firefox`" opera, dillo etc
EDIT Nevermind, Can't do it in the same window this way... unless you can refresh by sending CTRL+R to the open browser using the pidof the browser and a program that I can never remember the name of
Either way that would mean your script is actually browsing and keeping track of the the location and the webpage would be dynamically updated (not moving around in directories)
Last edited by technosaurus on Fri 08 Jan 2010, 01:57, edited 2 times in total.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
If you wanted to get really quirky you could use a modified puppy web desktop as the header and even parse the /usr/share/applications/*.desktop to make a local browser menu
<a href="abiword.EXEC">abiword</a> where abiword.EXEC etc... is just a dummy file
STARTCOMMAND="`basename $1 .EXEC`"
$STARTCOMMAND
<a href="abiword.EXEC">abiword</a> where abiword.EXEC etc... is just a dummy file
STARTCOMMAND="`basename $1 .EXEC`"
$STARTCOMMAND
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
I attached my progress thus far, but be warned it's just a patchwork of scripts I found.
Unzip + open "test.html"
Unzip + open "test.html"
- Attachments
-
- file-browser.zip
- (50.65 KiB) Downloaded 590 times
Hey, I note that in "test.html" the top-level directories are all open so they show their subdirectories.
I assume you opened each directory individually, one at a time. I've been wanting a way to toggle open all the directories at once, so they show their subdirectories but not the files those subdirectories contain. There is an application called "tree" which can do this. It's available for both Linux and Windows, in fact I think there's a .pet of it, but it's hard to use and the results don't look good without doing more work on them in a word processor. It would be great to have some aspects of tree incorporated into your file browser.
I assume you opened each directory individually, one at a time. I've been wanting a way to toggle open all the directories at once, so they show their subdirectories but not the files those subdirectories contain. There is an application called "tree" which can do this. It's available for both Linux and Windows, in fact I think there's a .pet of it, but it's hard to use and the results don't look good without doing more work on them in a word processor. It would be great to have some aspects of tree incorporated into your file browser.
Due to the general name of it my searches don't seem to turn up "tree". I'll keep looking but if you could find it that would help me out quite a bit.
If you open "drag-drop-folder-tree.html" and scroll to the bottom you will find a line that says
You can comment that out with the // comment and the tree will start collapsed. I'll eventually find a nice place to put a button/link that will toggle the expand/collapse state. I also don't plan on showing files in the treeview, that would make it rather crowded. Instead the user will click on the folder and view the contents in the main window. (which needs a lot of work )
If you open "drag-drop-folder-tree.html" and scroll to the bottom you will find a line that says
Code: Select all
treeObj.expandAll();
I don't remember who made these. I'm sure I got them from the Additional Software section of the forum.
- Attachments
-
- tree_DOC-1.5.2.2.pet
- (3.55 KiB) Downloaded 438 times
-
- tree-1.5.2.2.pet
- (16.28 KiB) Downloaded 473 times
- Pizzasgood
- Posts: 6183
- Joined: Wed 04 May 2005, 20:28
- Location: Knoxville, TN, USA
http://www.murga-linux.com/puppy/viewtopic.php?t=47657ITAmember wrote:Due to the general name of it my searches don't seem to turn up "tree". I'll keep looking but if you could find it that would help me out quite a bit.
EDIT: Oh, I didn't realize there was a second page to this thread, so I didn't realize Flash already posted it.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
[img]http://www.browserloadofcoolness.com/sig.png[/img]