-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create commands.py and entry points in setup.py
- Loading branch information
Showing
2 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from ckan.lib.cli import CkanCommand | ||
|
||
import logging | ||
logger = logging.getLogger() | ||
|
||
|
||
class DataStore(CkanCommand): | ||
""" | ||
Upload all resources from the FileStore to the DataStore | ||
Usage: | ||
paster datastore [package-id] | ||
- Update all resources or just those belonging to a specific | ||
package if a package id is provided. | ||
""" | ||
summary = __doc__.split('\n')[0] | ||
usage = __doc__ | ||
min_args = 0 | ||
max_args = 1 | ||
MAX_PER_PAGE = 50 | ||
|
||
def command(self): | ||
""" | ||
Parse command line arguments and call the appropriate method | ||
""" | ||
print "here" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters