A couple of days ago, Lau Jensen wrote that he was using conkeror to surf the web. I supposed I never really paid attention to this browser because of the confusion with Konkeror, the KDE browser. Anyway, as an Emacs user, he explained that it was possible to fully use conkeror with the keyboard using most of the Emacs keyboard shortcuts.
So, I dived into conkeror, a very pleasant dive, the one where you go out way better than before (a bit like learning and then mastering the Dvorak keyboard layout). Why is it such a great piece of browser? Because it is:
- Insanely fast.
- Strictly without Chrome distractions.
- Like Emacs, where efficiency is the core principle (all with the keyboard).
- Crazy easy to customize to fit your needs.
This last point is the one I want to address today. Like most of the programmers, I hate repeating myself and I like to streamline and optimize my work. Being a process engineer further increase this affinity for optimization as it is the core of my work (read, where I really earn money).
Now, as a programmer, how to you stay on top of your field? If you are like me, you check everyday the headlines of Hacker News plus a selection of feeds from the ones you know and appreciate the writings. My main problem with this approach is that it takes time, furthermore, it takes time in front of my computer.
I first solved this issues with Instapaper. Instapaper is a great service to read later interesting articles. It is very simple, when you start reading an article you find interesting but a bit long to read it now, just click on your "Read Later" bookmarklet and Instapaper will track for you. After a while you just got to your Instapaper account and can read all the articles easily (even better, you have only the text, not the ads etc. this is distraction free reading). With Instapaper I was able to do the bulk of my reading in the evening, great to have efficient days.
The second issue was still there, the reading was in the evening, but in front of my computer. Enters the Kindle, Instapaper can export my reading list as a .mobi file, compatible with the Kindle. So, I ordered a Kindle (with super fast delivery in Germany from the US!).
Productivity boost! My "readflow" was simply:
- Hacker News/Good writers.
- Yeah! Good thing, click on "Read Later", back to work.
- In the evening, go on Instapaper, download the .mobi on the Kindle.
- Go to bed and read/discuss with my wife.
And now, my discovery of Conkeror, I transformed it into the ultimate filtering machine for good things to read. Here is how:
First, I go let say on Hacker News and find some links of interest, I press the C-x I combo, automatically the links are highlighted, typing a couple of letters from the link title automatically filter the list to easily select by number the good link:
Then, the minibuffer of Conkeror opens and ask for a title, the value is by default the name of the link:
The second step is to provide a description. As I am pushing directly a link to Instapaper, I have no idea about the real content of the article, so the default value is to provide the source. I would have pressed C-x i as combo, the current page would have been pushed to Instapaper and the description would have been empty.
Just validate and after a second or so, Instapaper tells me that everything is ok. Yeah!
You can even find the article no ready to be read from within Instapaper.
But you have even better, just configure Instapaper to send you the latest articles to read once a day (or week) on your Kindle. This is easy and costs nothing if you get the articles delivered over your WiFi connection:
In your management area of your Kindle you can see that your "Instapaper Daily" has been delivered.
Effectively, you can now read your articles in your bed or while drinking your cup of coffee outside in the sun... It feels good.
Now, it means that in my daily work, I press a single key combo and know that I will be able to read everything relaxed when time is available with my Kindle.
To customize Conkeror, just drop the following in your ~/.conkerorrc (replace USERNAME and PASSWORD with your username and password):
interactive("instapaper", "Send the current page to InstaPaper.",
function (I) {
check_buffer(I.buffer, content_buffer);
let posturl = 'https://www.instapaper.com/api/add?' +
'username=USERNAME&' +
'password=PASSWORD&url=' +
encodeURIComponent(I.window.content.location.href)
'&selection=' +
encodeURIComponent(
yield I.minibuffer.read(
$prompt = "Description (optional): "));
try {
var content = yield send_http_request(load_spec({uri: posturl}));
if (content.responseText == "201") {
I.window.minibuffer.message("InstaPaper ok!");
} else {
I.window.minibuffer.message("Error.");
}
} catch (e) {
I.window.minibuffer.message("Error.");
}
});
interactive("instapaper-link", "Send the current link to InstaPaper.",
function (I) {
bo = yield read_browser_object(I) ;
mylink = load_spec_uri_string(load_spec(encodeURIComponent(bo)));
check_buffer(I.buffer, content_buffer);
let posturl = 'https://www.instapaper.com/api/add?' +
'username=USERNAME&' +
'password=PASSWORD&url=' + mylink +
'&title=' + encodeURIComponent(
yield I.minibuffer.read(
$prompt = "Title (optional): ",
$initial_value = bo.textContent)) +
'&selection=' + encodeURIComponent(
yield I.minibuffer.read(
$prompt = "Description (optional): ",
$initial_value = "From: "+ I.buffer.title +" ("+I.window.content.location.href+")"
));
try {
var content = yield send_http_request(load_spec({uri: posturl}));
if (content.responseText == "201") {
I.window.minibuffer.message("InstaPaper ok!");
} else {
I.window.minibuffer.message("Error.");
}
} catch (e) {
I.window.minibuffer.message("Error.");
}
}, $browser_object = browser_object_links);
define_key(default_global_keymap, "C-x i", "instapaper");
define_key(default_global_keymap, "C-x I", "instapaper-link");
Dear HN readers, if you know even better ways to integrate and optimize these tools, drop me a line loic @ ceondo.com.
By the way, I am the creator of Indefero a software forge great for hackers.
Update: Mark Eichin provided me with an improved version. It includes:
- actually putting the password code into instapaper-link as well as instapaper itself;
- enabling history (separately) for descriptions and titles (useful when doing a bunch of links and only changing part of the description each time).