Tag Archives: download

How to Set Wget Target Directory Tips, Tricks and Tutorials 12 JUN 2014

If I ever need to pull something down from a website while working on an Ubuntu Server instance, then without a doubt, wget is my go to guy. From the man pages:

GNU Wget is a free utility for non-interactive download of files from the Web. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies.

Wget is non-interactive, meaning that it can work in the background, while the user is not logged on. This allows you to start a retrieval and disconnect from the system, letting Wget finish the work. By contrast, most of the Web browsers require constant user’s presence, which can be a great hindrance when transferring a lot of data.

Wget can follow links in HTML, XHTML, and CSS pages, to create local versions of remote web sites, fully recreating the directory structure of the original site (recursive downloading). Wget can be instructed to convert the links in downloaded files to point at the local files, for offline viewing.

Wget has been designed for robustness over slow or unstable network connections; if a download fails due to a network problem, it will keep retrying until the whole file has been retrieved. If the server supports regetting, it will instruct the server to continue the download from where it left off.

So all in all, a VERY useful tool. The question being solved today is how to go about setting or specifying the target directory wget should be saving the downloaded files to. The short answer is that in the strictest sense you can’t – but you can specify a string prefix to add to all downloaded files, thereby allowing you to essentially set the wget target directory!

Again from the man pages:

-P prefix
--directory-prefix=prefix
Set directory prefix to prefix.  The directory prefix is the directory where all other files and sub-directories will be saved to, i.e. the top of the retrieval tree.  The default is . (the current directory).

In practice, if we want to download a file to /home/craiglotter then we would add -P /home/craiglotter/ to our command. In practice:

wget -P /home/craiglotter/ http://www.craiglotter.co.za/wp-uploads/image.jpg

The above would download the image.jpg file to /home/craiglotter/image.jpg.

Useful to know.

ubuntu black and orange logo

Related Link: http://manpages.ubuntu.com/manpages/trusty/man1/wget.1.html

WordPress: Force Contact E-mail before Allowing a File Download CodeUnit 25 SEP 2012

The other day one of the WordPress sites I was asked to help out on (http://www.portsevolution.com) needed a solution whereby they first needed to receive some contact details before allowing a reader to download an associated PDF file.

Digging around the WordPress plugin repository I came across a great solution in the form of a plugin by M&S Consulting, entitled “Email Before Download”, which basically combines the functionality of the excellent WordPress plugin “Contact Form 7” with that of “WordPress Download Monitor” to achieve the required functionality.

Taken from their official description: Email Before Download presents your users with a form where they submit information, like their name and email address, prior to receiving a download. This plugin integrates with the popular Contact Form 7 and WordPress Download Monitor plugins, allowing you to create any form you like and manage/monitor your file downloads. You can also export a list of users that have downloaded files from the plugin’s settings page.

As an option, you can configure Email Before Download to:

...

How to Install NetBeans 7.0.1 in Ubuntu 11.10 CodeUnit 23 NOV 2011

I quite enjoy using the free to use NetBeans as my PHP editor/IDE of choice, more info on which can be found at the offical website: http://netbeans.org/. This is a quick step through of how to install the latest stable version of NetBeans, i.e. 7.0.1, into your Ubuntu desktop.

Disappointingly, NetBeans isn’t included in the new fancy Ubuntu Software Center, so let’s just grab it as if we were using any old Linux installation. First, browse to the official NetBeans download page at http://netbeans.org/downloads/index.html

Select the IDE language and Platform you need NetBeans for (in this case obviously we need the Linux (x86/x64) version), and then select the initial supported technologies version you require from the download table. In my case I only need the PHP version, so I click on the 41 MB download under the PHP column.

Once the download of the .sh file is complete, open up a terminal and browse to your Downloads folder (In my case, the download was saved as netbeans-7.0.1-ml-php-linux.sh). Now to launch the install process:

sudo bash netbeans-7.0.1-ml-php-linux.sh

After entering in your administrative password, the NetBeans installer dialog will launch. Follow the prompts as you normally would for any other installer, and voilà, you’ll now find the NetBeans 7.0.1 launcher sitting under the Programming menu in the main Applications menu – if you aren’t using the new Unity menu system of course. If you are, then simply search for NetBeans and you’ll be good to go! ;)

How to Download Facebook Photo Albums CodeUnit 26 SEP 2011

It is all very well to upload and share your photos with the world on Facebook, but sometimes it is also pretty handy to be able to pull them down again for backup purposes. Enter a brilliant little application that makes it a breeze to download full photo albums from either your own profile, associated groups or liked pages.

