Bash directory bookmarks

While reading through the comments to this Habrahabr article (in Russian), I came across an excellent tip for the directory bookmarks in bash shell.  Here’s how to set it up.

Firstly, add the following lines to your .bashrc or .bash_profile file:

# Bash Directory Bookmarks
# From:
alias m1='alias g1="cd `pwd`"'
alias m2='alias g2="cd `pwd`"'
alias m3='alias g3="cd `pwd`"'
alias m4='alias g4="cd `pwd`"'
alias m5='alias g5="cd `pwd`"'
alias m6='alias g6="cd `pwd`"'
alias m7='alias g7="cd `pwd`"'
alias m8='alias g8="cd `pwd`"'
alias m9='alias g9="cd `pwd`"'
alias mdump='alias|grep -e "alias g[0-9]"|grep -v "alias m" > ~/.bookmarks'
alias mload='source ~/.bookmarks'
alias ah='(echo;alias | grep "g[0-9]" | grep -v "m[0-9]" | cut -d" " -f "2,3"| sed "s/=/ /" | sed "s/cd //";echo)'

Secondly, if you are already using ~/.bookmarks file for anything, change the two references to it in the above lines to some other file.  It’s where your directory bookmarks will be stored.

Thirdly, if you prefer to save the bookmarks between your bash sessions, add the “mload” command to the end of your .bashrc or .bash_profile file, and “mdump” to your .bash_logout file.

Start a new bash shell and you are all set.

Using this setup is extremely easy.  Navigate to the directory that you want to bookmark, and save it under the numbered bookmark:

$ cd /var/www/html
$ m1

When you want to navigate back to that folder, simply call the numbered bookmarks:

$ g1

If you need to refresh your memory, issue “ah” command (think: aliases help), and it will print out the list of your current numbered bookmarks with the directory paths associated with them.

In case you need more than nine bookmarks, simply extend the lines in your .bashrc or .bash_profile file to run through more numbers, or use some other bookmark naming convention that works for you.


P.S.: A quick Google search points to the author’s page, which links to a more advanced solution – bashmarks.

Atomic Bookmarks for Google Chrome

Via CyberNet News I came across a nice extension for Google Chrome – Atomic Bookmarks.  When installed it provides a quick access to bookmarks via single click.  It has a few nice features, such as quick bookmark search and saving of currently open tabs into a new folder with a single click again.

The user interface has a few minor glitches, but if you are using bookmarks in Google Chrome, this add-on is definitely recommended.

The new – a Delicious déjà vu is a famous and widely used URL shortening service.  Or at least it used to be until a few days ago, when a new was introduced.  I managed to miss the announcement, so it was only today that I saw it.  Being a fan of (almost) all new and shiny, I looked around.  And within seconds I had this strong feeling of déjà vu.  And this time I didn’t even have to think hard to guess where I saw this before.  The answer was obvious and it was staring at me – the good old Delicious, social bookmarking service.

From a simple URL shortening service with popular API and some stats on clicks, is transforming into a social bookmarking service.  Here are just a few things that stood out for me:

  • More and more ways to add bookmarks – browser addons, mobile applications, etc.
  • Social aspect of bookmarking – now integrates Twitter and Facebook friend’s public bookmarks into your network stream.
  • Bundles – I think that’s one of the major differences between a URL shortening service and a bookmarking service.  With URL shortening there is no need (or it is really small) of organizing URLs – you can always just shorten it again.  With bookmarks some sort of organization is a must.
  • Bookmark notes – these are pretty much identical to those of Delicious.

Delicious is dead. Long live Delicious.

Plenty has been said in this blog about the social bookmarking service Delicious over the years.   Lately, discussions of the Delicious fate were falling into the sadness.  After the web service was bought by Yahoo, it was maintained and developed for a while and then began to slow down.  Things got so bad in fact, that Yahoo announced that it was selling the property.  That was a moment of panic for many – after all, good or bad, Delicious was a storage of vasts amount of wisdom for many people.  Pretty much every user at the moment exported data and made a few backups.  Most looked at the alternative services.  Some started moving over.  I was in that group as well, migrating all my bookmarks to Evernote.

Anyhow, Delicious was acquired by a couple of guys who are famous for their work on YouTube, back in the day.  And that was a glimpse of hope.  Finally, I thought, geeky techies will know what to do with it.  They will know how to breath some life into the project and bring its much deserved popularity back.  They will prove me moving all my stuff to Evernote wrong.

Finally, a few days ago, the new Delicious went live.  Fresh look, new features – things that we all were waiting for.  Or so it seemed.  Upon a closer look it turned out that most of the old useful features are gone.  And the new features aren’t the ones everyone was waiting for.  Overall, this is a huge transformation of the service that Delicious is.  Part of it is still Delicious – there are still bookmarks and tags.  But part of it is something new – stacks, improved multimedia previews, missing networking, cropped tag navigation, and such.  The primary focus of the service moved.  Before it was primarily a storage of bookmarks.  And secondly, a place to share bookmark wisdom via networking with friends, tagging, and search.  Now, it’s more of a fancy multimedia collections or something of a sort.

Don’t get me wrong – I’m all for new and exciting technologies.  But for me personally, Delicious was something completely different.  And now, with this new release, the last hope of that old Delicious the memory of which I love and cherish, is gone.  It’s no more.  The end of an era.  It’s time to move on and explore the new age.  Delicious is dead.  Long live Delicious.

Moving from Delicious to Evernote

First things first:

  1. I absolutely love Delicious.  I’ve been using it for ages and it saved my life several times.  I’d easily pay for it if there was an option.
  2. My move to Evernote has nothing to do with recent rumors that Yahoo will shutdown Delicious.  I know that that is not true – they will probably just sell it or find some other way to chop it off, but they won’t shut it down completely.  And even if they would, someone will always start a clone.  And there are no worries about data export what so ever – Delicioius was always excellent with that.

