Mar. 6th, 2012

tonybaldwin: tony baldwin (Default)
late night test post...



testing xposting from friendica do dw, lj, posterous, and tumblr from fren.tcl



#frentcl
tonybaldwin: tony baldwin (Default)
Image/photo



Okay, friends, I just pushed a new version of fren.tcl to github.



Also, I uploaded a tarball to http://tonybaldwin.me/downloads/frentcl-v0.2.tar.gz



Fren.tcl now allows for xposting to Livejournal, Dreamwidth, Wordpress, Posterous and Tumblr (as well as statusnet, facebook and twitter, which were already working).



see: http://tonyb.us/frentcl



This article was posted to my friendica profile and crossposted to my LJ, DW, posterous, tumblr and wordpress blogs!



#frentcl

friendi.sh

Mar. 6th, 2012 11:36 am
tonybaldwin: tony baldwin (Default)

I updated the friendi.sh bash script to post to friendica with bash, vim and curl, so it now includes the options for xposting to lj, dw, wp, posterous, and tumblr.



#!/bin/bash

# update friendica with bash, vim and curl
# I put this in my path as "friendi.sh"
# by tony baldwn, http://tonybaldwin.me
# on friendica at http://free-haven.org/profile/tony
# released according to the Gnu Public License, v.3

# first, create a post/update

filedate=$(date +%m%d%y%H%M%S)

# if you did not enter text for update, the script asks for it

if [[ $(echo $*) ]]; then
ud="$*"
else
vim $filedate.fpost
ud=$(cat $filedate.fpost)
fi

# now to see if you want to crosspost elsewhere
echo "For the following question regarding crossposting, please enter the number 1 for yes, and 0 for no."
echo "If your friendica has the plugins, and you've configured them, you can crosspost to other blogs and sites."
echo "friendica will even automatically change the bbcode to proper html for you."
echo "would you like to crosspost to "
read -p "statusnet? " snet
read -p "twitter? " twit
read -p "facebook? " fb
read -p "dreamwidth? " dw
read -p "livejournal? " lj
read -p "tumblr? " tum
read -p "posterous? " pos
read -p "wordpress? " wp

# now to authenticate
read -p "Please enter your username: " uname
read -p "Please enter your password: " pwrd
read -p "Enter the domain of your Friendica site (i.e. http://friendica.somesite.net, without trailing /): " url

# and this is the curl command that sends the update to the server

if [[ $(curl -u $uname:$pwrd -d "status=$ud&ljpost_enable=$lj&posterous_enable=$pos&dwpost_enable=$dw&wppost_enable=$wp&tumblr_enable=$tum&facebook_enable=$fb&twitter_enable=$twit&statusnet_enable=$snet&source=friendi.sh" $url/api/statuses/update.xml | grep error) ]]; then

# what does the server say?

echo "Error"
else
echo "Success!"
echo $ud
fi


For those that missed it, last night (really early this morning), I also pushed new code to github for fren.tcl, the graphical, tcl/tk program for doing the same stuff. This script is also in that repo.




#lj #dw #wp #posterous #tumblr #bash #vim #friendica

tonybaldwin: tony baldwin (Default)
Image/photo



I added a field to set title/subject in fren.tcl and moved things around a bit for aesthetic and ergonomical reasons.



I pushed to git, and will upload a new tarball to my site momentarily.



#fren.tcl

Profile

tonybaldwin: tony baldwin (Default)
tonybaldwin

December 2013

S M T W T F S
1234567
8 91011121314
15161718192021
22232425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags