A lot of people have been using TwitteyBot to schedule tweets easily by text uploading files.The application has turned out to be a useful tool to use twitter as a social marketing platform.
A few days ago,I got a feature request to morph the application to publish to blogger instead of twitter. Keeping the basic infrastructure the same, I could modify the Task Servlet to send an email to the secret blogger id to post using Mail2Blogger. The associated data objects were also changed. Though some data object like the blog account was not really required, I left it there as a change would make bringing changes from twitter bot in the future, harder.
The final change was for the twitter OAuth page. Instead of the OAuth page, the user is now redirected to a simple page where the blogger email id is entered.
The email sent to blogger was via the Google App Engine Mail API as text/html which allows images in the blog posts.
The code is available at http://code.google.com/p/csv2blogger/. If you would like an instance of the application to automate blog posts just like you schedule tweets, drop me a line and I could help you with a dedicated instance of the application.
My Website - Some Gotchas
My last post was about the things that I had done to get my website, http://nparashuram.com, running. I thought that I should dedicate a post to write about the interesting problems that I encountered while building it, so here it is.
Anchors as block level elements
On firefox, the articles page looks bad at times. I noticed that the divs inside the anchor tags break out and are displayed as siblings to the anchor tag. Once the page is refreshed, the layout falls in place. Hence, I have removed all the blocks on that page as anchors and made them divs, losing the "links" in the process.
Order of audio tag source
I recorded the audio using Windows sound recorder and converted it to OGG and MP3 using Super and VLC. I noticed that the VLC-OGG did not play on Firefox, but worked well on Opera and Chrome. Though Chrome plays Oggs, Super-OGG did not work on Chrome. Hence, I added the MP3 source before the OGG for chrome to pick up the former. Firefox and Opera ignore the MP3 and play the OGG. For IE, I just opened the mp3 file in a new window that would trigger the default action for such files.
Box Shadows
Box and text shadows combined with opacity can lead to some cool effects, like the garage door on the projects page. However, I noticed that the though the animation is very smooth on Chrome, it is jittery on Firefox. For IE9, it is even worse, leaving lines as it animates. I had to add an IE specific CSS to remove box shadows for IE9.
Microdata and SEO
Though there have been promises that Microdata will show up as special snippets in search engines, I have not seen it happen. Sticking to good old title and opening lines looks like the way to go for now.
Anchors as block level elements
On firefox, the articles page looks bad at times. I noticed that the divs inside the anchor tags break out and are displayed as siblings to the anchor tag. Once the page is refreshed, the layout falls in place. Hence, I have removed all the blocks on that page as anchors and made them divs, losing the "links" in the process.
Order of audio tag source
I recorded the audio using Windows sound recorder and converted it to OGG and MP3 using Super and VLC. I noticed that the VLC-OGG did not play on Firefox, but worked well on Opera and Chrome. Though Chrome plays Oggs, Super-OGG did not work on Chrome. Hence, I added the MP3 source before the OGG for chrome to pick up the former. Firefox and Opera ignore the MP3 and play the OGG. For IE, I just opened the mp3 file in a new window that would trigger the default action for such files.
Box Shadows
Box and text shadows combined with opacity can lead to some cool effects, like the garage door on the projects page. However, I noticed that the though the animation is very smooth on Chrome, it is jittery on Firefox. For IE9, it is even worse, leaving lines as it animates. I had to add an IE specific CSS to remove box shadows for IE9.
Microdata and SEO
Though there have been promises that Microdata will show up as special snippets in search engines, I have not seen it happen. Sticking to good old title and opening lines looks like the way to go for now.
My Website - The new HTML5 look
I finally stole some time to give my website hosted at http://nparashuram.com a makeover. It may look marginally better, but the focus was more on technology this time. Some of the changes in the website include
I will also write a follow up post on the gotchas encountered during the entire process so follow this space.
And if you do not have a website, it may be time to make one - its easier than you think :)
- Semantic Tags: HTML5 semantic tags for most parts of the web page. There are headers, footers, sections and articles in the page now. Modernizr makes it work of IE too. The modernizr script is loaded using IE conditional comments to ensure that the newer browsers do no suffer the extra download.
- Microdata: I added hcard and itemprops to the appropriate sections. However, I am yet to see search engines utilize this data.
- SEO friendly: The earlier version of the site loaded content using Javascript. Though AJAX requests can be made crawlable, it it too much work given that the site has almost zero server side support. Hence, all pages are statically server and indexable.
- Domain Name: I finally configured the GitHub to use the CNAME file and redirect http://axemclion.github.com to http://nparashuram.com. There are problems due to this in shortened URLs of TrialTool pages and looks like there is no way around it.
- Jekyll templates: When I said that I had zero server support, I lied. I did use Github's builtin Jekyll support to add a basic skeleton (header, content, footer, etc) to all the pages. I tried creating dynamic pages with HTML templates, but more on that approach later.
- CSS Usage: CSS transitions, gradients, box shadows, text shadows using vendor pre-fixes when generously used. For IE, the filter property equivalents were used. I ensured that the page degraded gracefully in browsers that did not support these. I still need to nail the mobile browsers and plan to use media queries for that.
- HTML5 Video: What is a HTML5 if the videos are in flash. A lot of my projects had videos and I added iFrames from Youtube that would render HTML5 video or flash, depending on the browser capabilities.
- HTML5 Audio: The about page had a link next to my name that runs an audio clip on pronouncing my really long name, done with the audio tag. The mp3 file for Chrome/Webkit and ogg for Firefox and Opera run well.
- Performance: I also wanted to ensure the YSlow and PageSpeed give me decent results. All the javascript were at the bottom, but embedded in the page to remove that extra http request. Image tags have an src_defer instead of src for deferred loading. Some issues like CDN or cache could not be as I do not have control on the headers that are served.
I will also write a follow up post on the gotchas encountered during the entire process so follow this space.
And if you do not have a website, it may be time to make one - its easier than you think :)