GotchaCode

Demo post

02 Jul 2013

This is a demo post for showing the jekyll theme. Jekyll lets you write your blog posts on markdown. Which also has a sweet syntax highlighting.

This theme includes sweet Github syntax highlighting.

For JavaScript:

var db = new Ldb();
db.set('key', Object);

For Python:

#! /usr/bin/env python
import time
import optparse
from linkfetcher import Linkfetcher
from webcrawler import Webcrawler

Usage = '''
 $ ./crawler -d5 <url>
    Here in this case it goes till depth of 5 and url is target URL to
    start crawling.
'''
Version = '0.0.1'


def option_parser():

    parser = optparse.OptionParser(usage=Usage, version=Version)

    parser.add_option("-l", "--links", action="store_true",
        default=False,dest="links", help="Get links for target url only")

    parser.add_option("-d", "--depth", action="store", type="int" ,
        default=30, dest="depth", help="Maximum depth to traverse")
    opts, args = parser.parse_args()

    if len(args) < 1:
        parser.print_help()
        raise SystemExit, 1

    return opts, args
Tweet