Skip to content

Commit 556430b

Browse files
committed
[findability][s]: by default pushed datasets are public - refs #207
1 parent 3c18261 commit 556430b

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ data push # upload the dataset onto a DataHub
1111
> "As a result you'll got a link to share:
1212
http://datahub.io/user-name/data-package-name
1313
```
14-
That's it! Your data is online. You can make your data public or private, add some pretty graphics, and many more. Please read http://datahub.io/docs for details.
14+
That's it! Your data is online. You can make your data unlisted or private, add some pretty graphics, and many more. Please read http://datahub.io/docs for details.
1515
1616
With `data-cli` you can also:
1717
* Get data from online sources
@@ -46,7 +46,7 @@ Mydataset Mydataset
4646
your data is published!
4747
🔗 https://datahub.io/myname/mydataset/v/1 (copied to clipboard)
4848
```
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
49+
**Note:** by default, findability flag for your dataset is set to `--public`. Use `--unlisted` flag if you want it to not appear in the search results.
5050
5151
### [data get](https://github.com/datahq/data-cli/blob/master/docs/get.md)
5252

bin/data-push.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const info = require('../lib/utils/output/info.js')
2121

2222
const argv = minimist(process.argv.slice(2), {
2323
string: ['push', 'sheets'],
24-
boolean: ['help', 'test', 'debug', 'interactive', 'published', 'private', 'zip', 'sqlite'],
24+
boolean: ['help', 'test', 'debug', 'interactive', 'unlisted', 'private', 'zip', 'sqlite'],
2525
alias: {help: 'h', interactive: 'i', sheets: 'sheet'}
2626
})
2727

@@ -90,9 +90,9 @@ Promise.resolve().then(async () => {
9090
ownerid: config.get('profile') ? config.get('profile').id : config.get('id'),
9191
owner: config.get('profile') ? config.get('profile').username : config.get('username')
9292
}
93-
let findability = 'unlisted'
94-
if (argv.published || argv.publish || argv.public) {
95-
findability = 'published'
93+
let findability = 'published'
94+
if (argv.unlisted) {
95+
findability = 'unlisted'
9696
}
9797
if (argv.private) {
9898
findability = 'private'

docs/push.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11

22
■ data push [PATH]
3-
3+
44
`PATH` (optional) is the path to the data file or data package.
55

66
## Options:
77

88
-h, --help Output usage information.
9-
10-
--format Explicitely set the format for a file. Useful when a file does not have conventional
9+
10+
--format Explicitly set the format for a file. Useful when a file does not have conventional
1111
naming. E.g., `--format=csv`
12-
12+
1313
-i, --interactive Enable interactive mode. Useful when pushing a single file.
14-
15-
--schedule Setup a schedule so the DataHub will automatically re-import the remote file on
16-
a regular basis. E.g., `every 90s`, `every 5m`, `every 2d`. The number is always
17-
an integer, selector is `s/m/h/d/w` (second -> week) and you can’t schedule for
14+
15+
--schedule Setup a schedule so the DataHub will automatically re-import the remote file on
16+
a regular basis. E.g., `every 90s`, `every 5m`, `every 2d`. The number is always
17+
an integer, selector is `s/m/h/d/w` (second -> week) and you can’t schedule for
1818
less than 60 seconds.
19-
20-
--sheets Set which sheets should be processed when pushing Excel files. By default, only
19+
20+
--sheets Set which sheets should be processed when pushing Excel files. By default, only
2121
the first sheet is processed. You can use `--sheets=all` option to push "all" sheets.
22-
You also can list sheet numbers, e.g., `--sheets=1,2`. If you wanted to push only
22+
You also can list sheet numbers, e.g., `--sheets=1,2`. If you wanted to push only
2323
the second sheet, you would do `--sheets=2`. Sheet number starts from 1.
2424

2525
### findability options:
2626

2727
This options define the dataset visibility on the DataHub.io site:
2828

29-
--unlisted (default) Other users will not see the dataset in the search results.
30-
You will see the dataset in the search results.
29+
--public (default) Everybody can see the dataset in the search results.
3130
Everybody can access the dataset by the URL link.
3231

33-
--public Everybody can see the dataset in the search results.
32+
--unlisted Other users will not see the dataset in the search results.
33+
You will see the dataset in the search results.
3434
Everybody can access the dataset by the URL link.
3535

3636
--private Other users cannot access the dataset.
@@ -47,14 +47,14 @@ Uploads Data Package to DataHub with path (core/finance-vix/ should have datapac
4747

4848
■ data push core/finance-vix/
4949

50-
By default, all pushed datasets are unlisted. To make them published:
50+
By default, all pushed datasets are public. To make them unlisted:
51+
52+
■ data push core/finance-vix/ --unlisted
5153

52-
■ data push core/finance-vix/ --published
53-
5454
Uploads a file from URL to DataHub on weekly basis and sets file format as CSV:
5555

5656
■ data push URL --schedule="every 1w" --format=csv
57-
57+
5858
Uploads a Excel file and processes only the second sheet:
5959

6060
■ data push myExcel.xlsx --sheets=2

0 commit comments

Comments
 (0)