Skip to content

Commit

Permalink
add --portals option
Browse files Browse the repository at this point in the history
  • Loading branch information
breezewish committed Oct 31, 2013
1 parent df00d7e commit a0e6fd7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
12 changes: 3 additions & 9 deletions README.md
Expand Up @@ -5,7 +5,7 @@ Export all portals, links, fields and system broadcasts in a specific geo-region

```bash
npm install
node build/app.js
node build/app.js --portals
```

# Requirement
Expand All @@ -16,16 +16,10 @@ MongoDB > 2.2

# Usage

### Continue the last task (default):

```bash
node build/app.js
```
--portals Request portals information
### Start a new task:

```bash
node build/app.js --new
--new -n Start a new request
```

# Warning
Expand Down
8 changes: 6 additions & 2 deletions build/app.js
Expand Up @@ -42,9 +42,13 @@
argv = require('optimist').argv;

if (argv["new"] || argv.n) {
Tile.prepareNew(Tile.start);
if (argv.portals) {
Tile.prepareNew(Tile.start);
}
} else {
Tile.prepareFromDatabase(Tile.start);
if (argv.portals) {
Tile.prepareFromDatabase(Tile.start);
}
}

}).call(this);
4 changes: 2 additions & 2 deletions src/app.coffee
Expand Up @@ -34,6 +34,6 @@ require './lib/entity.js'
argv = require('optimist').argv

if argv.new or argv.n
Tile.prepareNew Tile.start
Tile.prepareNew Tile.start if argv.portals
else
Tile.prepareFromDatabase Tile.start
Tile.prepareFromDatabase Tile.start if argv.portals

0 comments on commit a0e6fd7

Please sign in to comment.