using perl to generate html- and css-kosher documents

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hello ng,

I posted recently on the topic of binary scraping, and the premise was  
that I was either going to do that, or I wasn't.  Now I'm in official  
"wasn't" territory, because I discontinued binary usenet news service.  
They tell me I have till the 11th, so I wanted to get my last dime's worth.

That topic went "OT," but I think in a good way; OP decided against the  
proposition and the conversation continued.  It's super weird when  
people who come together for a reason *only* talk about that reason.  I  
think we glean a lot from the nearby topics that don't turn flamey,  
because they lack purity.

My deal right now is that I want to knock as many corners off my perl  
templates for html as I can before my connection goes dead in 72 hours.  
  It could be like the Kevin Costner film, except that no one plays  
Kevin Costner as the lead.

This shows typical output.  The .css isn't working, and neither is the  
html, and the html is written from perl by the following means:

$ pwd

$ cat rebus1.tmpl
<img src=" ">
$ cat rebus2.tmpl
<img src=" alt="some image"">

I can't figure out why this doesn't look better right now.  Does an img  
really need alt code in order to be kosher html?

I have a couple questions I can reduce to something understandable:

Q1)  Does an image need alt code to be kosher.  (maybe slightly OT  
unless I were writing it using perl)

Q2) How do I write the embedded '"' in the specifier?

Q3)  Would anyone mind if we took a break from spying on each other to  
look at the games?
Cal Dershowitz

Re: using perl to generate html- and css-kosher documents

Quoted text here. Click to load it
Quoted text here. Click to load it

Yes. See the HTML5 spec, and imagine the experience of someone who is
blind and is reading your page using a browser which speaks the page to
them aloud.

Quoted text here. Click to load it

I don't know what you mean by this. Does this have something to do with
the unmatched quotes in your second example?

Quoted text here. Click to load it

This sort of completely irrelevant comment does not encourage people to
take you seriously.


Re: using perl to generate html- and css-kosher documents

On 02/08/2014 10:33 PM, Ben Morrow wrote:
Quoted text here. Click to load it

$ pwd
$ cd template_stuff/
$ cat rebus2.tmpl
<img src=" " alt="some image">

This is a pretty lazy way to address this, but it does validate as both  
html5 and css.  As much as a person tries to divorce content from  
appearance, he will struggle with "what counts as what?"

In order for me to properly clone a directory, I need to munge new css  
names, and I would prefer to take all of the previous ones in a  
workspace matching the directory name.  I make quick revisions in the  
css, commensurate to the massive number of misalignments that precede  
something worth looking at.

I matched the control I already had:

$ pwd
$ cat
#!/usr/bin/perl -w

# copy files:
opendir my $eh, $srd6 or die "dead  $!\n";
while (defined ($_ = readdir($eh))){

if (m/(txt|pm|css|tmpl)$/){
    say "matching is $_";
    $a = file($srd6,$_);
    #say "a is $a";
    $b = file($srd3,$_);
    #say "b is $b";
say "here you are, cal";
# copy css file to template with munged name
opendir my $fh, $srd6 or die "dead  $!\n";
while (defined ($_ = readdir($fh))){

if (m/^$from(\d*)\.css$/){
    say "matching is $_";
    say "dollar one is $1";
    $a = file($srd6,$_);
    say "a is $a";
    my $munge = $to.$1 .".css";
    $b = file($srd3,$munge);
    say "b is $b";

from output:

here you are, cal
matching is greece1.css
dollar one is 1
a is /home/fred/Documents/root/pages/greece/template_stuff/greece1.css
b is /home/fred/Documents/root/pages/thailand/template_stuff/thailand1.css
matching is greece2.css
dollar one is 2
a is /home/fred/Documents/root/pages/greece/template_stuff/greece2.css
b is /home/fred/Documents/root/pages/thailand/template_stuff/thailand2.css

end partial output

I'm gonna fold these together into one control now.  I think having the  
alt text helps load the images, but I find that I only get 80 percent of  

Q1)  Is there anything I can do to help images load in this link:

Q2)  How do I make an icon?  Does it have to be a .png?  I have failures  
I can show.

Q3)  If the html and css check out as kosher, then why would a browser  
never indicate that it had received everything?

Hope you're enjoying the games half as much as I am.  Cheers,
Cal Dershowitz

Re: using perl to generate html- and css-kosher documents

Quoted text here. Click to load it

None of this has anything to do with Perl.

Quoted text here. Click to load it

I have no idea what games you're talking about.


Site Timeline