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

Thursday, April 19, 2012

TclText - ticklish text editing by tony

Before I started using real hosting, with ssh access and vim on the server end, I managed my sites by writing them at home and uploading over ftp. Now, while this could be done with sftp or scp and vim, for the longest time, and sometimes now still, I will manage such tasks with TclText, my gro0vy, ticklish text editor, in tcl/tk, with a built-in ftp tool, and many other features.

Image/photo

Here you see me editing http://www.baldwinlinguas.com with TclText

http://tonyb.us/tcltext
#tcl #tk #editor #web

via Friendica

Wednesday, April 11, 2012

Color Chooser

Image/photo

http://tonybaldwin.me/hax/doku.php?id=colorchooser

If you make websites, like I do, and you edit them in a real editor (i.e. vim), especially on a remote server over ssh, and not some atrociously convoluted, graphical "wysiwyg" monstrosity for writing web pages that creates bloated, nasty code, well, sometimes you need a hexcode for a color for your css style sheets, and stuff. What do you do?

For this purpose, I made ColorChooser, which is just a little gui tool for grabbing color codes.
Image/photo

Now, most of the work was really already done, tk having a color chooser tool, already. All I did was write a script to make it easy to call that tool up so you could find a color, then copy/paste the hex code to wherever you need it.
Image/photo

#tcl #tk #color #webdesign

@Foss Hackers @Lazy Admin

via Friendica

Wednesday, March 7, 2012

fren.tcl with SSL

I add an option in preferences for fren.tcl to post over a secure socket layer connection (ie, force use of SSL).
Pushed to git up, and new tarball available at http://tonyb.us/frentcl or http://tonybaldwin.me/downloads
#frentcl #ssl #tcl
via Friendica

tcl - ssl

bookmarking a couple of things to come back later and have a look.
fren.tcl may need a little tweaking to work with SSL.

So, here:
http://wiki.tcl.tk/9411 - SSL tunnel with tcl::http
http://www.sensus.org/tcl/tls.htm - TCL SSL commands

#tcl #ssl

I'm finding my fren.tcl posts aren't getting through since installing a certificate at https://free-haven.org
So, apparently, I need to look at this.
I am able to post with friendi.sh, but with curl -k only.

via Friendica

Sunday, September 25, 2011

Preview of Xpostulate Improvements

A preview of what's to come...


Thinking of UI enhancements, I added the Xpostulate little icon thingy right into the GUI.






What do you think?


Recently support has been added for Friendika, and other improvements have been made. I mentioned them elsewhere, but neglected to post to this blog. Support was removed for iziblog and inksome.net (both are non-existent now), and scribbd (spam haven). Support was added for custom wordpress installations.



