Moving!

I will be discontinuing posting this blog.

I will be moving all blogging activities to tonybaldwin.me/blog.

I am leaving GoDaddy (on which this blog is hosted), and moving to linode.com.

I have begun to rebuild all of my sites there, and have, so far, managed to build:

I am in the process of moving domains. Some are moved, some are pending completion of site builds on the linode. There are a few partial builds:

Currently, tonybaldwin.org also points to tonybaldwin.me. Shortly both tonybaldwin.info and tonybaldwin.net will, as well.

One advantage is that, rather than a whole bunch of disparate sites, at tonybaldwin.me, I will be unifying my web presence, largely. BaldwinLinguas.com, my real job site will remain distinct, however.

./tony

Tunages and Songwiches

tony's tunages

tony's tunages


For those who didn’t know, I am also a musician.

I have created a new web page to promote my music.

I started playing guitar at the ripe old age of 13 (nearly 30 years ag0, so you’d think I’d know what I was doing by now). My guitar playing is influenced by Jerry Garcia, Bruce Cockburn, James Taylor, The Edge, Peter Buck, Johnny Marr, and others. I enjoy music as far ranging as baroque to bluegrass, Swedish death metal to Gregorian chants, numerous forms of folk music, punk music, rock music, ambient electronic music, industrial, dubstep, and a thousand other varieties of music from around the world, etc. I just LOVE music!

Being the tinkerer I am with computers, I have also recently begun creating electronic music.

Elektronika

elektronika by tony-baldwin-1

It will come as no suprise to you that the above tunages were all created with free/open source software, especially LMMS – Linux MultiMedia Studio and Rosegarden (mostly lmms), on Debian GNU/Linux systems.

Akoustika

And here we have some acoustic music I have created over the years (plus one tribute to Jerry Garcia, played by me).

acoustika by tony-baldwin-1

¡Viva la FREE WEB!

the free web

A FREE, uncensored, neutral internet is ESSENTIAL to Free Expression and Freedom of Information.

VIVA LA FREE WEB

¡Viva la FREE WEB!

In recent times, we have seen governments restrict access to the internet. We’ve seen the huge, corporate owned social networking and microblogging sites censor content their investors do not like, and even remove accounts belonging to protesting entities, such as Twitter’s recent removal of the account for OccupyWallStreet, and Facebook’s censorship of protest related photos.

But, we need the internet to communicate, not just locally, but nation-wide, and world-wide, to express our views, to make our voices heard, and to share what it is we are doing, and how our oppressors react, EVERYWHERE…

To that end:

The decentralized, federated, FREE (as in freedom, as well as price), social networks on which I currently play are:

Diaspora*

Diaspora* is software that can be installed on a server by anyone that has the knowledge to do so. They in turn can allow people to register for an account on what is called their “pod”. There are many of these pods already established across the internet (list here podupti.me) with many users. You register for a free account on a pod and you can seamlessly connect with other users on other pods, the same as if you were making someone a friend on other social networking sites. No matter which pod you are on, you are all using Diaspora. If you have the technical skills, you can even set up your own pod for your family and or friends. They can in turn connect to family and friends on your pod or even other pods with ease.

Diaspora* has many of the features of other popular social networks, including groupings of friends (like G+ circles, but called “aspects”. Oh, and Diaspora* had this feature over a year before G+ was even launched!), sharing of photos, links, videos, etc. Diaspora will allow you cross-post materials to twitter, facebook, and tumblr, and allow you to connect to friends on Friendika, as well. The aspects give you great control over who can view your content, so you have complete control over your privacy. Also, YOU own all content that you post. Diaspora* has no advertisements, and nobody on Diaspora* is tracking you, either on the site or across the internet. Diaspora* will not censor your communications with others. Also, on Diaspora* you can use any name or pseudonym you like.

There are numerous Diaspora sites, but they are all connected, so contacts on any Diaspora site can be connected to folks on another Diaspora site.

Here is my Diaspora profile:

tonybaldwin@poddery.com

I recommend joining diaspora at poddery.com or diasp.org.

StatusNet

StatusNET is for microblogging (like twitter, and can forward updates to twitter) built on free/open source software. StatusNEt is uncensored, free, and you can roll your own. StatusNet has features that twitter lacks, including posting of longer “blog” entries, sharing of events, uploading photos and music files, creation of polls and questions, and cross-connections with folks on any other StatusNet site. Also, one can make their StatusNet updates forward to Twitter, thus sharing with twitter contacts and StatusNet contacts, simultaneously. One more great feature of StatusNet are groups. By posting updates with a certain tag, the messages are grouped, and one can choose to be a member of that group and follow conversations on that topic. For instance, on the statusnet installation at Free-Haven.org/status/, there is a group for Occupy New Haven, and any update with !occupynewhaven or !onh is posted to that group. So, statusnet is kind of like twitter on steriods. Much more powerful, many more features. It is also more configurable. Our statusnet installation, for instance, is set to accept updates with up to 200 characters, as opposed to twitter’s 140 (one can change this up to 500 characters). Like Diaspora*, statusnet does not track you, spam you with advertisements, censor you, or lay claim to your content.

