Home > Archive > Tcl > March 2006 > get document title, and a data graph
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
get document title, and a data graph
|
|
| Dr. Franz-Josef Huecker 2006-03-18, 6:58 pm |
| Hi all
I look for a solution - to get the content of javascript e.g.
<script type=text/javascript> document.write(document.title) </script>
in a tcl variable? - cause I need the document.title to use it in an
other page?
In addition to it I look for a solution to create a graph.png or a
graph.jpg, or a graph.gif for statistical data.
Do you have any suggestions or solutions for it?
Franz-Josef
| |
| Ulrich Schöbel 2006-03-18, 6:58 pm |
| Hi Franz-Josef,
if you generated the page containing the document title, you
already have it on the server side. Else let javascript put
it to the query for a new request.
Generating graphics is quite easy:
http://wiki.tcl.tk/5140
should help.
Best regards
Ulrich
Am Sat, 18 Mar 2006 22:13:05 +0000 schrieb Dr. Franz-Josef Huecker:
> Hi all
>
> I look for a solution - to get the content of javascript e.g.
>
> <script type=text/javascript> document.write(document.title) </script>
>
> in a tcl variable? - cause I need the document.title to use it in an
> other page?
>
> In addition to it I look for a solution to create a graph.png or a
> graph.jpg, or a graph.gif for statistical data.
>
> Do you have any suggestions or solutions for it?
>
> Franz-Josef
| |
| Dr. Franz-Josef Huecker 2006-03-21, 10:07 pm |
| On Sun, 19 Mar 2006 00:41:19 +0200, =?iso-8859-1?q?Ulrich_Sch=F6bel?=
<ulrich@outvert.com> wrote:
>Generating graphics is quite easy:
>
>http://wiki.tcl.tk/5140
Hi Ulrich
I use SuSE Linux 7.1 (i386, Kernel 2.2.18) and tcl 8.3, - and I look
for a solution to get graphs for my statistical datas. So I found via
Wiki gdtclft 2.2 and gdtclft 2.2.5-9, - but I can't install it, cause
I get always an error. Maybe do you have suggestions or an other
solution for it? - I need it for a website to visualize statistical
datas on the fly. -- It seems an additional problem is, that I'm not
an programmer, that I'm not so familiar with all of this problems and
potentially solutions.
Franz-Josef
| |
| Ulrich Schöbel 2006-03-22, 8:09 am |
| Hi Franz-Josef,
which errors do you get?
Did you compile gd (http://www.boutell.com/gd/http/gd-2.0.33.tar.gz)
before? Do you have all needed libraries and header files?
I just tried to compile and everything works fine.
Kind regards
Ulrich
Am Wed, 22 Mar 2006 01:18:14 +0000 schrieb Dr. Franz-Josef Huecker:
> Hi Ulrich
>
> I use SuSE Linux 7.1 (i386, Kernel 2.2.18) and tcl 8.3, - and I look
> for a solution to get graphs for my statistical datas. So I found via
> Wiki gdtclft 2.2 and gdtclft 2.2.5-9, - but I can't install it, cause
> I get always an error. Maybe do you have suggestions or an other
> solution for it? - I need it for a website to visualize statistical
> datas on the fly. -- It seems an additional problem is, that I'm not
> an programmer, that I'm not so familiar with all of this problems and
> potentially solutions.
>
> Franz-Josef
| |
| Uwe Klein 2006-03-22, 7:05 pm |
| Dr. Franz-Josef Huecker wrote:
> On Sun, 19 Mar 2006 00:41:19 +0200, =?iso-8859-1?q?Ulrich_Sch=F6bel?=
> <ulrich@outvert.com> wrote:
>
>
>
>
> Hi Ulrich
>
> I use SuSE Linux 7.1 (i386, Kernel 2.2.18) and tcl 8.3, - and I look
> for a solution to get graphs for my statistical datas. So I found via
if you want to be conservative with system update
there is
blt : vector and the graph widget
see "man blt", "man blt_graph"
search for /usr/doc/packages/blt/demos or /usr/lib/blt2.4/demos/
( i don't have a 7.1 installation anymore ;-)
and run them
suse allways came with a usefull bundle of tcl : tcl tk expect blt itcl ..
if they are not installed i could send some rpms.
an alternative could be using gnuplot which should have all the
plotting "schnickschnack" you need
and use "set terminal tkcanvas"
use this output to plot in you stuff in a tk canvas.
> Wiki gdtclft 2.2 and gdtclft 2.2.5-9, - but I can't install it, cause
> I get always an error. Maybe do you have suggestions or an other
> solution for it? - I need it for a website to visualize statistical
> datas on the fly. -- It seems an additional problem is, that I'm not
> an programmer, that I'm not so familiar with all of this problems and
> potentially solutions.
>
> Franz-Josef
uwe
| |
| Ulrich Schöbel 2006-03-22, 7:06 pm |
| Hi Uwe,
as far as I understand the OP, he's looking for a graph
generator for web usage. BLT and canvas might help via
ps -> ghostscript -> jpeg or gif or png
but gdtclft seems to be the more direct way.
Kind regards
Ulrich
Am Wed, 22 Mar 2006 12:02:21 +0100 schrieb Uwe Klein:
> if you want to be conservative with system update
> there is
> blt : vector and the graph widget
>
> see "man blt", "man blt_graph"
> search for /usr/doc/packages/blt/demos or /usr/lib/blt2.4/demos/
> ( i don't have a 7.1 installation anymore ;-)
> and run them
> suse allways came with a usefull bundle of tcl : tcl tk expect blt itcl ..
> if they are not installed i could send some rpms.
>
> an alternative could be using gnuplot which should have all the
> plotting "schnickschnack" you need
> and use "set terminal tkcanvas"
> use this output to plot in you stuff in a tk canvas.
>
> uwe
| |
| Uwe Klein 2006-03-22, 7:06 pm |
| Ulrich Schöbel wrote:
Hi,
> Hi Uwe,
>
> as far as I understand the OP, he's looking for a graph
> generator for web usage. BLT and canvas might help via
> ps -> ghostscript -> jpeg or gif or png
> but gdtclft seems to be the more direct way.
then the OP could use gnuplot with export to
png, jpg, gif, ps, ....
depends on how flashy the result should be.
on the other hand : netpbm "converter-toy" is your friend.
i.e. postcript from blt -conv-> png
building gd on his box might require extensive updating
my SuSE 7.1 DVD is dated 2001-01-23 ;-)
uwe
| |
| Dr. Franz-Josef Huecker 2006-03-22, 7:06 pm |
| On Wed, 22 Mar 2006 09:46:55 +0200, =?iso-8859-1?q?Ulrich_Sch=F6bel?=
<ulrich@outvert.com> wrote:
>which errors do you get?
>Did you compile gd (http://www.boutell.com/gd/http/gd-2.0.33.tar.gz)
>before? Do you have all needed libraries and header files?
>
>I just tried to compile and everything works fine.
Hi Ulrich
I compiled gd-2.0.33.tar.gz without problems. But if I try
gdtclft_2.2.orig.tar.gz or gdtclft_2.2.5-9.tar.gz - I can not
configure it, cause I get the report:
loading cache ./config.cache
setting prefix to: /usr
checking for a BSD compatible install... (cached) /usr/bin/install -c
../configure: /usr/lib/tclConfig.sh: No such file or directory
Do you have any ideas, who can I fix it - or maybe it's a wrong
package for it? - or there is an other solution for it ... ?
Franz-Josef
>Am Wed, 22 Mar 2006 01:18:14 +0000 schrieb Dr. Franz-Josef Huecker:
>
>
| |
| Ulrich Schöbel 2006-03-23, 4:12 am |
| Am Thu, 23 Mar 2006 00:25:25 +0000 schrieb Dr. Franz-Josef Huecker:
> On Wed, 22 Mar 2006 09:46:55 +0200, =?iso-8859-1?q?Ulrich_Sch=F6bel?=
> <ulrich@outvert.com> wrote:
>
[color=darkred]
>
> Hi Ulrich
>
> I compiled gd-2.0.33.tar.gz without problems. But if I try
> gdtclft_2.2.orig.tar.gz or gdtclft_2.2.5-9.tar.gz - I can not
> configure it, cause I get the report:
>
> loading cache ./config.cache
> setting prefix to: /usr
> checking for a BSD compatible install... (cached) /usr/bin/install -c
> ./configure: /usr/lib/tclConfig.sh: No such file or directory
>
> Do you have any ideas, who can I fix it - or maybe it's a wrong
> package for it? - or there is an other solution for it ... ?
>
> Franz-Josef
>
Hi Franz-Josef,
the hard part is done (gd-2.0.33).
Did you compile Tcl yourself or are you using the SuSe installed Tcl?
gdtclft needs the Tcl headers and libraries. configure only looks
into ${prefix}/lib, which is /usr/lib by default.
My Tcl installation is under /usr/local, so I had to run
configure --prefix=/usr/local
and everything was fine. Simply choose the prefix of your Tcl install.
If you don't have a tclConfig.sh on your system, you should compile
Tcl (and maybe Tk) yourself instead of using the SuSe version.
This is also an opportunity to upgrade to the newest Tcl version.
Tcl 8.3 is pretty old.
If I remember correctly, SuSe Tcl is under /usr, but obviously
there is no tclConfig.sh. Maybe it's delivered in a separste rpm.
I always ignored the SuSe Tcl and installed my own in /usr/local,
which is the default for an out of the box Tcl install. That way
I always (mostly) had the newest Tcl/Tk on my machine and a matching
tclConfig.sh in /usr/local/lib.
I hope that helps you making the small final step to gdtclft.
Kind regards
Ulrich
| |
| Uwe Klein 2006-03-23, 4:12 am |
| Dr. Franz-Josef Huecker wrote:
> On Wed, 22 Mar 2006 09:46:55 +0200, =?iso-8859-1?q?Ulrich_Sch=F6bel?=
> <ulrich@outvert.com> wrote:
>
>
>
>
> Hi Ulrich
>
> I compiled gd-2.0.33.tar.gz without problems. But if I try
> gdtclft_2.2.orig.tar.gz or gdtclft_2.2.5-9.tar.gz - I can not
> configure it, cause I get the report:
>
> loading cache ./config.cache
> setting prefix to: /usr
> checking for a BSD compatible install... (cached) /usr/bin/install -c
> ./configure: /usr/lib/tclConfig.sh: No such file or directory
You are missing the tcl_devel package.
i.e. tcl-devel-8.3.2-5.i386.rpm is not installed.
check with "rpm -q -a | grep -i tcl" what is installed.
do you have the CD/DVD set for SuSE7.1?
or is your eMail account valid?
uwe
| |
| Dr. Franz-Josef Huecker 2006-03-23, 10:04 pm |
| On Thu, 23 Mar 2006 09:51:27 +0200, =?iso-8859-1?q?Ulrich_Sch=F6bel?=
<ulrich@outvert.com> wrote:
>If you don't have a tclConfig.sh on your system, you should compile
>Tcl (and maybe Tk) yourself instead of using the SuSe version.
>This is also an opportunity to upgrade to the newest Tcl version.
>Tcl 8.3 is pretty old.
Hi Ulrich, Uwe
I've tcl-devel-8.3.2-5M.i386.rpm installed and now it seems to work.
tcl>package require Gdtclft
2.2
-- Merci, merci from Berlin. :-)
Sorry, - but there is a new problem:
If I try Gdtclft2.2/examples I get the message :
"Error: libgd was not built with FreeType font support"
What can/should I do? Do you have any suggestions?
Franz-Josef
| |
| Uwe Klein 2006-03-24, 4:14 am |
| Hi and good morning,
Dr. Franz-Josef Huecker wrote:
> Sorry, - but there is a new problem:
>
> If I try Gdtclft2.2/examples I get the message :
>
> "Error: libgd was not built with FreeType font support"
install freetype and freetype-devel (from the DVD):
x ./full-names/i386/freetype2-devel-2.0.1-5.i386.rpm
x ./full-names/i386/freetype2-2.0.1-5.i386.rpm
? ./full-names/i386/freetype-tools-1.3.1-153.i386.rpm
you will have to reconfigure and rebuild gd and prob. gdtclft
you may need to run configure with --prefix=/usr --with-freetype..
"configure --help" will probably tell about options.
see to i that configure has found the freetype stuff look in config.log
or output of configure
check if there are any other options you want.
>
> What can/should I do? Do you have any suggestions?
>
> Franz-Josef
uwe
|
|
|
|
|