From: Bit Twister on
On Mon, 15 Mar 2010 21:32:44 -0500, Ohmster wrote:
>> Frap, I just noticed, you need to change the " to \" in the colors
>> section of the header. :(
>
> Apparently you want me to escape something with a backslash in the color
> section of the script here:
>
><BODY
> BGCOLOR="Wheat"
>
>
> But what? What has to be escaped with the backslash Bit?

The " was to be escaped. :)

Saw the other post about category 3. Here try this one.


_out_fn=urls.html
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<!-- save as index.html -->
<!-- Enter file:$PWD in browser Location: -->
<HTML>
<HEAD>
<TITLE>Local Home Page $PWD</TITLE>
<TR>
<!-- Background wheat, links blue (unvisited), navy (visited), red (active) -->
<BODY
BGCOLOR=\"Wheat\"
LINK=\"Blue\"
VLINK=\"Red\"
ALINK=\"Green\"
TEXT=\"Black\"
<H4 ALIGN=\"CENTER\">
$PWD
" > $_out_fn

grep BASEURL= * > urls.txt

while read -r _line ; do
set -- $(IFS='=' ; echo $_line)
shift
echo "<TD><A href=\"$*\">$*</A></TD>" >> $_out_fn
done < urls.txt

echo "
</TR>
</h1>
</BODY>
</HTML>
" >> $_out_fn

echo "Output in $_out_fn"
From: Ohmster on
Bit Twister <BitTwister(a)mouse-potato.com> wrote in
news:slrnhptpfu.4nj.BitTwister(a)cooker.home.test:

> Hey, try it and see if url in a spaced file name shows up in the
> output file.

Wow, this is cool as hell Bit, but I am afraid it is too rough
around the edges to be used. If this were cleaned up to be functional, I
would love to have it, the thing looks so nice and all, but the output is
kind of screwy. Here is how it looks:

/home/ohmster/bench http://www.absolutearts.com/ Calendar.url:BASEURL
Claude Claude Claude Claude Claude -.url:BASEURL -.url:BASEURL
-.url:BASEURL http://www.artspan.com/ Photography.url:BASEURL Raton-
Addison Raton Raton Raton Raton Raton Raton Raton Raton Raton Simon Fine
Carter.url:BASEURL Chancery - Gallery.url:BASEURL Gallery.url:BASEURL
Gallery.url:BASEURL Blue Dickson.url:BASEURL Blick Bibby.url:BASEURL
Art.url:BASEURL Art Balderrama.url:BASEURL Klin.url:BASEURL
Klin.url:BASEURL Lauderdal-Art Lauderdale-ArtFusion.url:BASEURL
Lauderdale-Artists Lauderdale-Las Lauderdale-Max Richter.url:BASEURL
Dangereuses.url:BASEURL Dangereuses.url:BASEURL Zimmermann
Zimmermann.url:BASEURL Internationale BASEURL Museum Museum in Engelina
Artists.url:BASEURL Museums.url:BASEURL Kong
http://scorptest.free.fr/test_flip/
http://scorptest.free.fr/test_flip/JAPON/big.html Claude
Artarama.url:BASEURL Lillo-Beaufrand.url:BASEURL of Fine
Basel.url:BASEURL Art Steinbaum.url:BASEURL cisneros Rojas.url:BASEURL
Meirelles Snitzer.url:BASEURL Art Gallery Decorator.url:BASEURL
International Bruk Blossoms Savage Savage
http://www.nobe67art.com/index.html?page http://www.sun-sentinel.com/
Sentinel Sentinel Sentinel Americas York- York-Damien York_Franklin York-
York-John York-Marlborough York-PaceWildenstein.url:BASEURL York-
Sonnabend.url:BASEURL York-Sotheby's.url:BASEURL Beach-ARCATURE Beach-
GAVLAK.url:BASEURL Daniel Perrotin.url:BASEURL Morellet.url:BASEURL
Laurent Maria Soulages Design.url:BASEURL Dho.url:BASEURL
Milshtein.url:BASEURL Galler.url:BASEURL Blossoms Francisco-Byron
Francisco-Lincart.url:BASEURL Fe-Collector's Fe-Crowell.url:BASEURL Fe-
Hilario Fe-Jac Fe-Jack Fe-Karan Fe-LewAllen Fe-Nancy Fe-New Fe-Randall
Gallery.url:BASEURL -.url:BASEURL Dickson.url:BASEURL
http://www.xanadugallery.com/Art/SubjectList.asp?Inventory Wide

All of those "Claude Claude Claude Claude" words are urls that are:
file:///Z:/bench/Claude

Which is how I have this directory shared with windows, mounted as a
samba share as drive Z in Windows. Here is what needs improving and if
you want to lend a hand, of course I would honor your assistance, but it
will give me something to do in my spare time (If I ever get any), to
look up this scripting and figure it out.

This is what is great about it:
1.) Works great and fast.
2.) Nice colors in an html file with real html links.
3.) Totally clickable.

This is what is really, really wrong with it and makes it not useable:
1.) urls need to be one per line, list fashion, rather than one, huge
block of unbroken text. A carraige return needs to be inserted after each
url to drop down to next line.
2.) It is not necessary or desirable to include the pwd in the html file.
3.) This really makes no sense, I see the word "Raton" as in Boca Raton
repeated over and over, each one is a url to file:///Z:/bench/Raton
4.) There are many, many baseurl links that are useless, for example:
design.url:BASEURL
5.) This is a *way* cool idea but I think the problem is that you have no
desktop shortcuts to practice your script on, and I am quite sure that
your code is based on sound principals. To make this easier if you would
like to try out your own script, I have provided a zip file of all of the
desktop shortcuts for you to experiment with or at least try the script
with. Here you go:
http://www.ohmster.com/~ohmster/temp/desktopshortcuts.zip

Thank you Bit Twister. I sure would love to see this script rise to
fruition, but for now, John's quick text links will have to do until I
can get a better, working html generator script in place.

Thanks for the time and the lesson!

--
~Ohmster | ohmster59 /a/t/ gmail dot com
Put "messageforohmster" in message body
(That is Message Body, not Subject!)
to pass my spam filter.
From: Ohmster on
Bit Twister <BitTwister(a)mouse-potato.com> wrote in
news:slrnhptrrt.59t.BitTwister(a)cooker.home.test:

> The " was to be escaped. :)
>
> Saw the other post about category 3. Here try this one.
>

I will try it now Bit, but there were some very serious errors in the
script and I provided a url to a zip file of all the shortcut files for you
to practice on if you want. The thing has problems, maybe this one will be
better and leave out all of the useless basurl links and repetitive words
and useless links that go nowhere.

--
~Ohmster | ohmster59 /a/t/ gmail dot com
Put "messageforohmster" in message body
(That is Message Body, not Subject!)
to pass my spam filter.
From: Ohmster on
Bit Twister <BitTwister(a)mouse-potato.com> wrote in
news:slrnhptrrt.59t.BitTwister(a)cooker.home.test:

> The " was to be escaped. :)
>
> Saw the other post about category 3. Here try this one.

No good. This is no way useable or good. It is because you have no files
to test it on I am sure. Here are the desktop shortcut files that I am
working with:
http://www.ohmster.com/~ohmster/temp/desktopshortcuts.zip

Grab that zip file, unzip it to an empty test directory, and run your
script on it, watch what happens. Not what you thought, eh? Me either.
This needs fixing, BAD!

Here is a section of John's output text file:
http://www.absolutearts.com/
http://www.artcalendar.com/home.asp
http://www.jeanclaudearts.com/index.html
http://www.absolutearts.com/jboutrouil/
http://www.artnet.com/
http://www.artspan.com/
http://www.janeris.com/

Nice. Sweet. Other than missing out on the "=3" part of the url, this is
very good.

Here is a section of your urls.txt:
AbsoluteArts.com.url:BASEURL=http://www.absolutearts.com/
Art Calendar.url:BASEURL=http://www.artcalendar.com/home.asp
Art-Jean Claude Arts.url:BASEURL=http://www.jeanclaudearts.com/index.html
ArtJean Claude Boutrouille
-.url:BASEURL=http://www.absolutearts.com/jboutrouil/
ArtJean Claude Boutrouille
-.url:BASEURL=http://www.absolutearts.com/login4favorites.html
ArtJean Claude Boutrouille -.url:BASEURL=about:blank
ArtJean Claude Boutrouille -.url:BASEURL=about:blank
Artnet -.url:BASEURL=http://www.artnet.com/
Artnet -.url:BASEURL=http://trk.roitrax.com/artnet/rts.html?tver=4&cid=
3070&rts_id=291&cf=source&ccf=ccat&dh=www.artnet.com&dp=/
&ds=&dr=&rp=http&af=afid&kf=kfid&lf=lfid

What in the hell is that? Why all of the repetition?

Here is a section of your url.html file:
/home/ohmster/bench http://www.absolutearts.com/ Calendar.url:BASEURL
http://www.artcalendar.com/home.asp Claude Arts.url:BASEURL
http://www.jeanclaudearts.com/index.html Claude Boutrouille -.url:BASEURL
http://www.absolutearts.com/jboutrouil/ Claude Boutrouille -.url:BASEURL
http://www.absolutearts.com/login4favorites.html Claude Boutrouille
-.url:BASEURL about:blank Claude Boutrouille -.url:BASEURL about:blank
-.url:BASEURL http://www.artnet.com/ -.url:BASEURL
http://trk.roitrax.com/artnet/rts.html?tver 4&cid 3070&rts_id 291&cf
source&ccf ccat&dh www.artnet.com&dp /&ds &dr &rp http&af afid&kf kfid&lf
lfid -.url:BASEURL http://trk.roitrax.com/artnet/rts.html?tver 4&cid 3070
&rts_id 291&cf source&ccf ccat&dh www.artnet.com&dp /&ds &dr &rp http&af

