<commit_before>Raccoon
=======

[![Build Status][travis-img]][travis]

Raccoon is a simple web-spider framework driven by Golang and Lua.

Install
=======

Install the package:

> $ go get github.com/mikespook/raccoon

Install the CLI command:

> $go get github.com/mikespook/raccoon/cmd/raccoon

Usage
=====

 #TODO

Contributors
============

(_Alphabetic order_)
 <commit_msg>added Usage to README<commit_after>Raccoon
=======

[![Build Status][travis-img]][travis]

Raccoon is a simple web-spider framework driven by Golang and Lua.

Install
=======

Install the package:

> $ go get github.com/mikespook/raccoon

Install the CLI command:

> $go get github.com/mikespook/raccoon/cmd/raccoon

Usage
=====

Raccoon's parser can be used for parsing html in Golang application directly:

'''go
p := raccoon.New("http://www.example.com/")
p.Html(html.SelfClosingTagToken, func(token html.Token) error {
	if token.DataAtom.String() != "meta" {
		return fmt.Errorf("meta is expected, got %s", token.DataAtom.String())
	}
	return nil
})
if err := r.Parse(); err != nil {
	// handling error
}
'''

Or using lua scripts:

'''go
p := raccoon.New("http://www.example.com/")
l := raccoon.LuaWrap(p)
if err := l.DoFile("foobar.lua"); err != nil {
	// handling error
}
'''

'''lua
function SelfClosingTagToken(token)
	if token.DataAtom ~= "meta" then
		error("meta is expected, got " .. token.DataAtom)
	end
end

raccoon.Html(raccoon.Token.SelfClosingTag, SelfClosingTagToken)
raccoon.Parse()
'''

Contributors
============

(_Alphabetic order_)
 
{'fraction_non_alphanumeric': 0.16927083333333334, 'fraction_numerical': 0.0, 'mean_word_length': 4.548736462093863, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1101337', 'n_tokens_mistral': 578, 'n_tokens_neox': 557, 'n_words': 139}