Total Pageviews

Showing posts with label tcl. Show all posts
Showing posts with label tcl. Show all posts

Thursday, 2 June 2022

tknotepad

This is a simple notepad editor writen in TCL/Tk.

ABOUT:

TkNotePad is designed to be a single Tcl/Tk script, that is functional across platforms, but is intended mainly for Linux.

This script is freeware, however there is some 'borrowed code' now contained in this script. See the file license.txt to see what that means. Basically I modified there code and am now redistributing it, and giving them proper credit. As I understand it that is they way it works. This script itself then becomes yours to modify, crop, cut, paste, or whatever. It is distributed under the Tcl/Tk liscense, the licesnse.txt file, and I guess that makes it LGPL? I'm not a lawyer, so don't ask me!

Once this script ends up on your machine I make no guarantees of any of its functionality. Currently all shown menus are functioning! It works on my machine and many others have reported much success and enjoyment :-). I have a DUAL P-233Mhz MMX, with 128Meg RAM running glibc2.1 Linux with Tcl/Tk8.0p2. (RedHat6.0).

Originally Tcl version 7.6 was used in conjunction with Tk 4.2 then I upgraded to Tcl/TK 8.0 and I have tested it under Tcl/Tk 8.1.1 under Windows 95. Lately I have added features which may not be available in versions earlier than Tcl/Tk8.0. So if you have problems and are not using 8.0 or later I can only suggest upgrading, sorry :-(. Tcl/Tk is free to use so why not get it from http://www.scriptics.com.

INSTALL

see the file INSTALL to install this program

KNOWN BUGS:

NONE! This is bug free software :-) AFAIK they have all been fixed. 
If you find one please report it.

It should work on any platform that has the Tcl/Tk libs, but was designed for Linux.

KNOWN ISSUES:

See the known issues file. These are 'bugs' that are known, but bugs in 
the OS or implementation of Tcl/Tk.

TODO: Print Setup may be inhanced to let a user decide which output file to temporarily write to? Currently it is /tmp/tkpadtmpfile. Maybe add print to Windows.

NOTES on COMPLETION:

As of the release of version 0.4.9 Tk NotePad was considered to be done.
Work will be done on improving the program, by cleaning up the code. 
So don't expect any new features except maybe the addition of a menu when 
a user right clicks the mouse button in the text area (almost done). 
Version 0.5.0 was released adding white to the text widget as the default 
color as this was recommended by Linux Journal March 1999, Issue #59. I have 
added in -fg color -bg color as well. There have been mainly only code 
clean ups since 0.5.0 and some more 'configurability.' I have added 2 more 
options in 0.6.5 -p and -f. The -p option allows one to pipe info into 
tknotepad at the command line, e.g. ps -aux|tknotepad, will open tknotepad 
with the output of ps -aux. That functionality is thanks to Jorn Poulson. 
The args handling has been rewritten for the -f option which 'forks' a new 
Tk NotePad, so a command like tknotepad file1.txt -f file2.txt -f file3.txt 
would open 3 instances of Tk NotePad each with a seperate file.
In version 0.6.9 I introduce 'feature' patches. These are file that can be
added to the end of the tknotepad script itself to add special requested 
features. See the INSTALL file for more info on those. Thanks to Scott Laufer for
 	the new window patch.

CHANGING SOME DEFAULTS

1) To change the default Print Command look for the line
	set printCommand lpr
and change to whatever you need or want.

2) To change the font for the text are change the "textFont" variable at
the top of the script. 

3) To change the font for the menu are change the "menuFont" variable at
the top of the script. 

4) To change the default geometry change the line 
	wm geometry . 80x25
and change the 80x25 to whatever size you like

WindowMaker NOTE: In windowmaker the window bindings may interfear with application binding, so this is just an FYI. In my case the Atl-H of window maker is bound to the hide functionality.

NOTE: It works on Windows, but BETTER on Linux!

from https://github.com/joseph-jja/tknotepad

Tcl-Websh


https://tcl.apache.org/

Websh is available from
http://tcl.apache.org/websh/

Contents
--------

    1. Introduction
    2. Documentation
    3. Compiling and installing Websh (Unix)
    4. mod_websh: Websh as Apache Module (Unix)
    5. Compiling and installing Websh and mod_websh (Windows XP)
    6. Support


1. Introduction
---------------

Websh is a rapid development environment for building powerful and
reliable web applications. It is a standard Tcl extension and is
released as Open Source Software. Websh is versatile and handles
everything from HTML generation to data-base driven one-to-one page
customization. At Netcetera, we have been using it for years for
virtually all our customer projects, which typically are E-commerce
shops or electronic banking applications.

Websh was originally developed by Netcetera AG, Switzerland and was
contributed to the Apache Software Foundation in 2001.

Find more information about

