Create a Twitter Archive – A PDF dump of all tweets from an account

I have 51 tweets in my @SubhashBrowser account. So, this command will create the Twitter dump.

bash twitter-to-pdf.txt SubhashBrowser 51

Subhash TweetsToRSS must be running when you execute this command. You also need wkhtmltopdf and pdftk installed. The content of twitter-to-pdf.txt is as follows:

# Initialize variables
iPage=1
iMax=1
iRemainder=0
sDocs=""

let "iMax = $2 / 25"
let "iRemainder = $2 % 25"
if [ $iRemainder -gt 0 ]; then
  let "iMax = iMax + 1"
fi

sJavaScript = 
	"(function(){ " + 
	"  var arIframes=document.getElementsByTagName('iframe');" +
	"  var n = arIframes.length; " + 
	"  for (var i=0;i<n;i++) { " + 
	"  arIframes[0].parentElement.removeChild(arIframes[0]); " +
	"}})()" # Javascript to remove YouTube iframes generated by TweetsToRSS

# Create archives
for (( iPage=1; iPage<=iMax; iPage++ ))
do
  echo "Converting http://localhost:8080/?q=%40$1&output=html&older-than=$iPage"
  wkhtmltopdf --quiet \
              --encoding utf-8 \
              --debug-javascript --javascript-delay 60 --run-script "$sJavaScript" 	\
              --user-style-sheet wkhtml_twitter_style.css \
              --image-dpi 300 -s A3 \
              --margin-top 0 --margin-right 0 --margin-bottom 0 --margin-left 0 \
              "http://localhost:8080/?q=%40$1&output=html&older-than=$iPage" \
              "@$1-archive-$iPage.pdf"
  sDocs="$sDocs @$1-archive-$iPage.pdf"	 					  
done

# Combine archives
pdftk $sDocs cat output Complete-Twitter-Archive-of-@$1.pdf

# Updated metadata
echo "InfoKey: Creator" > $1-meta.txt
echo "InfoValue: Subhash TweetsToRSS (www.vsubhash.com)" >> $1-meta.txt
echo "InfoKey: Title" >> $1-meta.txt
echo "InfoValue: The complete Twitter archive of @$1" >> $1-meta.txt
echo "InfoKey: Subject" >> $1-meta.txt
echo "InfoValue: Collection of all tweets from @$1" >> $1-meta.txt
echo "InfoKey: Author" >> $1-meta.txt
echo "InfoValue: V. Subhash" >> $1-meta.txt
echo "InfoKey: Keywords" >> $1-meta.txt
echo "InfoValue: $1, twitter, tweets, archive" >> $1-meta.txt
pdftk Complete-Twitter-Archive-of-@$1.pdf \
      update_info $1-meta.txt \
      output The-Complete-Twitter-Archive-of-@$1.pdf

# Cleanup
mkdir $1-backup
if [ -d $1-backup  ]; then
	mv @$1-archive-*.pdf ./$1-backup
	mv Complete-Twitter-Archive-of-@$1.pdf ./$1-backup
	mv $1-meta.txt ./$1-backup
fi
All 51 tweets from my @SubhashBrowser has been dumped into a PDF archive.

All 51 tweets from my @SubhashBrowser has been dumped into a PDF archive.

Twitter seems to have placed a limit of just above 3000 to the number of tweets you can pull from an account. Here is the complete Twitter archive of US President Donald J Trump (@realDonaldTrump).

https://www.scribd.com/document/337137738/The-Complete-Twitter-Archive-of-Donald-J-Trump-RealDonaldTrump-2016-2017

Posted in software | Tagged , , | Leave a comment

Tourist spots in and around Palakkad

Palakkad Fort

This was right in the middle of the city and so was easy to check out. It was used by Hyder Ali and his son Tipu Sultan. It was later taken over by the British. For a tourist, the Palakkad fort may be a disappointment. It is on flat ground and the ramparts around the fort are not very imposing. Like true Indians, visitors have left their mark on the walls. It covers considerable real estate right in the middle of the city and currently houses a jail and an office for the civil supplies department. The fort is also a venue for cultural events. The often-hyped-up Hanuman temple is in reality a very small shrine.

Tipu's fort in Palakkad City

Tipu’s fort in Palakkad City

Malampuzha Dam

This dam is some distance from the middle of the city. It has a large park, a ropeway, a snake park, an aquarium and a boating area. The dam is very high and stores water for the city. Best time to visit would be after 4 o’ clock.

Malampuzha dam

Malampuzha dam

There is a hilltop cottage for those who would like to stay longer than an evening visit. I expect the sunsets or sunrises to be great. The ropeway goes from one end of the dam, across the park and boating area, and then back again. The aquarium and the snake park on the sides of the park have very good specimens. I was surprised to find a fish called Miss Kerala. There is also a government-run shop that sells forest produce generated by tribal communities. I bought some honey and it tastes great.

Park and waterway near the dam

Park and waterway near the dam