Other items on their way:
  • Posterous support. I have interacted with the posterous api via bash with curl, so, just need to translate my scripting for that to tcl with http. Cake, but requires time. I thought I would have that done this past week, but, no joy...too much work (somebody's gotta pay the rent around here).
  • Blogger support. - The great and benevolent Google® has granted me an API key, and I have looked at the API, but not yet played with it, but this is likely to come this season...soon, me dro0gies.

  • Read your statusnet public timeline or updates from a specific person. This I have, again, done in bash, so just a matter of coding it into tcl. Although, I question if this is appropriate for Xpostulate, and whether it might not be better to do this with iDenTickles only, since iDenTickles is a microblogging client, and Xpostulate is intended for crossposting to blogs, not reading others' updates.

  • Download, edit, & republish older entries. This is on my todo list, but for each blogging service I have to look at how their API handles this, and then code stuff in, and develop new GUI elements for housing various functions, and blah, blah, blah. It will be work..heavy lifting...but it's on my TODO list.


posted with Xpostulate

Friday, May 21, 2010

iDenTickle version 1.1

Well...I just couldn't leave well enough alone.
Yesterday I released version 1.0 of IdenTickle, my tcl/tk denter/tweeter tool...but I just kept thinking, it could be better.
The interface could be cleaner, with the setup stuff separate.
And, perhaps an about button, as is common, to bring up a little dialog with a bit of info, and direct the user to the homepage.
Plus buttons to open your browser to your identi.ca or twitter feed...stuff like that.

So, today you have IdenTickle version 1.1.


The main interface.


and, when you open the setup tab/frame to enter your setup information.
As you'll recall, v 1.0 was already saving your login data (previous version required entry of said data, every time...annoying).

enjoy
./tony

Thursday, May 20, 2010

Iden.Tcl v 1.0 released

Moments ago, I released a new version of IdenTickle, the tcl/tk identi.ca and twitter status update tool..



Now it saves your login information, so you don't have to enter it every time.
Additionally, I built installers for Windows and Linux.
(Mac and BSD folks, etc., will still have to install from source...sorry).

Monday, April 12, 2010

Xpostulate v0.2

Xpostulate v0.2 - x-posting blog client in tcl/tk
I've made a ton of improvements and added various features to Xpostulate since posting here in reference thereto.

I've programmed in xml-rpc posting, and added Wordpress, Inksome, and Scribbld, so it now posts to LiveJournal, InsaneJournal, Dreamwidth, DeadJournal, Iziblog, and the above mentioned 3.

I've also customized the script running on my own machine, to post to my custom wordpress installation on baldwinsoftware.com/blog, which means I'll be able to write than in for users rather easily (not posting to MY blog, but to their own wordpress installations, of course).

I've also fixed the identi.ca denting and twitter tweeting to use Tcl's own HTTP library, rather than calling cURL. This facilitates installation and use on Windows, mostly, but also, it's good that now Xpostulate is completely, 100% tcl/tk, without calling outside resources to perform any of its functions.

Today I built install wizards for both Linux and Windows. This was probably hardly necessary for most Linux users, since the installer hardly does much different from the install.sh script (well, except the install.sh installs to /usr/local/bin, and, thus, must be run as root, while the installer can be run as users, installing to the user's /home). The Windows installer, however, will significantly simplify installation for Windows users.

Now, I still have to figure out the google api for posting to blogger, so I can post to this blogspto/blogger blog.
I'm also considering adding a feature for updating facebook status, as well...maybe sometime later this week.
I'm rather impressed with myself, I must say, being an old, creEpy guy with no computer classes or formal technology training. For me, Xpostulate is immensely useful, and, when I think that I programmed it, and that others are using it, too, well, I feel pretty smug and content with myself.
Sometimes I'm so awesome, I can't stand myself...
:P

Friday, March 26, 2010

eXp0stulate

I've decided to take the code from TclTherapy (insanejournal client), and TkLJ (livejournal client), and join them together, adding functionality for DreamWidth and deadjournal, as well.
I have successfully merged the code, and X-posted to three of the above mentioned blogging services (I don't have a deadjournal).



I'll be calling this new bit of hackery
"eXp0stulate",
since it x-posts.
I'd like to add wordpress and blogger funcationality (especially since THIS blog is on blogger), but I believe that will require my learning to get this thing to write out an xml file and play nice with the xml-rpc protocol, rather than just sending a flat entry via http post.
Not sure...either way, it's just a matter of time.

I also want to get it to download and edit older posts.
I have a full TODO list on the eXpostulate wiki page.

Monday, March 22, 2010

Python v. Tcl/Tk: denting & tweeting


So. I have now made two little denter/tweeter programs (to send updates to twitter.com and identi.ca), one with Tcl/Tk, the other with Python. I figured a little comparison, perhaps, was in order.
If you look at them, of course, they look, well, just about the same. Tkinter is, after all, analogous to Tk.

The Tcl/Tk program made it incredibly simple to display the response from the remote server, which I haven't succeeded in doing with the python script, yet. Both rely on calling an external program (curl) to send updates, rather than relying on the languages' built-in tools. I could probably work out HTTP POST in tcl rather painlessly. I did try to use python's urllib to post, unfruitfully, and resorted back to calling curl.


the code for both programs is available at the above wiki links

The Tcl/Tk program, which has the added feature of displaying the server response, has only 47 lines of code, 245 words, 1844 characters. It took me less than an hour to write it.
The Python program, however, which does precisely the same exact thing as the tcl/tk program, without displaying the server response, has 104 lines of code, 564 words, and 4073 characters. It took me the better part of a day to write it.

One must ask oneself, of course, is this a testament to the power and simplicity of tcl/tk? Or, is it simply an indication of my lack of skill with python?

I can't answer that defnitively, but, to me, it really looks like tcl/tk is a bit more efficient. Admittedly, I'm not a very skilled programmer at all, in truth. Timewise, of course, I have been writing tcl/tk for a couple of years, and only just now delving into python. As such, I was able to throw the tcl/tk program together quickly, while, my efforts to "translate" my tcl/tk program into python required a bit of research on the syntax for writing tkinter guis, and other elements. It just really looks to me as though Python/Tkinter takes a lot more code to do the same thing. I really have drawn that conclusion. Especially building a gui, it seems, is more cumbersome with tkinter than with simple, good old tcl/tk. I know there are other means of building a gui with python (wxwidgets, pygtk, pyqt, etc.), but I wanted to try the one most similar to that with which I am already familiar, and, I believe it is a fairer comparison when using a similar gui ToolKit.

At this juncture, I do have to say, I feel a great loyalty and deep affinity for tcl/tk. I don't understand why it isn't in wider use, frankly. It is an incredibly powerful language, used for a vast array of purposes, and, in my opinion, is probably the easiest programming language to learn (of course, I haven't tried them all), especially for a beginning programmer. One can be up and running, creating useful programs in a relatively short time. I also feel the need to give kudoz to the tcl/tk community and the tcl.tk wiki, which is replete tons of example code, detailed explanations, and great resources for learning how to program in tcl/tk. The tcl-ers that hang out at #tcl on irc.freenode.net, additinoally, are extremely helpful, and patient. They won't hold your hand, but they'll tolerate a newbie, and point them in the right direction, without any snobbishness or derision.

I can't say the same for my experiences with pythonistas. Their irc channel was a little less friendly, imho. Maybe I just caught them on a bad day, or maybe I was having a bad day. After all, Pythonistas are known for having a sense of humor. Admittedly, I was frustrated when I finally went to their channel for a bit of support, and frustrated, whiny n00b is no fun to play with, any way. Moreover, the python community does have a lot of documentation available online. Nonetheless, to me, it seems that it is written for other programmers, not for the uninitiated, so, is not so easily read as much of the tcl/tk resources. Their sample code is not well explained, where someone new to programming can really make sense of it. This may also be a function of time, since tcl/tk has been around a bit longer than python.

I do want to make it very clear: I'm really not here to pick on python. I know that it's a powerful language with a great many uses, and a favorite of a great many real hackers who know a lot more about programming than I do. I will continue to learn to write it, and believe it will serve me quite well for various purposes, and I believe I will continue to have fun learning it. But, I think I might continue to point out how tcl/tk is much easier and seemingly efficient, too...

Thursday, February 4, 2010

new hackery: hacking up a tcl/tk identi.ca client

Likely I will also make this work with twitter, since they operate on the same principles.
Anyway, started hacking up a tcl/tk identi.ca client.
Here are the very, infantile beginnings:


Code will be GPLed, of course.