- Apache:                      http://www.apache.org/
- Websh:                       http://tcl.apache.org/websh/
- Netcetera AG, Switzerland:   http://netcetera.ch/
- Tcl:                         http://tcl.tk/


2. Documentation
----------------

Documentation is available at

        http://tcl.apache.org/websh/


3. Compiling and installing Websh (Unix)
----------------------------------------

Please note that we use some GNU make extensions, so make sure that 
you try to compile Websh using a GNU version of make (or gmake) when
compiling under UNIX.

Websh is a pure Tcl extension, Tk is not required. You need
Tcl8.3 or newer to compile and install Websh 3.6.

typically:

  cd unix
  autoconf
  ./configure
  make
  make test
  make apachetest
  make install

Make will create three targets: websh3.6.<patch>, which is the standalone 
Websh application (dynamically linked to Tcl and libwebsh3.6.<patch>.so)
and libwebsh3.6.<patch>.so, which is a TEA (Tcl Extension Architecture)
compliant shared object that can be dynamically loaded from within Tcl
using [load libwebsh3.6.<patch>.so]. Both provide the Tcl package
websh. The third target is  mod_websh3.6.<patch>.so (also dynamically
linked to Tcl and libwebsh3.6.<patch>.so), which is the Websh Apache
module.

If you have several versions of Tcl and Apache installed on your system,
you might want to specify which one should be used for Websh, e.g.

  ./configure --with-tcl=/usr/local/tcl8.4.19 \
      --with-httpdinclude=/usr/local/httpd-2.0.63/include

Note that to compile mod_websh for Apache 2, the corresponding Tcl
library must be compiled using threads and threads should be enabled
for Websh:

  ./configure --enable-threads

By default, Websh is installed to /usr/local
To change this location, provide the --prefix option to configure:

  ./configure --prefix=/opt


4. mod_websh: Websh as Apache Module
------------------------------------

Websh applications can both run in CGI mode and in mod_websh, the
module for Apache 1.3 to Apache 2.2. In order to build mod_websh,
you have to use the following configure option:

  --with-httpdinclude=/path/to/apache/header/files

For Apache 2, you need to enable threads additionally:

  --enable-threads

After this,

  make mod_websh.so

will compile and build mod_websh. Note that mod_websh3.6.<patch>.so will
also be compiled by default when 'make all' is invoked.

In order to use mod_websh in your Apache web server, please refer
to the file doc/mod_websh/README

A sample setup to serve SSI-type HTML with Websh-snipplets and CGI-type
scripts is found in doc/mod_websh and will be installed with the 
'make install' command.


5. Compiling and installing Websh and mod_websh (Windows XP)
------------------------------------------------------------

Websh currently provides a Makefile for Microsoft Visual Studio 6.0 nmake.

Please refer to the file src/win/README for details.


6. Support
----------

For support please try the following mailing list on tcl.apache.org:

  websh-user@tcl.apache.org

You may subscribe by sending mail to websh-user-subscribe@tcl.apache.org.

If you would like to contribute to websh, please subscribe to:

  websh-dev@tcl.apache.org

by sending mail to websh-dev-subscribe@tcl.apache.org.

In addition, Netcetera is committed to provide additional support for Websh.

You can reach us at

  support@websh.com

and

  info@websh.com


from https://github.com/apache/tcl-websh

Wednesday, 1 June 2022

socket-chat-tcl-tk

Simple multi-client chat example using tcl/tk,

Run Server

tclsh server_tcl.tcl

Run Client

wish client_tk_gui.tcl

alt text

from https://github.com/darshanz/socket-chat-tcl-tk

Wapp

 Wapp is a framework for writing web applications in TCL.

static

This adds the ability to serve static content using fcopy without reading the entire file into memory first. This might undermine some of the deliberate security of wapp, but some care was taken. Feedback regarding security welcome.

thread

Refactor file delivery to allow the file content to be deivered by a new thread. One for each file. This makes the service about 30% faster when displaying a page full of large jpegs.

routes

Boiler plate generator for unpacking route path values and wapp-params into local variables in a page handler.

From lego12239/wapp

This is a fork of original wapp from D. Richard Hipp with some changes:

  • support of PUT, PATCH, DELETE http methods;
  • fix cookies parsing(make parsing more rfc6265 compliant, but be more liberal to cookie value, allowing any chars except dquote in a quoted value and any char except semicolon in a nonquoted value);
  • throw error on bad cookie value set;
  • -server option accepts a listen address in plan9 format: tcp!ADDR!PORT or tcp!ADDR!0 or tcp!ADDR or ADDR. If PORT isn't specified or 0, then the first not used port is selected. If ADDR is 0.0.0.0, then listen on wildcard address;
  • fix request target parsing(make parsing more rfc3986 compliant);
  • fix request header name-value parsing(make parsing more rfc7230 compliant);

For documentation look https://wapp.tcl.tk/home/doc/trunk/README.md .


from https://github.com/lego12239/wapp