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
nmpfilter only needs to be run once; it creates .nmp files for all regions.
tmg2html, OTOH, only processes one .tmg file at a time, so it needs to be run from a for loop inside the shell script.
It might be easier to call it from Python as each .tmg file is created. If this is done every time graphs are generated, links to the .html versions could be added to http://travelmapping.net/graphs/ also.
If that could work, then that could work...
You can call/run other programs using the OS module then, I take it?
I'm divided on whether it could be a Good Thing though. Seems it may be better practice to not make siteupdate.py too reliant on a patchwork of other programs that may or may not be there, especially if someone is setting up their first instance of the site.
Two cents.
Yes, there is some benefit in keeping things relatively simple. One possibility is to have the equivalent functionality (in Python) right in siteupdate.py.
We can at the least check for existence of the program before trying to execute, like how the nmpfilter in localupdate.sh is protected in
Activity
jteresco commentedon Sep 9, 2018
You can see how I did this for nmpfilter in the latest localupdate.sh .
yakra commentedon Sep 9, 2018
nmpfilter only needs to be run once; it creates .nmp files for all regions.
tmg2html, OTOH, only processes one .tmg file at a time, so it needs to be run from a for loop inside the shell script.
jteresco commentedon Sep 9, 2018
It might be easier to call it from Python as each .tmg file is created. If this is done every time graphs are generated, links to the .html versions could be added to http://travelmapping.net/graphs/ also.
yakra commentedon Sep 11, 2018
If that could work, then that could work...
You can call/run other programs using the OS module then, I take it?
I'm divided on whether it could be a Good Thing though. Seems it may be better practice to not make siteupdate.py too reliant on a patchwork of other programs that may or may not be there, especially if someone is setting up their first instance of the site.
Two cents.
jteresco commentedon Sep 11, 2018
Yes, there is some benefit in keeping things relatively simple. One possibility is to have the equivalent functionality (in Python) right in siteupdate.py.
We can at the least check for existence of the program before trying to execute, like how the nmpfilter in localupdate.sh is protected in
jteresco commentedon Dec 31, 2022
Are we still interested in tmg2html support?
yakra commentedon Dec 31, 2022
Nah. I almost never use it anymore. Can't remember the last time.