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

World: r3wp

[Web] Everything web development related

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
[894x2]
well, I completed my mini preprocessing dialect ... harder than I 
thought it would be.  Need to re-aquaint myself with block parsing!
Oddly, when I print to a5paper, pdflatex seems to still produce a4 
size paper ... or perhaps it's just Acrobat Reader ...
yeksoon
9-Oct-2005
[896]
it could be Adobe Reader...there are some settings on your Reader 
for the page size
Graham
9-Oct-2005
[897x3]
inspecting the properties using Acrobat Reader, it says it's still 
A4 size.
I must be doing something wrong in creating my tex file.
Although Acrobat displays it so that the text only occupies an A5 
part of the paper.
yeksoon
9-Oct-2005
[900]
I am not familiar with tex..


but the fist line of your output has a word 'letter' in it...could 
that be the cause of it?
Graham
9-Oct-2005
[901]
Letter is the class of document ie. it should not be specifying the 
page size.  Others in this class include article, report, book, slides. 
 It could be a problem but I don't know enough about it.
Graham
10-Oct-2005
[902]
Found the problem .. pdflatex needs to be told the page size in addition 
to specifying that it is a4 or a5 etc.  On page 73 of an intro to 
LaTeX !