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

World: r3wp

[Web] Everything web development related

Pekr
21-Sep-2005
[845]
Mozilla and XML standards support - http://www-128.ibm.com/developerworks/xml/library/x-ffox15.html?ca=dgr-lnxw07FirefoxXML
Graham
6-Oct-2005
[846x2]
I want to use REBOL web server to take a tex file, and spit out pdf 
using pdflatex.  Anyone suggest a suitable server?  Cal's ? Others 
?
I'm using DOS batch files at present which is not as nice.
Volker
7-Oct-2005
[848]
running locally? I like Cals, some peoples have post-problems with 
it. I have read about  one or two others with cgi (library?), and 
uniserve of course.
Pekr
7-Oct-2005
[849]
what about uniserve? It is not as much bigger and it proven, no?
Volker
7-Oct-2005
[850]
And you have experience with it :)
DideC
7-Oct-2005
[851x2]
Sorry the page is in french ZazouMini WebServer http://www.xgarreau.org/zazouminiwebserver/

Some French users already use it with Rebol, so it is possible to 
found some help.
Ah, there is the same page in english ;-)
http://www.xgarreau.org/zazouminiwebserver/en/
Joe
7-Oct-2005
[853]
There is a free FastCGI for Core --> check agoradev.org . it also 
was tested with magic! the author was cocinelle
DideC
7-Oct-2005
[854]
AgoraDev.org is dead. It's replace by http://rebol.dev.fr/
All data should have been moved.
Joe
7-Oct-2005
[855]
the fastCGI was nicely coded and was public domain license
Graham
7-Oct-2005
[856]
I thought using Uniserve was overkill ... :)
Volker
7-Oct-2005
[857]
Well, depends on setup-effort, not code-size. And you can send send 
the tex thru email too :))
Graham
7-Oct-2005
[858x6]
I just downloaded Serveit .. but it comes up with a gui :(  And if 
I try it in quiet mode, --quiet, it comes up with a license code 
request :(
zzazouminiwebserver is definitely overkill ... php and mysql support
Trying out Cal's version .. need to define "pdf" "application/pdf" 
so it displays those.
this is for an embedded web server so I don't need anything too fancy.
Looks like Cal's webserv was too complicated for my purposes as well, 
and I've ended up using a variation on the micro web server at

http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=webserver.r
So, to render PDF, I do this

write %/d/rebol/rebgui/www/referral.tex tmp
either zero? ret: call/wait "d:\rebol\rebgui\www\pdflatex.bat" [
            browse/only http://127.0.0.1:8001/referral.pdf
][

            alert join "Failed to print.  Batch file failed with return code 
            of " ret
]

and pdflatex.bat is just

copy referral.tex c:\texmf\
c:
cd \texmf\
pdflatex referral.tex -output-directory=d:\rebol\rebgui\www\
Gabriele
8-Oct-2005
[864]
why do you need a web server?
Graham
8-Oct-2005
[865]
Because if I just browse to the pdf, Acrobat locks the file which 
prevents me from rewriting the file.  This way, I can rewrite, and 
Acrobat reloads it.  Also I avoid writing lots of temporary files 
if I were to change the file name to bypass Acrobat file locking.
Volker
8-Oct-2005
[866x3]
You need no cgi, only "static page"?
ah, you found microweb, ok.
Complicated. And: <satirical> Isnt circumventing a lock circumventing 
a copy-protection? I mean, a lock prevents you from copying to something.. 
</satirical>.
Graham
8-Oct-2005
[869x3]
Yes, I guess this would be illegal in the UK and European Union.
I note that an Australia court recently ruled that modifying Playstations 
with mod chips was not illegal .. so Australians can still use this 
software technique :)
No cgi required yet .. but good to keep it as an option.
Volker
8-Oct-2005
[872]
Did i understand right? Running a webserver to read acrobat on a 
moded playstation? :)
Graham
8-Oct-2005
[873x3]
No :)
This is my CRM application.  I am using LaTeX to write letters, and 
a microweb server to preview the PDFs.
I am thinking now of creating a mini LaTeX letter writing dialect.
Volker
8-Oct-2005
[876]
makedoc to latex?
Graham
8-Oct-2005
[877x3]
no, just a simple way to describe a letter format.
Like a style I guess.
papersize A4 fontsize 11 class letter
                use fancyhdr
                my-address
                consultation-date
                signature
                begin
                    provider-address
                    Dear Provider
                    patient-table
                    diagnoses&medications
                    body
                end
Volker
8-Oct-2005
[880x2]
Isnt text supposed to do such things itself? although, we know rebol 
better, so would be easier.
text -> tex.
Graham
8-Oct-2005
[882x2]
my-address pulls in the data from the fields in the CRM, same with 
signature etc.

Diagnoses&medications generates a LaTeX two column table.  Body is 
the text that we have written.
Tex .. need to mark up everything.  This way I avoid writing the 
markup .. Rebol will do that for me.
Volker
8-Oct-2005
[884x2]
aah, i see, getting the data from the crm.
And yes, tex looks confusing.
Graham
8-Oct-2005
[886x3]
Here's an example from the above layout.
\documentclass[a4paper,11pt]{letter}

%frenchspacing
\pagestyle{plain}
\usepackage{fancyhdr}

\address{Upper Hutt Health Centre\\P.O. Box 40-044\\Upper Hutt\\
\\tel: 04 920-1800\\
fax: 04 920-1808}

\date{1-Apr-2005}
\signature{Dr Graham Chiu}

\begin{document}

\begin{letter}{Dr CP ANYON\\
Ropata Village Medical Centre\\577 High Street\\
Lower Hutt, }
\opening{Dear Dr Anyon,}

\begin{quote}
\begin{tabular} {ll}
Cap. James Tiberius \textbf{Kirk} Dob: 22-Mar-2233& \\
Captain's Quarters, Starship Enterprise& \\
\end{tabular}
\end{quote}\begin{quote}
\begin{tabular} {ll}

\textbf{Diagnoses}&\textbf{Medications}\\Prolonged posttraumatic 
stress disorder&Methotrexate 12.5 mg Mondays only\\Other specified 
parasitic infections&Folic Acid 1 mg daily except Mondays\\ &Fosamax 
70 mg Tuesdays only\\
\end{tabular}
\end{quote}
James needs a new hip!
\closing{Best Regards,}

\end{letter}

\end{document}
So, this dialect will only deal with the LaTeX letter class.
Volker
8-Oct-2005
[889x2]
You worked as a spaceship-doctor? :)
I understand you want a preprocesor for that :)
Graham
8-Oct-2005
[891x3]
Yeah .. I worked for Star Fleet a long time ago.
I know Robert said he would make MDP emit LaTeX but I never heard 
anymore of that project.
Any LaTex users here ?  It seems very hard to change default margins 
etc.
Graham
9-Oct-2005
[894]
well, I completed my mini preprocessing dialect ... harder than I 
thought it would be.  Need to re-aquaint myself with block parsing!