opentraveldata / geobases

Data services and visualization
http://opentraveldata.github.com/geobases/
Other
193 stars 41 forks source link

Sources manager #5

Closed alexprengere closed 11 years ago

alexprengere commented 11 years ago

A possible new feature would be to have a tool for managing sources.

Today there is no easy way to make persistent changes in sources or sources meta-data from the command line, or from the Python API. The only way is either:

We could have something like:

$ SourcesManager add sourcename file headers_infos [...]
$ SourcesManager list
$ SourcesManager remove sourcename

These operations would just be a way to change the Sources.yaml file from the command line, and provide a tool to copy the data (or not) to the Python site-packages. Note that today you can already use, on the develop branch:

We could also integrate zsh autocomplete update (handled by the Rakefile in completion/ today).

alexprengere commented 11 years ago

I just shipped this feature on the develop branch, though this was originally planned for the next release. But since join clauses have been implemented (see #10), it really makes sense to have a source manager tool right now.

I decided to keep only one tool, so you have to use the GeoBase main script to administrate the data sources.

$ GeoBase --admin
---------------------------------------------------------------
(*) status     : display short data source status
(*) fullstatus : display full data source configuration
(*) drop       : drop all information for one data source
(*) restore    : factory reset of all data sources information
(*) edit       : add or edit an existing data source
------------------------------------------------------- SUMMARY

[ 0 ] Command (status/fullstatus/drop/restore/edit): edit
[ 1 ] Source name : 
...

Then follow the instructions. There are a few suboptions to --admin. If you want to skip a few questions you can do things like --admin edit airlines.