There is a statusnet installation on free-haven.org at http://free-haven.org/status/ Check it out!
My profile is tonybaldwin@free-haven.org
From there, I am following friends from all around the world on http://identi.ca, http://parlementum.net, and a few other smaller, private StatusNet installations, who are also following me from those sites, and I have my updates forwarded to twitter, from whence they forward to Google Buzz, Tumblr, and Facebook. If any of those proprietary networks cut me off or censored me, my friends all around the world on http://identi.ca and http://parlementum.net would still see my updates, as would, of course, anyone on our installation, or any other StatusNet installation who chose to follow me.

One can even export updates from any statusnet site, group, or individual to an rss feed, or, one can follow an rss feed. I have my free-haven updates embedded on my free-haven wiki profile here. Also, I have all public updates to our statusnet installation embedded on the front page of this wiki here.

Friendika

Friendika

Friendika

But, best of all, in my opinion, is Friendika.

Friendika is decentralized and federated, but also allows you to connect to contacts on twitter, identi.ca, diaspora, facebook, and other sites, from friendika. I recommend Friendika most highly of all (although a combination of statusnet for microblogging and friendika is a good idea). Friendika has photo galleries, an event calendar, friend groups, and all the other functions you already use on other social networks. Like Diaspora* and StatusNet, Friendika does not track you, spam you with advertisements, censor you, or lay claim to your content.

Learn more about friendika at http://project.friendika.com/

The creator, Mike Macgrivin, is a friend (he was part of the team that developed Netscape Browser for AOL!). I have developed software to interact with the Friendika’s API, and may be developing some plugins.

My current friendika profile is http://frndk.de/profile/tony

Comparison of Social Networks

In Diaspora, StatusNet, and Friendika, unlike FB, G+, and other sites, you own your own data, and completely control your own privacy. The sites are not corporate owned, and, in fact, if you have access to a server and the know-how, you can install and run a site yourself (kind of like you can with wordpress, joomla, etc.), and still connect to all the other friendika and/or diaspora sites. In this way, a truly FREE, open, neutral internet is forming, uncensored and unfettered by corporate interests.

Here is an excellent breakdown of the differences and similarities in social networks.
You will see that Friendika is richer in features than any other.

./tony


Creative Commons License
The Free Web by tony baldwin is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Based on a work at www.tonybaldwin.info.

page created with: tclext

New York Observer: Exclusive “Occupy Wall Street” Unaired Fox Footage

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?

Other items on their way:


posted with Xpostulate

Web Word Count – count the words on a website with bash, lynx, curl, wget, sed, and wc

Web Word Count: Get the word count for a list of webpages on a website.

A colleague asked what the easiest way was to get the word count for a list of pages on a website (for estimation purposes for a translation project).

This is what I came up with:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
 
# get word counts and generate estimated price for localization of a website
# by tony baldwin / baldwinsoftware.com
# with help from the linuxfortranslators group on yahoo!
# released according to the terms of the Gnu Publi License, v. 3 or later
 
# collecting necessary data:
read -p "Please enter the per word rate (only numbers, like 0.12): " rate
read -p "Enter currency (letters only, EU, USD, etc.): " cur
read -p "Enter domain (do not include http://www, just, for example, somedomain.com): " url
 
# if we've run this script in this dir, old files will mess us up
for i in pagelist.txt wordcount.txt plist-wcount.txt; do
	if [[ -f $i ]]; then 
		echo removing old $i
		rm $i
	fi
done
 
echo "getting pages ...  this could take a bit ... "
 
wget -m -q -E -R jpg,tar,gz,png,gif,mpg,mp3,iso,wav,ogg,ogv,css,zip,djvu,js,rar,mov,3gp,tiff,mng $url
find . -type f | grep html > pagelist.txt
 
echo "okay, counting words...yeah...we're counting words..."
 
for file in $(cat pagelist.txt); do 
	lynx -dump -nolist  $file | wc -w >> wordcount.txt
done
paste pagelist.txt wordcount.txt > plist-wcount.txt
 
echo "adding up totals...almost there..."
total=0
for t in $(cat wordcount.txt); do
	total=$((total + t))
done
 
