There is a command line interface for Reddit called “rtv” (reddit terminal viewer). It’s written in Python, so you can install it with
Here is a short youtube video on how to use it.
You want to become a Reddit power user.
Install the Reddit Enhancement Suite Firefox add-on. The result will be a Reddit on steroids :)
I always think of the 80s as the best decade of my life. I guess it’s because that’s when I was a child :) Now we can go back in time with reddit’s timeline: http://www.reddit.com/t/1980s/.
When you visit a subreddit on reddit.com, for instance http://www.reddit.com/r/python, at the bottom of the page you will find just a “next” link to the next page. Needless to say, browsing older entries like that is a PITA…
I made a simple script that generates a static HTML page with links to all the older pages:   …
You can find the script
reddit_get_all_pages.py in my Bash-Utils collection, in the
Customize the constant
This script made me figure out that reddit lists only the last 1000 posts! Older posts are hidden. If you have a direct link to them, fine, otherwise they are gone :( So this script will only list 40 pages. This is a limitation of reddit.
You have an unreadable JSON file from which you want to extract some data… How to prettify it, i.e. how to make it human readable?
There are web-based and command-line solutions. As an extra, we show you how to do it in Vim too.
- http://chris.photobooks.com/json/default.htm (it can show you the path of a tag too)
- http://jsonformatter.curiousconcept.com/ (formatter and validator)
curl -s http://www.reddit.com/r/nsfw/.json | python -mjson.tool
sudo apt-get install edit-json; prettify_json myfile.json
This tip is based on this post: Editing json files in vim.
.vimrc file I had to add the following lines:
" pretty-print JSON files autocmd BufRead,BufNewFile *.json set filetype=json " json.vim is here: http://www.vim.org/scripts/script.php?script_id=1945 autocmd Syntax json sou ~/.vim/syntax/json.vim " json_reformat is part of yajl: http://lloyd.github.com/yajl/ autocmd FileType json set equalprg=json_reformat
When opening a
.json file, it will be colored using the
json.vim syntax file. Selecting a text and pressing the “
=” button will indent the marked text using
There are several JSON visualizer add-ons for Firefox, e.g. JSONView.