All of it runs together, there is no line drop to next line for each
separate url, many urls go nowhere such as "file:///Z:/bench/Claude%
20Boutrouille%20-.url:BASEURL%
20http://www.absolutearts.com/login4favorites.html" Heh, not a very
useful url to say the least. The underlines in the urls form one
continuous line so that I have no idea where one url ends and another
begins. Plus, many of them are senseless. What can you do with a url like
this one? "dickson.url:BASEURL%
20http://www.markdicksonstudios.com/Artiststatement.html"

Too late for me now, have to go sleep for work early tomorrow. Play with
the zip file url files and see for yourself what happens. I am sure that
once you have the url files on your drive, all you need do is tweak one
or two items and the output would be nice. Thank you Bit Twister, for
taking the time and for helping me get an education.

I will check back tomorrow, goodnight!

--
~Ohmster | ohmster59 /a/t/ gmail dot com
Put "messageforohmster" in message body
(That is Message Body, not Subject!)
to pass my spam filter.
From: Bit Twister on
On Mon, 15 Mar 2010 21:58:47 -0500, Ohmster wrote:
> Bit Twister <BitTwister(a)mouse-potato.com> wrote in
> news:slrnhptpfu.4nj.BitTwister(a)cooker.home.test:
>
>> Hey, try it and see if url in a spaced file name shows up in the
>> output file.
>
> Wow, this is cool as hell Bit, but I am afraid it is too rough
> around the edges to be used. If this were cleaned up to be functional, I
> would love to have it, the thing looks so nice and all, but the output is
> kind of screwy. Here is how it looks:
>
> /home/ohmster/bench http://www.absolutearts.com/ Calendar.url:BASEURL
> Claude Claude Claude Claude Claude -.url:BASEURL -.url:BASEURL
>
> All of those "Claude Claude Claude Claude" words are urls that are:
> file:///Z:/bench/Claude
>
> Which is how I have this directory shared with windows, mounted as a
> samba share as drive Z in Windows. Here is what needs improving and if
> you want to lend a hand, of course I would honor your assistance, but it
> will give me something to do in my spare time (If I ever get any), to
> look up this scripting and figure it out.
>
> This is what is great about it:
> 1.) Works great and fast.
> 2.) Nice colors in an html file with real html links.
> 3.) Totally clickable.
>
> This is what is really, really wrong with it and makes it not useable:
> 1.) urls need to be one per line, list fashion, rather than one, huge
> block of unbroken text. A carraige return needs to be inserted after each
> url to drop down to next line.

Then you change html controls to use list instead of what I picked.


> 2.) It is not necessary or desirable to include the pwd in the html file.

Hey, it is your code on your system, you take it out. :-)

> 3.) This really makes no sense, I see the word "Raton" as in Boca Raton
> repeated over and over, each one is a url to file:///Z:/bench/Raton

Unless I can see the file, I can not see the fix.

> 4.) There are many, many baseurl links that are useless, for example:
> design.url:BASEURL

Need to see the shortcut file.


> 5.) This is a *way* cool idea but I think the problem is that you have no
> desktop shortcuts to practice your script on, and I am quite sure that
> your code is based on sound principals. To make this easier if you would
> like to try out your own script, I have provided a zip file of all of the
> desktop shortcuts for you to experiment with or at least try the script
> with. Here you go:
> http://www.ohmster.com/~ohmster/temp/desktopshortcuts.zip

Ok, try this one



#!/bin/bash
_out_fn=urls.html
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<!-- save as index.html -->
<!-- Enter file:$PWD in browser Location: -->
<HTML>
<HEAD>
<TITLE>Local Home Page $PWD</TITLE>
<TR>
<!-- Background wheat, links blue (unvisited), navy (visited), red (active) -->
<BODY
BGCOLOR=\"Wheat\"
LINK=\"Blue\"
VLINK=\"Red\"
ALINK=\"Green\"
TEXT=\"Black\"
<H4 ALIGN=\"CENTER\">
$PWD
<ul>

" > $_out_fn

grep --no-filename BASEURL= *.url > urls.txt

while read -r _line ; do
set -- $(IFS='=' ; echo $_line)
shift
echo "<li><A href=\"$*\">$*</A>" >> $_out_fn
done < urls.txt

echo "
</li>
</ul>
</h1>
</BODY>
</HTML>
" >> $_out_fn

echo "Output in $_out_fn"