echo "calculating price ... "
price=`echo "$total * $rate" | bc`
 
echo -e "\n-------------------------------\nTOTAL WORD COUNT = $total" >> plist-wcount.txt
echo -e "at $rate, the estimated price is $cur $price
------------------------------" >> plist-wcount.txt
 
echo "Okay, that should just about do it!"
echo  ------------------------------- 
sed 's/\.\///g' plist-wcount.txt > $url.estimate.txt
rm plist-wcount.txt
cat $url.estimate.txt
echo This information is saved in $url.estimate.txt
exit

So, then I ran the script on my site, tonybaldwin.net, with a rate of US$012/word, and this is the final output:

—————————————-
tonybaldwin.net/log/archives/environment/index.html 38
tonybaldwin.net/log/archives/cuisine/index.html 38
tonybaldwin.net/log/archives/music/index.html 52
tonybaldwin.net/log/archives/philosophy/index.html 38
tonybaldwin.net/log/archives/nanoblogger-help/index.html 52
tonybaldwin.net/log/archives/2011/09/11/911/index.html 322
tonybaldwin.net/log/archives/2011/09/index.html 774
tonybaldwin.net/log/archives/2011/09/01/mit_intro_to_cs_and_programming_assignment_1/index.html 494
tonybaldwin.net/log/archives/2011/08/26/come_on_irene/index.html 382
tonybaldwin.net/log/archives/2011/08/26/welcome_to_nanoblogger_3_4_2/index.html 289
tonybaldwin.net/log/archives/2011/08/26/here_we_roll_again/index.html 618
tonybaldwin.net/log/archives/2011/08/27/couldnt_stand_the_weather/index.html 93
tonybaldwin.net/log/archives/2011/08/index.html 1205
tonybaldwin.net/log/archives/2011/index.html 133
tonybaldwin.net/log/archives/technology/index.html 56
tonybaldwin.net/log/archives/politic/index.html 38
tonybaldwin.net/log/archives/religion/index.html 38
tonybaldwin.net/log/archives/art/index.html 38
tonybaldwin.net/log/archives/index.html 85
tonybaldwin.net/log/archives/personal/index.html 65
tonybaldwin.net/log/archives/health/index.html 38
tonybaldwin.net/log/articles/about/index.html 671
tonybaldwin.net/log/index.html 2027
tonybaldwin.net/log.1.html 2027
tonybaldwin.net/index.html 96
tonybaldwin.net/social.html 82

———————————————–
TOTAL WORD COUNT = 9789
at 0.12, the estimated price is USD 1174.68
———————————————–

Now, this is simple, of course, for a simple website, like tonybaldwin.net, which is largely all static html pages. Sites with dynamic content are going to be an entirely different story, of course.

The comments explain what’s going on here, but I explain in greater detail here on the baldwinsoftware wiki.

Now, if you just want the wordcount for one page, try this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
    #!/bin/bash
 
# add up wordcounts for one webpage
 
if [[ ! $* ]]; then
    read -p "Please enter a webpage url: " ur
else
    url=$*
 fi
 read -p "How much to you charge per word? " rate
 count=`lynx -dump -nolist $url | wc -w`
 price=`echo "$count * $rate" | bc`
 echo -e "$url has $count words. At $rate, the price would be US\$$price."
 exit

Special thanks to out to the Linux 4 Translator list for some assistance with this script.

Enjoy!

./tony

Post to Posterous with bash, curl and vim

Here we have a nifty little script to post to posterous.com from the bash terminal with vim and curl.

#!/bin/bash
# post to posterous from bash cli with curl
# I could do this with read -p "Enter ur username d0od: " username
# kind of thing, but I just hardwired my info in.
# edit accordingly for your info.
username=YOUR_USERNAME
password=YOUR_PASSWORD
apitok=YOUR_API_TOKEN 
 
# creates a date stamp for naming the post file
filedate=$(date %m%d%y%H%M%S) 
 
# set post title 
read -p "Enter a post title: " ptitle 
 
# write post in vim
vim $filedate.ppost pbody="$(cat $filedate.ppost)" 
 
