<commit_before># taaze [![Build Status](https://travis-ci.org/BUEZE/taaze.svg?branch=master)](https://travis-ci.org/BUEZE/taaze)

---

### Usage 

This gem may be used as a command line utility or called from code


### CLI

`taaze --comments [user_id] --output [file_path]`

or 

`taaze --collections [user_id] --output [file_path]`


### Example

`taaze --comments 12522728 --output ./comments.yml`

`taaze --collections 12522728 --output ./collections.yml`<commit_msg>Readme add<commit_after># taaze [![Build Status](https://travis-ci.org/BUEZE/taaze.svg?branch=master)](https://travis-ci.org/BUEZE/taaze)

---
Taaze is a light package wrote by Ruby. It easy to use for getting comments or collections from online bookstore [Taaze | 讀冊生活](http://www.taaze.tw/index.html).

### How To Get Started
Install by Ruby gem [Taaze](https://rubygems.org/gems/taaze)

`gem install taaze`


### Requirements
- [Nokogiri](http://nokogiri.org) - for parsing html use
- [Json](http://ruby-doc.org/stdlib-2.0.0/libdoc/json/rdoc/JSON.html) - parsing json data

`$ bundle install`

### Usage
This gem may be used as a command line utility or called from code

#### How to get ID
##### User's comment
- You can get user list at [冊格子](http://www.taaze.tw/zekea_index.html)
- In every user's personal page , you can get his or her ID from URL
	 - For Example :
      - http://www.taaze.tw/container_zekeaclt_view.html?ci=13313301
      - 'ci=' is User ID
- And there are 2 argument for use
	- --comments ： get all comments for the user
	- --collections ： get all book collection for the user
- And add yaml path where you want to store
	- --output [file_path]
- Finally the Taaze will return yaml format file 

### CLI

`taaze --comments [user_id] --output [file_path]`

or 

`taaze --collections [user_id] --output [file_path]`

### For Example
      
`taaze --comments 12522728 --output ./comments.yml`

`taaze --collections 12522728 --output ./collections.yml`
{'fraction_non_alphanumeric': 0.144912641315519, 'fraction_numerical': 0.022610483042137718, 'mean_word_length': 3.5174013921113687, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, 'lorem ipsum': 0, 'www.': 3, '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': '6900538', 'n_tokens_mistral': 729, 'n_tokens_neox': 667, 'n_words': 206}