{"action":"created","issue":{"url":"https://api.github.com/repos/insomnia-lab/libreant/issues/67","labels_url":"https://api.github.com/repos/insomnia-lab/libreant/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/insomnia-lab/libreant/issues/67/comments","events_url":"https://api.github.com/repos/insomnia-lab/libreant/issues/67/events","html_url":"https://github.com/insomnia-lab/libreant/pull/67","id":54899668,"number":67,"title":"Elasticsearch configurable and with management scripts","user":{"login":"boyska","id":14236,"avatar_url":"https://avatars.githubusercontent.com/u/14236?v=3","gravatar_id":"","url":"https://api.github.com/users/boyska","html_url":"https://github.com/boyska","followers_url":"https://api.github.com/users/boyska/followers","following_url":"https://api.github.com/users/boyska/following{/other_user}","gists_url":"https://api.github.com/users/boyska/gists{/gist_id}","starred_url":"https://api.github.com/users/boyska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boyska/subscriptions","organizations_url":"https://api.github.com/users/boyska/orgs","repos_url":"https://api.github.com/users/boyska/repos","events_url":"https://api.github.com/users/boyska/events{/privacy}","received_events_url":"https://api.github.com/users/boyska/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/insomnia-lab/libreant/labels/cli","name":"cli","color":"666666"},{"url":"https://api.github.com/repos/insomnia-lab/libreant/labels/DB%20api","name":"DB api","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/insomnia-lab/libreant/milestones/2","labels_url":"https://api.github.com/repos/insomnia-lab/libreant/milestones/2/labels","id":943468,"number":2,"title":"0.2","description":"This milestone is focused on:\r\n* documentation\r\n* having authentication / authorization\r\n* management scripts\r\n\r\nSo to get nearer to a real deploy somewhere!","creator":{"login":"ael-code","id":4229536,"avatar_url":"https://avatars.githubusercontent.com/u/4229536?v=3","gravatar_id":"","url":"https://api.github.com/users/ael-code","html_url":"https://github.com/ael-code","followers_url":"https://api.github.com/users/ael-code/followers","following_url":"https://api.github.com/users/ael-code/following{/other_user}","gists_url":"https://api.github.com/users/ael-code/gists{/gist_id}","starred_url":"https://api.github.com/users/ael-code/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ael-code/subscriptions","organizations_url":"https://api.github.com/users/ael-code/orgs","repos_url":"https://api.github.com/users/ael-code/repos","events_url":"https://api.github.com/users/ael-code/events{/privacy}","received_events_url":"https://api.github.com/users/ael-code/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":0,"state":"open","created_at":"2015-01-20T12:57:04Z","updated_at":"2015-01-30T22:36:02Z","due_on":null,"closed_at":null},"comments":29,"created_at":"2015-01-20T15:53:47Z","updated_at":"2015-01-31T10:21:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/insomnia-lab/libreant/pulls/67","html_url":"https://github.com/insomnia-lab/libreant/pull/67","diff_url":"https://github.com/insomnia-lab/libreant/pull/67.diff","patch_url":"https://github.com/insomnia-lab/libreant/pull/67.patch"},"body":"The first commit is about #61 : making the index_name configurable, so that you can run multiple webant webservers, with different dbs, on a single elasticsearch instance. The option is `ES_INDEXNAME`\r\n\r\nSince it changes some default (before, the hardcoded index was `book`; now there's a default one, which is `libreant`), I thought it was a good moment to create some nice utility to export/import/search things from the db.\r\n\r\nFor example, this is a \"migration\" script from `book` to `libreant`\r\n```sh\r\nWEBANT_ES_INDEXNAME=book libreant-manage db_export | libreant-manage db_import -\r\n```\r\n\r\nYou can do searches with `db_search`, export single items with `db_item_export` and import them with `db_import`.\r\n\r\nWant to do a complete dump of your db? `libreant-manage db_export > dbdump.json` is what you need.\r\n\r\nImplementation is based on Flask-Script, which is a very common extension to make the creation of commands very easy. You can see that `manage.py` is actually quite simple, and adding new commands should be very easy.\r\n\r\nAlso, Flask-Script comes bundled with a nice \"shell\" command, which will just open a shell. If you install ipython (`pip install ipython`), the shell will be more interactive, with tab_completion and other niceties: really helpful when coding or debugging"},"comment":{"url":"https://api.github.com/repos/insomnia-lab/libreant/issues/comments/72312371","html_url":"https://github.com/insomnia-lab/libreant/pull/67#issuecomment-72312371","issue_url":"https://api.github.com/repos/insomnia-lab/libreant/issues/67","id":72312371,"user":{"login":"boyska","id":14236,"avatar_url":"https://avatars.githubusercontent.com/u/14236?v=3","gravatar_id":"","url":"https://api.github.com/users/boyska","html_url":"https://github.com/boyska","followers_url":"https://api.github.com/users/boyska/followers","following_url":"https://api.github.com/users/boyska/following{/other_user}","gists_url":"https://api.github.com/users/boyska/gists{/gist_id}","starred_url":"https://api.github.com/users/boyska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boyska/subscriptions","organizations_url":"https://api.github.com/users/boyska/orgs","repos_url":"https://api.github.com/users/boyska/repos","events_url":"https://api.github.com/users/boyska/events{/privacy}","received_events_url":"https://api.github.com/users/boyska/received_events","type":"User","site_admin":false},"created_at":"2015-01-31T10:21:14Z","updated_at":"2015-01-31T10:21:14Z","body":"sure I can wait :)"}}