cartodb-tools 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +36 -8
- data/lib/cartodb-tools/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -1,21 +1,49 @@
|
|
1
|
-
#
|
1
|
+
# cartodb-tools
|
2
2
|
|
3
|
-
|
3
|
+
Command line tool to import and show details about data in your CartoDB account.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
7
|
+
gem install cartodb-tools
|
8
8
|
|
9
|
-
|
9
|
+
## Configuration
|
10
10
|
|
11
|
-
|
11
|
+
Configuration of your API credentials and server can either be done with a `.cartodbrc` file
|
12
|
+
in your `$HOME` directory, or by using environment variables. The `.cartodbrc` file is a YAML
|
13
|
+
file that contains your account information.
|
12
14
|
|
13
|
-
|
15
|
+
Here is a sample `.cartodbrc` file:
|
14
16
|
|
15
|
-
|
17
|
+
```yaml
|
18
|
+
host: 'https://username.cartodb.com'
|
19
|
+
oauth_key: 'YOUR AUTH KEY'
|
20
|
+
oauth_secret: 'YOUR AUTH SECRET'
|
21
|
+
username: 'your username/email'
|
22
|
+
password: 'your password'
|
23
|
+
```
|
16
24
|
|
17
|
-
|
25
|
+
or, for environment variables:
|
26
|
+
|
27
|
+
```sh
|
28
|
+
export CARTODB_HOST="https://username.cartodb.com"
|
29
|
+
export CARTODB_OAUTHKEY="YOUR AUTH KEY"
|
30
|
+
export CARTODB_OAUTHSECRET="YOUR AUTH SECRET"
|
31
|
+
export CARTODB_USERNAME="your username/email"
|
32
|
+
export CARTODB_PASSWORD="your password"
|
33
|
+
```
|
34
|
+
|
35
|
+
Note: the environment variables override the settings in the `.cartodbrc` file. You can define a mix,
|
36
|
+
so just your password can be an environment variable if you like.
|
18
37
|
|
19
38
|
## Usage
|
20
39
|
|
40
|
+
There are 3 supported commands currently, `import`, `ls`, and `show`
|
41
|
+
|
21
42
|
cartodb import -t "table_name" -f /path/to/some.csv -g Point
|
43
|
+
|
44
|
+
cartodb ls
|
45
|
+
|
46
|
+
cartodb show -t table_name
|
47
|
+
|
48
|
+
Note: for some reason, the API is not naming the tables properly. This happens on the current cartodb.com
|
49
|
+
hosted version and self-hosted instances.
|