elad661 / curlbus

Terminal based UI for Israeli public transit data
41 stars 7 forks source link

hardcoded database settings in update_feed.sh #12

Closed salty-horse closed 6 years ago

salty-horse commented 6 years ago

The script update_feed.sh connects to the database with psql -d gtfs. This uses the default user, and hard-codes the database name.

I have set a different username and database in config.ini's gino.dsn. It should use this value. (Perhaps by extracting it reliably with an inline Python script that uses the configparser module.)

elad661 commented 6 years ago

I would accept a pull request that adds an inline python script, even if that means changing the format in config.ini to be easier to parse.

elad661 commented 6 years ago

I think gino has an option for getting the dsn in parts instead of in one single string, that would make it easier for such an inline script to extract the db name. Another option is to construct the dsn from parts and then pass it to gino. I'm open to ideas and even more open to pull requests :)