Pick&Zip is the fantastically clean and well presented online tool which through it’s flash driven interface allows you to select your own albums or photos where you have been tagged and then download the selected set either as a zip file or as a pdf – directly from your browser! No messy installs to work with whatsoever! :)

To work, it requires that you allow the app to link with your profile, and if you are okay with that, go ahead and log in using the Facebook oauth login system. From there it is a matter of browsing the albums you want to view using the tree on the left, selecting the photos to download and then confirming the download format – as simple as that!

One thing to note though is that thanks to Facebook’s new privacy controls, the application only allows you to download files uploaded by your friends, which makes sense but is a little frustrating if you wanted to say download other people’s albums for more devious purposes (not that you ever would of course!) :P

It is well written, features a great interface and is packaged in a very clean and colourful website, making this definitely one of the premier ways of taking back control of your Facebook photo albums!

Related Link: http://www.picknzip.com

PHP: How to Force a CSV File Download CodeUnit 14 SEP 2011

CSV files are handy ways of handing over long lists of data like transactions, audits, surveys or logs over to a user, particularly because they are so universally supported by just about all spreadsheet applications.

Normally when you want a user to download a file you simply force the browser to point to the location of the file you want them to download, however as we all know, this doesn’t always work as often the browser will decide what to do with the file – be it to display the file contents, redirect you to a particular browser plugin, or give you the choice as to whether you want to download the file or perhaps do something else with it.

Because CSV files are nothing more than plain text files, browsers often choose simply to open them up as text, pretty useless in that if forces the user to now look for the “save as” option in the browser’s menu system.

Luckily, the way to get around this and force a download is pretty common to most file types – all you do is set the necessary header information and then read the target file’s contents and push it straight to the browser via the output buffer.

So let us see this in action for a CSV file then:

ob_start();
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=downloadrecords.csv");
readfile($_SERVER['DOCUMENT_ROOT'] . '/downloadrecords.csv');
ob_end_flush();

In the above example we want the user to download /downloadrecords.csv. Now instead of directing a user directly to that path, we instead send them to a force download script, with sets the necessary headers like the all important content-disposition header, and then simply read the existing CSV file contents straight into the output buffer using the handy readfile function.

Flush the buffer and the browser will now do the rest.

Nifty.

Download SQLyog Community Edition CodeUnit 11 MAY 2011

SQLyog is an exceptionally good GUI Management Tool for MySQL databases and is well worth the purchase price if you develop and maintain a large number of MySQL databases. It is developed by Webyog and comes in three main flavours, namely Professional, Enterprise and Ultimate. However, if you are a single developer working on your own and pretty much a shoestring budget, then you’ll be happy to know about the existence of the fourth, most importantly FREE flavour of the excellent SQLyog, the Community Edition.

Now no longer available (or even mentioned) on the main Webyog website any more, locating the free Community Edition download can be a little tough if you don’t know where to look, hence this blog post. A little while ago it was decided by Webyog to spin off the Community Edition as an open source Goo06gle Code project, located at http://code.google.com/p/sqlyog/.

This means that the installer download for SQLyog Community Edition is now located at http://code.google.com/p/sqlyog/downloads/list.

Grab it, take it for a test drive and you definitely won’t look back. Seriously, if you work on a Windows box, then kiss phpMyAdmin goodbye! :)

Related Link: http://code.google.com/p/sqlyog/downloads/list

Anime Download: Shigurui: Death Frenzy Anime 29 OCT 2010

1629 Shizuoka, at the beginning of the Edo Era, Japan was enjoying a rare time of piece under daimyo Tokugawa Tadanaga’s iron rule. However, the lord wished for a fighting tournament to be staged and so it was – though despite his vassals’ strongest objections, Tokugawa insisted that the standard wooden bokken were forgone in favour of the sharp steel of real Japanese swords.

Two past students of Iwamoto Kogan, Japan’s greatest swordsman, find themselves preparing to do battle against one another, the prize being the proof that they are indeed the true successor to Iwamoto’s school. One-armed Fujiki Gennosuke and blind Irako Seigen are about to fight one another to the death – so beginning a story of intertwining fates, conflict and twisted destinies.

The first 32 chapters of Takayuki Yamaguchi’s dark and bloody manga, Shigurui was adapted into a television anime in 2007, directed by Hiroshi Hamasaki and written by Seishi Minakami. Production was handled by famed anime powerhouse, Madhouse Studios.

