Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Can Rebol Do?. (was) Re: International REBOL Use

 [1/5] from: belymt::saunalahti::fi at: 4-May-2001 1:58


At 15:10 3.5.2001 -0700, you wrote:
>See how your country scores in worldwide REBOL interest... > >http://www.rebol.com/sitehits.html
Wow.. Is there anything that can't be done with Rebol??? (I'm newbie with Rebol, not with computers: C64, Amiga, VMS, msdos, Unix, os/2, Beos Windowse etc) A question.. Is this possible? We have a client who has (in Linux RH7 server Apache,Mysq+php) Web form that is filled by client (we make form).. Now we need to send form data on Email as plain text (easy so far) and as a PDF attachment. To make things more difficult there is Image (jpeg/gif/png) upload option .. This image must be sen as e-mail attachment and inserted into PDF file.. So, could this be done in Rebol? I need no full implementation (too costly ;-) but idea how this can be done with Rebol... (I think I can manage it with PHP4+some assorted Unix tools) Joanna

 [2/5] from: agem:crosswinds at: 4-May-2001 6:48


Atachment easy, Sterlings %attach.r in the script-library. Pdf? I found nothing ready i know not much about it. Some kind of postscript with some packing? grin Use your pdf-tools with /Pro /Command? Or php calling some rebol-scripts? Call the tools for php, make the files, then call a caller for %attach.r (args..) (since it sounds the attaching is a project in php :) Hm, with postscript the email would look like ...lots of stuff... {line 1 of email} show-somehow {line 2 of email} show-somehow ... size-of-pic pic-somehow-encoded swipswopswap show-picture-somehow ... goddbye and that ... if pdf is text this looks like a template with some placeholders, where rebol can paste in this stuff? hm. if /view could dump its faces to pdf.. dreaming Volker
>>>>>>>>>>>>>>>>>> Ursprüngliche Nachricht <<<<<<<<<<<<<<<<<<
Am 03.05.01, 23:58:54, schrieb Joanna Kurki <[belymt--saunalahti--fi]> zum Thema [REBOL] Can Rebol Do?. (was) Re: International REBOL Use:

 [3/5] from: belymt:saunalahti:fi at: 4-May-2001 10:24


>Atachment easy, Sterlings %attach.r in the script-library. >Pdf? I found nothing ready i know not much about it. >Some kind of postscript with some packing? grin
In my original implementation idea I'm going to Hand-code PS (it's yet another programming language, looks related to Forth) and then find some Linux tool (Ghostscript package has tool named ps2pdf and it's part if standard Linux RH7) to convert it into PDF.. I know it's possible to use some 3:rd part library to make PDF directly within PHP but those libraries have such high licensing fees they don't fit into this project. (not my fault, I did not sell this idea it to customer, I would have just offered plain ascii E-mail ;-)
>Use your pdf-tools with /Pro /Command? >Or php calling some rebol-scripts?
<<quoted lines omitted: 8>>
> size-of-pic > pic-somehow-encoded
This is the tricky part.. Image encoding must be direct hex stream (1,2,4 or 8 bits per pixel, greyscale) ... This is not what I want to do with PHP. (it's good on many things.. ;)
> swipswopswap show-picture-somehow > ... goddbye and that ... > >if pdf is text this looks like a >template with some placeholders, >where rebol can paste in this stuff? > >hm. if /view could dump its faces to pdf.. dreaming
Hmm.. Dumping them on PS would help too.. Joanna

 [4/5] from: brett:codeconscious at: 4-May-2001 23:16


> Hmm.. Dumping them on PS would help too.. >
I've *glanced* at PS and PDF. I suspect PS would be easier to code because it is a programming language and therefore you can create subroutines to do all the hard work. Then generate the PS like you might HTML, by spitting out the fixed header including subroutine definitions and then data and subroutine call(s). I don't know if Ghostscript handles it but I recall that PS has operations to read external files as well (may or may not be handy). PDF on the other hand I believe is a superset of PS, but encapsulated within a data model. I've there have been quite a few articles on spitting out PDF using Java and other languages - and the examples looked quite straight forward - as long as your output was not too dynamic. Sorry I can't contribute to your image question. Brett.

 [5/5] from: agem:crosswinds at: 4-May-2001 17:51


[rebol [ comment: { JUF (just for fun): if iam done this right, /view can grayscale and dump an image 500x350 in ~2.5sec (k2/350) dump means, it extracts one color from each pixel in a loop (*175000) (dont know which color :). should do this " tricky part.. Image encoding must be direct hex stream (1,2,4 or 8 bits per pixel, greyscale)" with 8bit/pixel? don't know if its fast enough compared to native tools, and you need a running x-server with access for the cgi-owner to use it.. (or windows?) now learning pdf .. oh yes, the code is high dirty, yell if you need cleanup :) Volker }] ;--- ;some helpers ;debug2/cmd source ??? ???: func ['wort wert] [ print [mold :wort " : " mold wert] wort wert ] ;--- ;get image b: load read-thru ;http://www.rebol.com/view/demos/palms.jpg http://www.rebolforces.com/reb/images/rebolt.jpg probe type? b ??? a: b/size ;--- ;a bit show-sugar before h: to image! layout [origin 0x0 image b effect [grayscale]] view layout [ title "here is the used picture" across image b image h return button "benchmark" [unview/all] text "read on console.." ;box a effect[cross] ] ??? c: a/x * a/y d: make binary! c ;--- ; the benchmark (!!) do [ t1: now/precise ;--- ;the real working part.. !!!! i: to image! layout [origin 0x0 image b effect [grayscale]] repeat f divide length? i 4 [ insert tail d to char! i/:f/1 ] ??? t2: now/time/precise - t1/time ] probe length? d ;halt ]
>>>>>>>>>>>>>>>>>> Ursprüngliche Nachricht <<<<<<<<<<<<<<<<<<
Am 04.05.01, 08:24:18, schrieb Joanna Kurki <[belymt--saunalahti--fi]> zum Thema [REBOL] Re: Can Rebol Do?. (was) Re: International REBOL Use:

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted