Skip to content

Commit

Permalink
update readme with usage and dev instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Karan Goel committed Apr 2, 2016
1 parent 4a934a7 commit 515c654
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 98 deletions.
76 changes: 30 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,58 +17,59 @@ A `.gitignore` magician in your command line. Joe generates `.gitignore` files f

## Installation

### Option 1: Homebrew
After install, make sure to run `joe u`. This will download all `.gitignore` files in `~/joe-data/` folder.

```bash
$ brew install karan/karan/gitignore
```

### Option 2: [Pip](https://pypi.python.org/pypi/joe)
### Option 1: Binary

```bash
$ pip install joe
```
Download the latest binary from the [Releases page](https://github.com/karan/joe/releases). It's the easiest way to get started with `joe`.

### Option 3: From source
### Option 2: From source

```bash
$ git clone --recursive [email protected]:karan/joe.git
$ git clone [email protected]:karan/joe.git
$ cd joe/
$ python setup.py install
$ chmod +x tool.sh
$ ./tool.sh build
```

## Usage

After install, make sure to run `joe update`. This will download all `.gitignore` files in `~/joe-data/` folder.
### Commands:

```
ls | list list all available files
u | update update all available gitignore files
g | generate generate gitignore files
```

### Basic usage

```bash
$ joe java # outputs .gitignore file for java to stdout
$ joe g java # outputs .gitignore file for java to stdout
```

To update your `.gitignore` files at any time, simply run:

```bash
$ joe update
$ joe u
```

### Overwrite existing `.gitignore` file

```bash
$ joe java > .gitignore # saves a new .gitignore file for java
$ joe g java > .gitignore # saves a new .gitignore file for java
```

### Append to existing `.gitignore` file

```bash
$ joe java >> .gitignore # appends to an existing .gitignore file
$ joe g java >> .gitignore # appends to an existing .gitignore file
```

### Multiple languages

```bash
$ joe java node osx > .gitignore # saves a new .gitignore file for multiple languages
$ joe g java,node,osx > .gitignore # saves a new .gitignore file for multiple languages
```

### Create and append to a global .gitignore file
Expand All @@ -77,7 +78,7 @@ You can also use joe to append to a global .gitignore. These can be helpful when

```bash
$ git config --global core.excludesfile ~/.gitignore # Optional if you have not yet created a global .gitignore
$ joe OSX SublimeText >> ~/.gitignore
$ joe g OSX,SublimeText >> ~/.gitignore
```

### List all available files
Expand All @@ -95,7 +96,7 @@ Output:
Joe isn't **just** a generator for `.gitignore` files. You can use it and its output wherever a SCM is used.

```bash
$ joe java > .hgignore
$ joe g java > .hgignore
```

## Contributing
Expand All @@ -109,40 +110,23 @@ Please use the [issue tracker](https://github.com/karan/joe/issues) to report an
PRs are welcome. To begin developing, do this:

```bash
# make virtual env
$ git clone --recursive [email protected]:karan/joe.git
$ git clone [email protected]:karan/joe.git
$ cd joe/
$ python joe/joe.py java
$ go run *.go
```

#### `tool.sh`

This is a handly script that automates a lot of developing steps.
This is a handy script that automates a lot of developing steps.


```bash
USAGE:
$ tool.sh [-h|--help] COMMAND
$ $tool [-h|--help] COMMAND

EXAMPLES:
$ tool.sh readme Generate README.rst from README.md
$ tool.sh test Upload release to testpypi
$ tool.sh prod Upload release to prod pypi
EXAMPLES:
$ $tool readme Generate README.rst from README.md
$ $tool deps Install dependencies for joe
$ $tool build Build a binary
$ $tool run Build and run the binary
```

Make sure you have a file `.pypirc` in `~/` in the following format:

[distutils]
index-servers =
pypi
pypitest

[pypi]
repository: https://pypi.python.org/pypi
username: <<>>
password: <<>>

[pypitest]
repository: https://testpypi.python.org/pypi
username: <<>>
password: <<>>
88 changes: 36 additions & 52 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,74 +19,77 @@ Features
- Stupidly `easy to use <https://github.com/karan/joe#usage>`__
- Supports all Github-supported ```.gitignore``
files <https://github.com/karan/joe#list-all-available-files>`__
- Works on Mac, Linux and Windows
- Works on Mac, Linux and (maybe) Windows
- Supports other version control systems (``.hgignore``)

Installation
------------

Option 1: Homebrew
~~~~~~~~~~~~~~~~~~

.. code:: bash
$ brew install karan/karan/gitignore
Option 2: `Pip <https://pypi.python.org/pypi/joe>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
After install, make sure to run ``joe u``. This will download all
``.gitignore`` files in ``~/joe-data/`` folder.

.. code:: bash
Option 1: Binary
~~~~~~~~~~~~~~~~

$ pip install joe
Download the latest binary from the `Releases
page <https://github.com/karan/joe/releases>`__. It's the easiest way to
get started with ``joe``.

Option 3: From source
Option 2: From source
~~~~~~~~~~~~~~~~~~~~~

.. code:: bash
$ git clone --recursive [email protected]:karan/joe.git
$ git clone [email protected]:karan/joe.git
$ cd joe/
$ python setup.py install
$ chmod +x tool.sh
$ ./tool.sh build
Usage
-----

After install, make sure to run ``joe update``. This will download all
``.gitignore`` files in ``~/joe-data/`` folder.
Commands:
~~~~~~~~~

::

ls | list list all available files
u | update update all available gitignore files
g | generate generate gitignore files

Basic usage
~~~~~~~~~~~

.. code:: bash
$ joe java # outputs .gitignore file for java to stdout
$ joe g java # outputs .gitignore file for java to stdout
To update your ``.gitignore`` files at any time, simply run:

.. code:: bash
$ joe update
$ joe u
Overwrite existing ``.gitignore`` file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: bash
$ joe java > .gitignore # saves a new .gitignore file for java
$ joe g java > .gitignore # saves a new .gitignore file for java
Append to existing ``.gitignore`` file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: bash
$ joe java >> .gitignore # appends to an existing .gitignore file
$ joe g java >> .gitignore # appends to an existing .gitignore file
Multiple languages
~~~~~~~~~~~~~~~~~~

.. code:: bash
$ joe java node osx > .gitignore # saves a new .gitignore file for multiple languages
$ joe g java,node,osx > .gitignore # saves a new .gitignore file for multiple languages
Create and append to a global .gitignore file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -98,7 +101,7 @@ otherwise.
.. code:: bash
$ git config --global core.excludesfile ~/.gitignore # Optional if you have not yet created a global .gitignore
$ joe OSX SublimeText >> ~/.gitignore
$ joe g OSX,SublimeText >> ~/.gitignore
List all available files
~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -142,7 +145,7 @@ and its output wherever a SCM is used.

.. code:: bash
$ joe java > .hgignore
$ joe g java > .hgignore
Contributing
------------
Expand All @@ -160,41 +163,22 @@ PRs are welcome. To begin developing, do this:

.. code:: bash
# make virtual env
$ git clone --recursive [email protected]:karan/joe.git
$ git clone [email protected]:karan/joe.git
$ cd joe/
$ python joe/joe.py java
$ go run *.go
``tool.sh``
^^^^^^^^^^^

This is a handly script that automates a lot of developing steps.
This is a handy script that automates a lot of developing steps.

.. code:: bash
USAGE:
$ tool.sh [-h|--help] COMMAND
EXAMPLES:
$ tool.sh readme Generate README.rst from README.md
$ tool.sh test Upload release to testpypi
$ tool.sh prod Upload release to prod pypi
Make sure you have a file ``.pypirc`` in ``~/`` in the following format:

::

[distutils]
index-servers =
pypi
pypitest

[pypi]
repository: https://pypi.python.org/pypi
username: <<>>
password: <<>>
$ $tool [-h|--help] COMMAND
[pypitest]
repository: https://testpypi.python.org/pypi
username: <<>>
password: <<>>
EXAMPLES:
$ $tool readme Generate README.rst from README.md
$ $tool deps Install dependencies for joe
$ $tool build Build a binary
$ $tool run Build and run the binary

0 comments on commit 515c654

Please sign in to comment.