{"action":"created","issue":{"url":"https://api.github.com/repos/adicu/adi-website/issues/187","labels_url":"https://api.github.com/repos/adicu/adi-website/issues/187/labels{/name}","comments_url":"https://api.github.com/repos/adicu/adi-website/issues/187/comments","events_url":"https://api.github.com/repos/adicu/adi-website/issues/187/events","html_url":"https://github.com/adicu/adi-website/pull/187","id":68983642,"number":187,"title":"Write a script to load mongo with test data","user":{"login":"danrschlosser","id":2433509,"avatar_url":"https://avatars.githubusercontent.com/u/2433509?v=3","gravatar_id":"","url":"https://api.github.com/users/danrschlosser","html_url":"https://github.com/danrschlosser","followers_url":"https://api.github.com/users/danrschlosser/followers","following_url":"https://api.github.com/users/danrschlosser/following{/other_user}","gists_url":"https://api.github.com/users/danrschlosser/gists{/gist_id}","starred_url":"https://api.github.com/users/danrschlosser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danrschlosser/subscriptions","organizations_url":"https://api.github.com/users/danrschlosser/orgs","repos_url":"https://api.github.com/users/danrschlosser/repos","events_url":"https://api.github.com/users/danrschlosser/events{/privacy}","received_events_url":"https://api.github.com/users/danrschlosser/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-16T18:33:01Z","updated_at":"2015-04-27T22:38:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/adicu/adi-website/pulls/187","html_url":"https://github.com/adicu/adi-website/pull/187","diff_url":"https://github.com/adicu/adi-website/pull/187.diff","patch_url":"https://github.com/adicu/adi-website/pull/187.patch"},"body":"Review: @eunicekokor @RaymondXu  @natebrennand @jettca \r\n\r\nThis solution is better than just using a backup file, because it creates events and blog posts centered around the current date, so that any UI differences can be seen.\r\n\r\n##### Move Google+ auth to `authorize.py`\r\n\r\n```bash\r\n$ python authorize.py -h\r\nusage: authorize.py [-h] [--auth_host_name AUTH_HOST_NAME]\r\n                    [--noauth_local_webserver]\r\n                    [--auth_host_port [AUTH_HOST_PORT [AUTH_HOST_PORT ...]]]\r\n                    [--logging_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}]\r\n\r\noptional arguments:\r\n  -h, --help            show this help message and exit\r\n  --auth_host_name AUTH_HOST_NAME\r\n                        Hostname when running a local web server.\r\n  --noauth_local_webserver\r\n                        Do not run a local web server.\r\n  --auth_host_port [AUTH_HOST_PORT [AUTH_HOST_PORT ...]]\r\n                        Port web server should listen on.\r\n  --logging_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}\r\n                        Set the logging level of detail.\r\n```\r\n\r\n##### Clean up `manage.py` usage\r\n\r\n```bash\r\n$ python manage.py\r\nUsage:\r\n\r\n    python manage.py migrate blog|images\r\n\r\n        Migrates Jekyll data.  This can be run with:\r\n        - blog: Backfills blog posts from data/old-website-data/posts.\r\n        - images: Imports images from data/old-website-data/images.\r\n\r\n    python manage.py db images|events|posts|all <options>\r\n\r\n        Populates the database with test data. This can be run with:\r\n            images: Downloads several dummy images and adds them to Eventum.\r\n            events: Creates several events, with images if any exist.\r\n            posts: Creates several blog posts, with images if any exist.\r\n            all: All of the above.\r\n\r\n        Available options:\r\n            --quiet  (-q): Runs with minimal output\r\n            --wipe   (-w): Wipes related databases.  If omitted, records that\r\n                           already exist will not be updated.\r\n            --force  (-f): Doesn't ask before wiping database.  Only relevant\r\n                           if the --wipe option is used.\r\n```\r\n\r\n##### Cleanup the `script` folder and write everything in `script/db`\r\n\r\n```bash\r\n$script\r\n├── README.md\r\n├── __init__.py\r\n├── cli.py\r\n├── db\r\n│   ├── __init__.py\r\n│   ├── events.py\r\n│   ├── gen.py\r\n│   ├── images.py\r\n│   ├── lorem.py\r\n│   └── posts.py\r\n└── migrate\r\n    ├── __init__.py\r\n    ├── backfill_blog.py\r\n    ├── convert.sh\r\n    ├── html-to-md\r\n    ├── import_images.py\r\n    ├── list_images.sh\r\n    ├── post-to-content\r\n    └── print-images-from-md\r\n```"},"comment":{"url":"https://api.github.com/repos/adicu/adi-website/issues/comments/96840606","html_url":"https://github.com/adicu/adi-website/pull/187#issuecomment-96840606","issue_url":"https://api.github.com/repos/adicu/adi-website/issues/187","id":96840606,"user":{"login":"jettca","id":2433202,"avatar_url":"https://avatars.githubusercontent.com/u/2433202?v=3","gravatar_id":"","url":"https://api.github.com/users/jettca","html_url":"https://github.com/jettca","followers_url":"https://api.github.com/users/jettca/followers","following_url":"https://api.github.com/users/jettca/following{/other_user}","gists_url":"https://api.github.com/users/jettca/gists{/gist_id}","starred_url":"https://api.github.com/users/jettca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jettca/subscriptions","organizations_url":"https://api.github.com/users/jettca/orgs","repos_url":"https://api.github.com/users/jettca/repos","events_url":"https://api.github.com/users/jettca/events{/privacy}","received_events_url":"https://api.github.com/users/jettca/received_events","type":"User","site_admin":false},"created_at":"2015-04-27T22:38:47Z","updated_at":"2015-04-27T22:38:47Z","body":"too much for me to read through in detail right now but given we've already talked about chunks of the code a fair amount, it looks good to me"}}