Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
some stuff to knit all of the sitemap stuff together
- Loading branch information
1 parent
8ea081f
commit c13df90
Showing
3 changed files
with
83 additions
and
94 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,20 @@ | ||
#!/usr/bin/env python | ||
"""This would typically be used once after each database update to refresh the sitemap files. | ||
It has hard-coded the path where the files should be written, which is expected to be | ||
a checkout of the Census Reporter public webapp in a directory adjacent to this repository. | ||
It also has the database connect string hardcoded, because it will only get run once or twice a year. | ||
""" | ||
from table import write_table_sitemap | ||
from profile import write_profile_sitemaps | ||
|
||
DEFAULT_OUTPUT_DIR = '../../censusreporter/censusreporter/apps/census/static/sitemap/' | ||
# this connect string uses a non-standard port, as in the case when something is being | ||
# SSH tunneled from production. Fiddle with this as appropriate. | ||
DEFAULT_CONNECT_STRING = 'postgresql://census:censuspassword@localhost:5433/census' | ||
def main(): | ||
write_table_sitemap(DEFAULT_OUTPUT_DIR,DEFAULT_CONNECT_STRING) | ||
write_profile_sitemaps(DEFAULT_OUTPUT_DIR,DEFAULT_CONNECT_STRING) | ||
if __name__ == '__main__': | ||
main() |
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
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