The boating area is accessible from the park via a suspension bridge. As you get off the bridge, there is a huge nude Yakshi statue. It is impossible for kids to avoid the Yakshi as the bridge bobs a lot and demands parents’ attention. Ancient Indians did not create such huge eyesores. Our temples have nudes but you barely notice it.

Nude Yakshi statue drying her hair, possibly.

Nude Yakshi statue drying her hair, possibly.

Kava

Malampuzha has several other privately-run man-made attractions around it. However, Kava is different. Thanks to wooded and winding roads to this area, the drive from and to Kava is just great. Interestingly, the moment I landed near the spot, an old woman asked me for a lift. I took her all the way to Anakkal. The return journey had even better scenery. Palakkad is at sea level while Kava is at a high altitude. Here rain clouds are crashing the hills all the time, even as Palakkad remains bone-dry. When I was there, the skies were rumbling continously and was sounded spectacular. Surprisingly, the place has been spared of any man-built structures. Most people simply drive to the waterfront. Buses halt on the side of the road. Except for some cows, goats and shepherds, the place is usually empty.

Malamapuzha map showing route to Kava

Malamapuzha map showing route to Kava

Posted in travel | Tagged , , , | Leave a comment

Subhash Browser & Feed Reader v2016.12.12 released

This update contains numerous fixes and aesthetic improvements.

http://www.vsubhash.com/article.asp?id=126&info=Subhash_Browser_Feed_Reader_app

image

Posted in news, software | Tagged | Leave a comment

RSS feeds of popular Indian newspapers and magazines

The mobile version of newspaper websites do not provide links to their RSS feed. So, use the browser disguise option of Subhash Browser to browse these web pages.

This website has collected RSS feeds of almost all Indian news sources.
http://newsrack.in/extras/known-indian-feeds

Posted in technology | Tagged | Leave a comment

Email Tweetor app for Android has been updated with new option to reply to another tweet

The new updated can be downloaded from:
http://www.vsubhash.com/article.asp?id=133&info=EmailTweetor_app_for_Android

Left-turned arrow icon can be used to specify the URL of a tweet to which the current tweet can be a reply.

Left-turned arrow icon can be used to specify the URL of a tweet to which the current tweet can be a reply.

Here is an example of a Twitter message posted by EmailTweetor. It is a reply to another Twitter message specified using the new dialog option.

Posted in software | Tagged , | Leave a comment

Subhash Browser & Feed Reader v2016.11.20 for Android supports un-minified user JavaScript files

Earlier, user JS files had to be minified, which made the JavaScript files unreadable and non-debuggable. Now, Subhash Browser will automatically remove newlines & carriage returns before executing the script in the files. (My article on User JavaScript is available on CodeProject.)

You don't have to convert your Javascript files to minified bookmarklets. Subhash Browser will automatically minify the code before executing them.

You don’t have to convert your Javascript files to minified bookmarklets. Subhash Browser will automatically minify the code before executing them.

The built-in file explorer will bring a dialog to choose from all supported apps when a file is launched. The file explorer has new filters for audio and video files.

Note the new filters for audio and video files in the file explorer of Subhash Browser & Feed Reader for Android.

Note the new filters for audio and video files in the file explorer of Subhash Browser & Feed Reader for Android.

 

The download manager screen can be accessed from the main screen using a secret gesture – move the device away from you, i.e., in the z-axis.

 

https://twitter.com/SubhashBrowser/status/800173501403402240

Posted in software | Tagged | Leave a comment

Use environment-friendly soaps, not detergents

In a previous blog post titled How to make lye soap, I had mentioned that bathing soaps can be made at home. Recently, while shopping in a moffusil area in Kerala, I stumbled upon laundry soap brands.

When I was very young, most households used laundry soaps. Detergent cakes and powders were just growing in popularity. Karsanbhai’s Nirma revolution (inexpensive detergents made out of by-products of IPCL) was yet to take off. Soaps such as the famous 555 came in one long bar, which could be broken off into handy smaller pieces.

What’s the difference? Aren’t detergents and soaps the same? No. Soap is made out of natural oils while detergents are made from petrochemicals.

Washing with soaps involved considerable physical effort – heavy rinsing and beating the clothes over a flat stone surface. Unlike soaps, detergents came with huge mixture of additives that eliminated all that. You just soak the clothes for 15 minutes and with some light rinsing everything became clean. It did not form scum like soap and worked well with hard water. Vegetable oils are anyway expensive while petroleum byproducts was dirt-cheap. Over time, detergents replaced soaps in popular use. However, detergents are not environmental friendly. The by-products of detergents washing cannot be broken down. It pollutes the groundwater. Many detergents come with protein-dissolving enzymes which will destroy skin & tissues if used for manual washing that is not in a washing machine. Perfumes used in detergents are also harmful.

Laundry soaps are still being manufactured as a cottage industry by Khadi and rural self-help groups. They are not expensive either. Don’t be a baby if you don’t see bubbles. These soaps can clean clothes all right.

Two washing "soap" brands available in mofussil areas of Kerala.

Two washing “soap” brands available in mofussil areas of Kerala.

Posted in history, technology | Tagged , , | Leave a comment