-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sorted docs into a better structure and added CHANGELOG and LICENSE t…
…o docs, updated readme
- Loading branch information
mattjegan
committed
Aug 20, 2016
1 parent
1b19ca2
commit 06db639
Showing
5 changed files
with
35 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters