r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Web] Everything web development related

eFishAnt
5-Feb-2005
[381x2]
that is something we can do.
Pekr, anything special in print preview?
Pekr
5-Feb-2005
[383]
special? You can see how it will look ...
eFishAnt
5-Feb-2005
[384]
yes, and in FF it looks like rubbish.  The text gets truncated.
Pekr
5-Feb-2005
[385x2]
Steve - why to be so impulsive? :-) Look, I5 < 5.5 did not even provide 
print preview! NS had it for ages. I very ocassionally got myself 
in problem with NS, FF, Mozilla using print preview.
isn't it in printer driver? What about other websites? Do all get 
truncated? Maybe FF can't handle the particular one, which may be 
badly coded?
eFishAnt
5-Feb-2005
[387]
ah, but none of it works...FF, IE, NS, Opera...all rubbish.  All 
I want is to print a proof.  At least they could get the text right.
Pekr
5-Feb-2005
[388x2]
Could you post a link to site you want to get printed?
btw - Carl posted proposition for color-text ...
eFishAnt
5-Feb-2005
[390x3]
it is a document I did in Make-doc2.r not for the public yet for 
another month...
trying to do landscape...that ALMOST works...what rubbish, these 
Web Browsers.
you would think after 15 or more years they could at least do text 
right.
Pekr
5-Feb-2005
[393]
are you talking about plain text or already converted md document 
into html?
Carl
5-Feb-2005
[394]
Hi Steve, I usually just scale it down a bit in the print dialog 
box.
eFishAnt
5-Feb-2005
[395]
already made html.
Carl
5-Feb-2005
[396x3]
For most of the rebol.net docs, I've notice they sometimes clip on 
the right edge of the printer when using US paper size.
It's usually due to the size of the banner graphic on the top -- 
which is just a bit too wide. I need to fix it one of these days 
or change the way the page is built to not include the graphic in 
the outermost table.
And, there is also the problem that occurs if any code example is 
too long, pushing out the right margin for the entire doc. I've thought 
about correcting for that in MD. But, not sure how best to do that 
(wrap or clip).
Graham
5-Feb-2005
[399]
Need a print CSS
eFishAnt
5-Feb-2005
[400]
yeah...I have done the scaling, sort of a fishy thing to have to 
do.  More of a rhetorical question I was asking...because if Web 
browsers and Adobe Acrobat were well designed, electronic documentation 
would be a joy to use...just lots of room for improvement to REBOLutionize 
the industry.
Pekr
5-Feb-2005
[401]
There is nothing wrong with Adobe PDF imo ...
eFishAnt
5-Feb-2005
[402x2]
I will shut up...was just venting...a big pain in computing to solve...perfect 
literate computing.  Before Dynabooks are good, this problem has 
to be solved.
I did have code in a box that was rather long. so that will help 
printing until I design a new Web displayer...
Anton
8-Feb-2005
[404x16]
I would like to fix path-thru so it can handle query strings, as 
links to rebol.org scripts have. eg. http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r?script-name=slim.r
Maybe I should rephrase that: I would like to fix NTFS so it can 
handle "?" in filenames...
Anyway, the idea is to map characters in the URL that are unallowed 
by the local filesystem to something else (probably the hex representation 
?)
eg. 
>> http://%3F
== http://?
This type of mapping could cause collisions (there might be a url 
with a %3F already in place of the ?) but I think this imperfect 
system is better than not being able to map at all.
So the initial goal for me is just to map the ? character, then later 
I will see about other non-allowed characters. I think it is ? who 
is causing all or most of the problem.
PATH-THRU currently looks like this:
path-thru: func [
    "Return a path relative to the disk cache."
    url /local purl
][
    if file? url [return url]
    if not all [purl: decode-url url purl/host] [return none]

    rejoin [view-root/public slash purl/host slash any [purl/path ""] 
    any [purl/target ""]]
]
So the quick solution seems to be to modify the last line, using 
REPLACE to change "?" -> "%3F"
replace rejoin [view-root/public slash purl/host slash any [purl/path 
""] any [purl/target ""]] "?" "%3F"
Indeed PATH-THRU seems to work on this url, as well as LOAD-THRU 
and EXISTS-THRU? (they all rely on PATH-THRU)
>> path-thru http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r?script-name=slim.r

== %/D/Anton/Dev/Rebol/View/public/www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r%3Fscript-name=slim.r

>> load-thru http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r?script-name=slim.r
connecting to: www.rebol.org
connecting to: www.rebol.org
== [
    SLiM: make object! [
        id: 1
        slim-path: what-dir
        libs: []
        paths: []
        linked-libs:...

>> exists-thru? http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r?script-name=slim.r

== %/D/Anton/Dev/Rebol/View/public/www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r%3Fscript-name=slim.r
So that looks good. Unless anyone has any objections I will post 
it to RAMBO as a feature request.
In future, I think a proper mapping function (probably using PARSE) 
should be created, and path-thru would use that instead of REPLACE, 
but until then I think this is a very good and cheap fix.
OK, I posted a RAMBO ticket for this.
Anyone got any advice on allowability of "?" in filenames on *nix 
?
Rebolek
8-Feb-2005
[420]
I don't know, but "?" can be used as a wildcard on *nix, so I think 
it's not supported in filenames (but I've no real experience with 
*nix)
Anton
8-Feb-2005
[421x5]
Mmm.. I think (without checking any official specs yet) that the 
mapping problem is not so bad, because allowed character set for 
URLs is quite restricted, so it should be smaller than allowed characters 
on most filesystems. On the other hand, maybe the intersection of 
allowed characters on all rebol-supported filesystems is actually 
smaller...
Kru, as I understood on unix, filenames could contain any ascii characters 
0-255, but using characters such as "?" would confuse a lot of programs, 
so it was avoided. I don't know what the situation is these days.. 
Maybe they are more restrictive of allowed filenames.
Ok, to the google search !
First link looks interesting:
http://linux-ntfs.sourceforge.net/ntfs/concepts/filename_namespace.html
Sunanda
8-Feb-2005
[426]
URLs are not technically very restricted. Can't remember the details 
off hand -- Google for RFC1630.

But many implementations are restricted  in random and petty ways.
Anton
8-Feb-2005
[427x4]
Thanks Sunanda, just skipping through it now... as I expected, a 
complex fudge. :)
http://www.w3.org/Addressing/rfc1630.txt
Towards the bottom there seem to be some BNF parse rules for WWW 
URIs.
But my energy for tonight is just about to expire... Luckily I just 
installed the "SessionSaver" extension for Firefox (keeps documents 
persistent), so I can just close firefox and go offline. Nice plugin.