The series quickly gained notoriety for its detailed and realistic, graphic violence and nudity, and combined with its stunning style, choreography and visuals, makes for an excellent if somewhat disturbing watch.

Thanks to Filecrop I managed to dig up some MegaUpload links to English fansubs for this 12 part animated series of gore and swordsmanship! Enjoy.

[LINKS EXPIRED / REMOVED]

Related Link: http://en.wikipedia.org/wiki/Shigurui

Highschool of the Dead: Episode 12 Anime 18 OCT 2010

All Dead’s Attack

It is the start of Armageddon as China and the United States start tossing nuclear ballistic missiles at one another. Despite the joint US-Japanese air defences, one of China’s retaliatory missiles break through, resulting in a massive EMP burst that instantly fries all electronics and brings virtually all machinery in Japan to a standstill. Of course, this means the defences of the estate stronghold is now basically down, inviting a full scale invasion  by the zombies! (or “them” if you still want to be a purist)

So apart from the big decision the group still needs to make on whether or not to stay with Saya’s parent’s group, they now have to contend with a full frontal zombie attack – with no viable escape route in sight!

So the first anime season of the frustrating in terms of potential zombie horror survival Highschool of the Dead comes to an end, obviously leaving a huge opportunity for sequels thanks to the series’ short 12 episode length, but ending off with a satisfying enough mini conclusion in terms of the kids’ making some necessary big decisions and of course simply continuing with the fight just to stay alive.

It’s nice to see director Tetsuro Araki tear himself away from the mindless and pointless fan service he so mercilessly drenched what otherwise could have been a pretty awesome series with, and instead stick to what made the show so exciting in the first place – zombies, zombies, zombies and some exceedingly cool, over the top, mind blowing action!

True, there are all the usual and expected sentimental little bits to get through, but with those all out of the way, the series ends off with a proper and exciting bang, making for a worthwhile episode to watch.

As per usual, the animation is slick, full of the necessary detail and beautifully colored. In addition to the visuals, Kishida Kyodan and The Akeboshi Rockets’ opening track continues to be pretty damn brilliant while the tail gets wrapped up in the usual pleasing fashion by yet another random Maon Kurosaki song, a gimmick that has worked well for this particular series.

In conclusion, the conclusion for Highschool of the Dead delivered exactly what you would expect from a 12 episode long series (in other words not a real ending so to speak), does it in style, steps back ever so slightly from the unnecessary fan service that was dragging down the credibility of the show and leaves you wanting some more.

In other words, no real reason not to catch it if you haven’t yet! :)

Download Highschool of the Dead 12: Removed

Related Link: http://en.wikipedia.org/wiki/Highschool_of_the_Dead

Anime Download: Master of Martial Hearts Anime 15 SEP 2010

On the way back from school Aya and best friend Natsume come across to fiercely dueling women – a stewardess versus a shrine maiden – who claim to be fighting as part of Martial Heart (or Platonic Heart if you’re watching the original Japanese).

master-of-martial-hearts-dvd-box.jpg

Martial Heart is a mysterious women-only fighting tournament in which the ultimate prize is the granting of a wish, whilst the price of failure is a descent into the Dark Realm. It so happens that Aya’s mother was once a champion fighter and having being taught by her, Aya steps in and in the process strikes up a friendship with the shrine maiden Miko.

However, Miko soon disappears and it would appear that in order to find and rescue her, Aya will have to take part in Martial Heart. But as the battles continue and Aya advances deeper and deeper into the truth behind Martial Heart, she begins to learn some rather unpleasant truths about herself.

But these are nothing compared to the dark secrets at the heart of it all…

Master of Martial Hearts or Zettai Shougeki: Platonic Heart is a five part OVA that was originally released in 2008, directed by Yoshitaka Fujimoto and with animation produced by ARMS. If you’ve ever watched fan service laden fighting shows like Ikki Tousen and Air Master before, then you kind of know what to expect from Martial Hearts. Loads of exploding clothes, plenty of panties and bras, and maybe even the odd nipple or two.

Still, there looks to be some interesting fights to be had with a rather varied cast, so the show may just prove to be a little interesting, though I’ll only be able to tell for myself once I make it past episode 1 (hey, it’s a busy month, you know with me buying a house and all).

Anyway, thanks to FileCrop, I have unearthed the following MegaUpload download links for you, just in case you want to see what the series is all about before you go and spend some money on it!

[LINKS EXPIRED / REMOVED]

master-of-martial-hearts.jpg

Related Link: http://en.wikipedia.org/wiki/Master_of_Martial_Hearts