Skip to content

Commit

Permalink
Sorted docs into a better structure and added CHANGELOG and LICENSE t…
Browse files Browse the repository at this point in the history
…o docs, updated readme
  • Loading branch information
mattjegan committed Aug 20, 2016
1 parent 1b19ca2 commit 06db639
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 47 deletions.
73 changes: 28 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,45 @@
# RanCat

# Welcome to RanCat
Master
[![Build Status](https://travis-ci.org/mattjegan/rancat.svg?branch=master)](https://travis-ci.org/mattjegan/rancat) [![codecov](https://codecov.io/gh/mattjegan/rancat/branch/master/graph/badge.svg)](https://codecov.io/gh/mattjegan/rancat) [![Code Health](https://landscape.io/github/mattjegan/rancat/master/landscape.svg?style=flat)](https://landscape.io/github/mattjegan/rancat/master) [![PyPI version](https://badge.fury.io/py/rancat.svg)](https://badge.fury.io/py/rancat) [![Documentation Status](https://readthedocs.org/projects/rancat/badge/?version=latest)](http://rancat.readthedocs.io/en/latest/?badge=latest)

Develop
[![Build Status](https://travis-ci.org/mattjegan/rancat.svg?branch=develop)](https://travis-ci.org/mattjegan/rancat) [![codecov](https://codecov.io/gh/mattjegan/rancat/branch/develop/graph/badge.svg)](https://codecov.io/gh/mattjegan/rancat) [![Code Health](https://landscape.io/github/mattjegan/rancat/develop/landscape.svg?style=flat)](https://landscape.io/github/mattjegan/rancat/develop)

This is the full documentation of [RanCat](https://github.com/mattjegan/rancat), an open source Python **Ran**dom con**Cat**enation engine.

[![Build Status](https://travis-ci.org/mattjegan/rancat.svg?branch=master)](https://travis-ci.org/mattjegan/rancat) [![codecov](https://codecov.io/gh/mattjegan/rancat/branch/master/graph/badge.svg)](https://codecov.io/gh/mattjegan/rancat) [![Code Health](https://landscape.io/github/mattjegan/rancat/master/landscape.svg?style=flat)](https://landscape.io/github/mattjegan/rancat/master)
[![PyPI version](https://badge.fury.io/py/rancat.svg)](https://badge.fury.io/py/rancat) [![Documentation Status](https://readthedocs.org/projects/rancat/badge/?version=latest)](http://rancat.readthedocs.io/en/latest/?badge=latest)

Develop

[![Build Status](https://travis-ci.org/mattjegan/rancat.svg?branch=develop)](https://travis-ci.org/mattjegan/rancat) [![codecov](https://codecov.io/gh/mattjegan/rancat/branch/develop/graph/badge.svg)](https://codecov.io/gh/mattjegan/rancat)
[![Code Health](https://landscape.io/github/mattjegan/rancat/develop/landscape.svg?style=flat)](https://landscape.io/github/mattjegan/rancat/develop)
## Use Cases

RanCat is a string generator that can use multiple text sources, including files and native Python lists and tuples. What constitutes a word in a word list is simply an atomic entity in the source, e.g. a line in a file, or a value in a list. RanCat will generate pseudo-random strings that are suitable for use as :

RanCat is a string generator that can use multiple text files (word lists) as sources. What constitutes a word in a word list is simply a line in the file. RanCat will generate pseudo-random strings that are suitable for use as github branch names, database names, project names, and so on. The generated names are strings which contain no whitespace.
* CVS Branch Names
* Database Names
* Project/Repository Names
* Online Avatar Names
* Baby Names
* and so on

## Installation

```bash
pip install rancat
```

## Usage
## Basic Usage

```python
>>> from rancat import RanCat
>>>
>>> r = RanCat() # Takes an optional `seed` parameter
>>>
>>> # Load in our source files
>>> r.load('/path/to/listfile1')
>>> r.load('/path/to/listfile2')
>>>
>>> # Generate a new string
>>> r.next()
orange_truck
>>> r.next()
red_tractor
>>> r.next()
orange_tractor
```
from rancat import RanCat

## Source File Rules
r = RanCat()

An example source file is:
# Load in our text sources
r.load(['red', 'orange', 'blue'])
r.load(['car', 'tractor', 'truck'])

# Generate a new string
r.next()
>>> orange_truck
r.next()
>>> red_tractor
r.next()
>>> orange_tractor
```
orange
lilac purple
y'ellow
```

The rules that are applied are:

* Any trailing whitespace is truncated
* Spaces are converted to underscores
* Hyphens are converted to underscores
* Apostrophes are converted to nothing

## Contributing

If you feel like there is any extra features that users may benefit from please feel free to open a pull request or an issue.

File renamed without changes.
File renamed without changes.
7 changes: 5 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Welcome to RanCat
[![Build Status](https://travis-ci.org/mattjegan/rancat.svg?branch=master)](https://travis-ci.org/mattjegan/rancat) [![codecov](https://codecov.io/gh/mattjegan/rancat/branch/master/graph/badge.svg)](https://codecov.io/gh/mattjegan/rancat) [![Code Health](https://landscape.io/github/mattjegan/rancat/master/landscape.svg?style=flat)](https://landscape.io/github/mattjegan/rancat/master)
[![PyPI version](https://badge.fury.io/py/rancat.svg)](https://badge.fury.io/py/rancat) [![Documentation Status](https://readthedocs.org/projects/rancat/badge/?version=latest)](http://rancat.readthedocs.io/en/latest/?badge=latest)
Master
[![Build Status](https://travis-ci.org/mattjegan/rancat.svg?branch=master)](https://travis-ci.org/mattjegan/rancat) [![codecov](https://codecov.io/gh/mattjegan/rancat/branch/master/graph/badge.svg)](https://codecov.io/gh/mattjegan/rancat) [![Code Health](https://landscape.io/github/mattjegan/rancat/master/landscape.svg?style=flat)](https://landscape.io/github/mattjegan/rancat/master) [![PyPI version](https://badge.fury.io/py/rancat.svg)](https://badge.fury.io/py/rancat) [![Documentation Status](https://readthedocs.org/projects/rancat/badge/?version=latest)](http://rancat.readthedocs.io/en/latest/?badge=latest)

Develop
[![Build Status](https://travis-ci.org/mattjegan/rancat.svg?branch=develop)](https://travis-ci.org/mattjegan/rancat) [![codecov](https://codecov.io/gh/mattjegan/rancat/branch/develop/graph/badge.svg)](https://codecov.io/gh/mattjegan/rancat) [![Code Health](https://landscape.io/github/mattjegan/rancat/develop/landscape.svg?style=flat)](https://landscape.io/github/mattjegan/rancat/develop)

This is the full documentation of [RanCat](https://github.com/mattjegan/rancat), an open source Python **Ran**dom con**Cat**enation engine.

Expand Down
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ pages:
- Home: index.md
- The RanCat Object: RanCat.md
- Contributing: contributing.md
- CHANGELOG: CHANGELOG.md
- LICENSE: LICENSE.md
theme: readthedocs

0 comments on commit 06db639

Please sign in to comment.