Now that we got those things out of the way, I can relax and tell you what’s going on.  Yes, I am moving all my bookmarks from Delicious to Evernote.  I already moved the large chunk and I’ll sort out the rest in coming days.  So, why do I move?  For a number of reasons.

First of all, there was just too much hype to ignore.  I kept hearing about Evernote from all sides.  That alone, of course, wouldn’t push me to move, but it made me look closer.  I looked and I liked.  Here are the things that I liked:

  • Notes.  I love how Delicious handles bookmarks.  But bookmarks aren’t the only type of notes that I have.  Sometimes I just need to jot something down.  Sometimes I have a picture. Sometimes a file of different type.  If it wasn’t on the web, I couldn’t save it at Delicious.  I had a local application (gnote) running on my laptop for such things.  But my laptop is not always around.   I needed a web notes application forever.
  • Web clipper.   Collecting bookmarks for several years, I only now realized the risk of losing all that data.  Bookmark stores the URL only.  Maybe the title of the page.  And a brief description at best.  But if the bookmarked page will disappear, bookmark becomes useless.  With web clipper though it’s a different story.  You select full page or a part of it in your browser, press a button, and it’s clipped to your notes.  So even if the source page will disappear, you still have a copy.
  • Tags and folders.  Delicious was the first (or one of the first) applications to bring tags mainstream.  And tags are great.  But they aren’t perfect.  So are folders.  But a combination of both can take a long way.  Evernote organizes things into notebooks (folders) and tags.  That’s way more convenient and flexible.
  • Document indexing and image recognition! Not only this has tremendous practical value, but it brushes on my geek nerve.  It’s just elegant use of technology. If you upload a PDF or some other document to Evernote, it will index the text in that document automatically.  And you’ll be able to find the document by the text it has inside.  But what is even better – it’ll do the same for images.  Just imaging drinking out somewhere.  You order a bottle of something absolutely breathtaking.  But you’ll never remember how it’s called tomorrow. So you just snap a picture with your mobile and attach that picture to the note.  Evernote will analyze the picture, find any text on it, and will make this picture searchable by that text.  Brilliant!  We need more applications like that.

Those things got me thinking.  So I did a little test run.  I used Evernote for a couple of days, to see how it will hold up.  And the more I used it, the more I loved it!  I started migrating my bookmarks from Delicious not because I wanted to leave Delicious, but because I wanted to have this data in Evernote.

By the way, a few words about the move.  There is no direct import from Delicious.  There are some scripts and converters which would tell you how to export data from Delicious, convert it, and then import it into Evernote.  And I tried some.   But my problem wasn’t with the data conversion.  My problem was with the data itself.  As I said, some bookmarks were pointing to non-existing websites.  Some moved to different locations and had to be updated.  Some simply became obsolete – like bits and pieces of technology news which I thought were interesting at the time.  So after trying to fix data automatically (and I did some), I said that this collection is too valuable for me.  And I went manually.  One by one – checking the bookmark, clipping whenever possible, filing and tagging the note in Evernote.  Care to guess how much of the material was outdated? Around 35-40%!  With any kind of automated migration, I’d be inserting a lot of junk into the system that I was only starting to use.  I didn’t want that. So manual it was.

Somewhere in the middle of the migration, I got myself an Android phone.  Immediately a mobile app was installed which, given Internet access, brought all my notes so much closer to me.  The only thing that I wanted to have now was some way to synchronize selected notes to my phone, so that I’d have them even if there is no Internet connectivity.  Turns out that Evernote can do that too.  But for premium users.  For around $35/year you get the VIP goodies.  Offline synchronization is supported on the folder-level.  Just pick some folders and say that you want them on the mobile no matter what.  And you’ll have them.

I wanted to write this post for a few days now, but my migration isn’t completely over and I was stalling.  So what did finally push me to write this before I even finished migrating?  The new version of the Google Chrome extension.  One of the new features is as elegant as Evernote’s image recognition.  From now on, Evernote has an option to suggest notes next to your search engine results.  That just solves another big problem of mine.

You see, the thing is that even if I have something useful bookmarked, I often forget I do.  I run straight to Google and try to find it again.  Works most of the times, but not always.  Now, whenever I search Google for something, Evernote searches my notes in the background and lets me know if I have any notes matching.

By now you must be thinking that there must be something wrong.  Evernote sounds perfect, but we all know that that is impossible.  So, OK, I’ll tell you a few things that I don’t like.

  • Import from Delicious.  Even though I’d still chose to import manually, for many of my friends that won’t be the case.  There should be a simpler procedure to import data.
  • User interface.  It works, but it needs polish.  Again, I myself don’t mind too much.  But it’s a bit awkward to show Evernote to certain people.
  • Social.  One of the greatest benefits of Delicious is that it’s a social platform.  You can link with your friends, follow their bookmarks or tags, share bookmarks, and even send interesting bookmarks to your friends using Delicious.  In Evernote you can share a folder (with RSS feed).  And that’s about it.  There is no easy way to follow shared notes from my friends.  There doesn’t even seem to be a concept of friend yet.

These are the biggest concerns for me.  But they aren’t big enough.  As I said – the service is awesome.  The technology is fantastic.  And it doesn’t even matter if you are running on free or premium account.  Have a look at it, try it out, and let me know what you think.

P.S.: I have several public notebooks, but since I’m still organizing everything and moving things around, I won’t link to them at this time.  I’ll write another post with all the yummy links when the dust settles down a bit.