# send post to posterous with curl
if [[ $(curl -X POST -u $username:$password -d "api_token=$apitok" -d "post[title]=$ptitle" -d "post[body]=$pbody" http://posterous.com/api/2/sites/1814977/posts | grep error) ]]; then
echo "Too bad, do0d...FAIL!"
else
echo "Success! Posted to Posterous!"
fi 
 
# moved post to dir for safekeeping.
# you can use different dir, d00d
mv $(pwd)/$filedate.ppost ~/Documents/fposts/ 
 
# open a browser for a look-see?
read -p "Shall we have a look in your browser now? (y/n): " browse
 
if [ $browse = "y" ]; then
	xdg-open http://$username.posterous.com/
fi
 
exit

Here is first post made with this script to my posterious. In truth, however, I do not use posterous, really. I will be using this information to add posterous support to Xpostulate before the week is out, however, per a user request. The experimentation with curl was to get my head around their API and posting procedure.

Here is the relevant wiki page for this script.

enjoy…

./tony


posted with Xpostulate.

New Xpostulate release in the works

Okay, I just pushed new code for Xpostulate to github with the following changes:

all in ONE DAY! because I F–KING ROCK!

I have NOT updated the win/lin installers on the main Xpostulate page, yet.
I have to play with installjammer and get those worked up again, and will probably give a day or two for this new code to be tested,
since, it seems, I now have a contributor on the project who seems willing to test and prod this code.

WELCOME ABOARD, Charles Roth!

Still to do:

Now, I really must get back to translating these Brazilian pharma regulations.

Fren.Tcl and Frendi.Sh

Friendika

Friendika

So, those who know me know that I’ve been playing on Friendika, a decentralized, federated, free/open source, privacy protecting, and, well, pretty amazing Social Networking application.

Friendika is pretty awesome in various ways, including, first, you have complete control over who can or cannot see your content.  You own your content and your privacy is completely yours to control.  Also, you can follow contacts from many other networks, including twitter, any status.net installation, Diaspora and Facebook, plus rss feeds, even, so, it becomes sort of a social networking aggregator.  Not only that, but it has friend groups similar to Diaspora Aspects or Google+ Circles.  These groups are very handy.  I follow my Diaspora and Facebook contacts, plus my identi.ca contacts, plus a large number of twitter accounts on my friendika, and have them grouped into local friends, family, haxors (fellow foss hackers, tech blogs, etc.), friends (not local, people I met online), tradus (translation colleagues, work related, polyglots), and one more group for news which includes mostly twitter feeds from a number of news outlets (Al Jazeera, BBC, NPR, Alternet, etc.).  So, it has really helped me to organize my social networking.

So, these past couple of days I, being the geek that I am, have been playing with means of posting to Friendika remotely, first from the bash cli.  Now, I had posted earlier a quick-n-dirty update type script, but I have one now that will toggle cross-posting to various other services (statusnet, twitter, facebook), and will open an editor (vim) to allow you to write longer posts.  I posted it on the wiki here, but will also include the code in this post:

#!/bin/bash
 
# update friendika from bash with curl
# I put this in my path as "frendi"
 
# here you enter your username and password
# and other relevant variables, such as whether or not
# you'd like to cross post to statusnet, twitter, or farcebork
 
read -p "Please enter your username: " uname
read -p "Please enter your password: " pwrd
read -p "Cross post to statusnet? (1=yes, 0=no): " snet
read -p "Cross post to twitter? (1=yes, 0=no): " twit
read -p "Cross post to Farcebork? (1=yes, 0=no): " fb
read -p "Enter the domain of your Friendika site (i.e. http://friendika.somesite.net): " url
 
# if you did not enter text for update, the script asks for it
 
if [[ $(echo $*) ]]; then
	ud="$*"
else
	read -p "Enter your update text: " ud
fi
 
# and this is the curl command that sends the update to the server
 
if [[ $(curl -u $uname:$pwrd  -d "status=$ud&statusnet_enable=$snet&twitter_enable=$twit&facebook_enable=$fb"  $url/api/statuses/update.xml | grep error) ]]; then
 
# what does the server say?
 
	echo "Error"
else
	echo "Success!"
	echo $ud
fi
 
# this next is optional, but I made a dir in ~/Documents to keep the posts.
# You can comment it out, you can change where it is storing them (the dir path)
# or, even, if you don't want to save the posts (they will pile up), you could
# change this to simply
# rm $filedate.fpost or rm -rf *.fpost, or some such thing.
 
mv $filedate.fpost ~/Documents/fposts
exit

But I have also now written a graphical application in tcl/tk to write posts to Friendika, Fren.Tcl

Fren.Tcl

Fren.Tcl - tcl/tk Friendika posting application

Find me on Friendika here.

./tony

FireSSH – Firefox ssh addon = AWESOME!

This, me droogies, is one of the coolest browser extensions EVER!

Editing a webpage with vim over ssh with FireSSH in Iceweasel 5.0
Editing a webpage with vim over ssh with FireSSH in Iceweasel 5.0

FireSSH is a Firefox plugin (also compatible with iceweasel, mis compañeros debianistas), written entirely in javascript, that runs an SSH terminal IN your browser, allowing you remote access to your webserver or other machine.

After using tony