tonybaldwin | blog

non compos mentis

Archive for the ‘news’ Category

America is Breaking Up! on Vimeo

leave a comment »

[object Window]

via America is Breaking Up! on Vimeo.

Advertisements

Written by tonybaldwin

December 9, 2011 at 3:57 pm

Posted in business, news, politics

Tagged with , ,

The Free Web

leave a comment »

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 a 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 you can view your content, so you have complete control over your privacy. Also, YOU own all content that you post. Diaspora* has not 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).

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.

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.

xposted with: Xpostulate | original article

¡Viva la FREE WEB!

leave a comment »

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

Written by tonybaldwin

October 4, 2011 at 10:10 pm

New York Observer: Exclusive "Occupy Wall Street" Unaired Fox Footage

leave a comment »

Written by tonybaldwin

October 3, 2011 at 8:13 pm

Posted in human rights, news, politics

Tagged with ,

Preview of Xpostulate Improvements

leave a comment »

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:

  • 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

Written by tonybaldwin

September 24, 2011 at 10:16 pm

Web Word Count

leave a comment »

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:

#!/bin/bash
# add up wordcounts for website

total=0 # initialize variable for total

# scan through a list of pages
# strip the html elements and count the words
# append the count to wordcount.txt

for i in $(cat pagelist.txt); do
     curl -s  $i |  sed -ne '{s/]*>//g;s/^[ \t]*//;p}' | wc -w >> wordcount.txt
done

# this is for purely aesthetic purposes, 
# but we're merging the list of pages with the wordcount file:
paste pagelist.txt wordcount.txt > pagewordcount.list

# for each number in the wordcount.txt file, add it to the previous number (get a total)
for t in $(cat wordcount.txt); do 
	total=$((total + $t))
done

# append the total to the end of the merged pagelist+wordcount file:
echo "Total word count = $total" >> pagewordcount.list

# read back the file:
cat pagewordcount.list

# ciao
exit

I ssh-ed to my server and did
ls -1 *.html > pagelist.txt
which lallowed me to feed the script this list.

baldwinlinguas.com/index.html
baldwinlinguas.com/esp.html
baldwinlinguas.com/fran.html
baldwinlinguas.com/port.html
baldwinlinguas.com/empregos.html
baldwinlinguas.com/transquote.html

So, then I ran the script on this list of the pages, and this is the output:

baldwinlinguas.com/index.html 535
baldwinlinguas.com/esp.html 342
baldwinlinguas.com/fran.html 295
baldwinlinguas.com/port.html 337
baldwinlinguas.com/empregos.html 662
baldwinlinguas.com/transquote.html 244
Total word count = 2415

So, it works. Someone with better bash fu could likely find a shorter path to this result.

Now, this is simple, of course, for a simple website, like baldwinlinguas.com.
On the other hand, if you have some huge wordpress installation, like this blog, and have tonso public php pages, rather than html, and eve more php files in the backend, you have to do a bit of sorting, I imagine.

Were I to attempt that with the baldwinsoftware wiki, I would probably just go to the Sitemap and grab that list of pages, using their URLs, of course.

./tony

Written by tonybaldwin

September 21, 2011 at 5:25 am

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

with one comment

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:

#!/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:

    #!/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

Written by tonybaldwin

September 20, 2011 at 10:31 pm