You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here we show examples of usage for common `data` commands. To see the full command documentation - click on the command name, or proceed to the [help pages](https://github.com/datahq/data-cli/tree/master/docs).
31
25
26
+
### data login
27
+
28
+
You should login at the first use of data-cli:
29
+
```bash
30
+
$ data login
31
+
? Login with... Github
32
+
> Opening browser and waiting for you to authenticate online
🔗 https://datahub.io/myname/mydataset/v/1 (copied to clipboard)
48
+
```
49
+
**Note:** by default, findability flag for your dataset is set to `--unlisted`, meaning nobody else is able to see it, except you. Use `--public` flag to make it publicly available
Data-cli has an `init` command that will automatically generate Data Package metadata including scanning the current directory for data files and inferring [table schema] for tabular files:
121
+
```bash
122
+
$ data init
123
+
This process initializes a new datapackage.json file.
124
+
Once there is a datapackage.json file, you can still run `data init`
125
+
to update/extend it.
126
+
Press ^C at any time to quit.
127
+
128
+
? Enter Data Package name prices
129
+
? Enter Data Package title prices
130
+
? Do you want to add following file as a resource "prices.csv" - y/n? y
131
+
prices.csv is just added to resources
132
+
? Do you want to add following file as a resource "prices.xls" - y/n? y
133
+
prices.xls is just added to resources
134
+
135
+
? Going to write to /home/user/Downloads/datapackage.json:
136
+
{
137
+
"name": "prices",
138
+
"title": "prices",
139
+
"resources": [
140
+
{
141
+
"path": "prices.csv",
142
+
"name": "prices",
143
+
"format": "csv",
144
+
....
145
+
},
146
+
"schema": {
147
+
"fields": [
148
+
{
149
+
"name": "date",
150
+
"type": "date",
151
+
"format": "default"
152
+
},
153
+
{
154
+
........
155
+
{
156
+
"path": "prices.xls",
157
+
"pathType": "local",
158
+
"name": "prices",
159
+
"format": "xls",
160
+
"mediatype": "application/vnd.ms-excel",
161
+
"encoding": "windows-1250"
162
+
}
163
+
]
164
+
}
165
+
166
+
167
+
Is that OK - y/n? y
168
+
datapackage.json file is saved in /home/user/Downloads/datapackage.json
0 commit comments