{ "info": { "author": "Hans Meine, Jean-Christophe Fillion-Robin", "author_email": "hans_meine@gmx.net, jchris.fillionr@kitware.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 2" ], "description": "===============\nctk-cli-indexer\n===============\n\nThe files in this repository allow you to create an Elasticsearch_ database containing\ninformation on available CLI modules. The idea is that we have a public Kibana_ dashboard\nlisting CLI modules from multiple sources, so there is a script with two modes:\n\n'extract' mode\n Extracts JSON descriptions from a set of CLI modules (in one or more common directories). ::\n\n # ./ctk_cli_indexer.py extract --help\n usage: ctk_cli_indexer.py extract [-h] [--json_filename JSON_FILENAME]\n base_directory [base_directory ...]\n\n positional arguments:\n base_directory directories (at least one) in which to search for CLI\n module executables, or direct paths to executables\n\n optional arguments:\n -h, --help show this help message and exit\n --json_filename JSON_FILENAME, -o JSON_FILENAME\n\n This is to be run by the administrators of sites that offer CLI modules, and the idea is\n that the resulting .json files are published on some website.\n\n'index' mode\n Takes a JSON file (or a list of CLI executables) and updates an\n Elasticsearch_ database. An identifier for the source of the CLI\n modules is passed as first parameter, and the script takes care to\n delete old documents in the database (CLIs that got removed), and\n will also maintain timestamps of the last change of each CLI\n (i.e. not re-upload stuff that did not change, as well as mark each\n change with the modification time of the CLI executable that\n introduced the change). Instead of passing a JSON file, you may also\n pass a list of directories or CLI executables directly. ::\n\n # ./ctk_cli_indexer.py index --help\n usage: ctk_cli_indexer.py index [-h] [--host HOST] [--port PORT]\n source_name path [path ...]\n\n positional arguments:\n source_name identifier for the source (e.g. 'slicer' or 'nifty-reg') of\n this set of CLI modules (will be used to remove old documents\n from this source from the Elasticsearch index if they are no\n longer present)\n path one or more directories in which to search for CLI module\n executables, paths to CLI executables, or (exactly one) JSON\n file as created by `extract` subcommand\n\n optional arguments:\n -h, --help show this help message and exit\n --host HOST hostname elasticsearch is listening on (default: localhost)\n --port PORT port elasticsearch is listening on (default: 9200)\n\n This script should be run by a cron job (i.e. setup by a CTK administrator), from a script\n that pulls the above-mentioned .json URLs regularly and updates a central database.\n A Kibana_ dashboard will then give interested people an overview over the available modules\n from multiple sites.\n\n.. _Elasticsearch: http://www.elasticsearch.org/overview/elasticsearch/\n.. _Kibana: http://www.elasticsearch.org/overview/kibana/\n \nSystem Prerequisites\n====================\n\nThe following software packages are required to be installed on your system:\n\n* `Python `_\n* `pip `_ (recommended for installation)\n* `Git `_ (for developer only)\n\nThe following python packages will be automatically installed if not present (see\n`requirements.txt`, listed here in case you prefer to install them via your system's\npackage manager):\n\n* `simplejson `_\n* `elasticsearch-py `_\n* `ctk-cli `_\n\nInstallation for user\n=====================\n\nUse ``pip`` (or ``easy_install``) for installation from pypi_::\n\n pip install ctk-cli-indexer\n\n.. _pypi: https://pypi.python.org/pypi\n \nInstallation for developer\n==========================\n\nFirst download the source::\n\n git clone git://github.com/commontk/ctk-cli-indexer.git\n\nTo use the module, you must install some external python package\ndependencies: ::\n\n cd ctk-cli-indexer\n pip install -r requirements.txt\n\nElasticsearch Setup\n===================\n\nIn order to use this code, you must have access to a running Elasticsearch_ server. This\nsection shall give just the basic instructions for getting started. First, download_ the\nlatest stable elasticsearch and kibana tarballs (logstash is not necessary / used here).\n\nElasticsearch_ is written in Java, so you can basically unpack the tarball and run\n``bin/elasticsearch``, and the server should be running on http://localhost:9200/ (yes,\nyou can just try that URL in the browser, and you should get some status JSON). This\ndefault location is also built into the indexer script, so you may immediately start\nindexing. One may use http://localhost:9200/cli/cli/_search?pretty=1 to check whether\nthere is data in the index.\n\nKibana_ is a purely browser-based web application (based on client-side HTML and JS), so\nyou can serve the files using any kind of HTTP server, e.g.::\n\n cd kibana-3.1.1/\n python -m SimpleHTTPServer\n\nwhich will serve Kibana on http://localhost:8000/ You may even be able to use Kibana\nwithout any HTTP server, just by opening ``kibana-x.y.z/index.html`` within your browser.\nIn that case, you may want to edit ``config.js`` to point to the server like this::\n\n elasticsearch: \"http://localhost:9200\",\n\nThat's it! If you see the welcome dashboard in the browser, you're all set. Note that\nyou can even store dashboards within Kibana; by default, they will be stored within\nElasticsearch, so you don't even have to care about filesystem access.\n\n.. _download: http://www.elasticsearch.org/overview/elkdownloads/\n\nFirst Steps with Kibana\n=======================\n\nI suggest to start with a blank dashboard (link at the bottom of the default dashboard).\nStart by going to the dashboard settings (cog in the upper right corner) and under\n\"Index\", select 'cli' as default index and enable autocompletion under \"Preload Fields\".\n\nNext, add rows (\"Rows\" tab in the dashboard settings), for instance, one with 200px\nheight, one with 300px, and a third with 500px. Don't forget to press \"Create Row\" for\neach row (in particular, also for the last one), then press \"Save\".\n\nWithin each row, there is an (invisible) 12-column layout, so you want to add \"widgets\"\nnow that span either 3 or 4 such columns. Start with \"Terms\" widgets only, try different\nfields (e.g. \"license\"), and different view options (in particular, the bar/pie/table\nstyles).\n\nThe widgets allow interactive filtering, e.g. click on a specific term to filter by\nlicense / author / source / category; active filters will be listed and can be cleared at\nthe top (make sure that line is not collapsed). There is also a search row where you can\ntry entering keywords.\n\nThe last row (which we made particularly high) was intended for a \"Table\" widget (like on\nthe sample dashboard), which can be used to list all matching documents.\n\nNow play around with the various options, and don't forget to save your dashboard (floppy\nsymbol near the upper right corner). If you enable \"Save to > Export\" and \"Load from >\nLocal file\" under \"Controls\" in the dashboard settings, you can also download/upload the\ndashboard as JSON. Furthermore, you can make the dashboard your default/home dashboard.\nWithin this repository, you also find an example dashboard in the file `cli_dashboard.json`.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/commontk/ctk-cli-indexer", "keywords": null, "license": "Apache 2.0", "maintainer": null, "maintainer_email": null, "name": "ctk-cli-indexer", "package_url": "https://pypi.org/project/ctk-cli-indexer/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ctk-cli-indexer/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/commontk/ctk-cli-indexer" }, "release_url": "https://pypi.org/project/ctk-cli-indexer/0.6/", "requires_dist": null, "requires_python": null, "summary": "Python utilities for creating an ElasticSearch database containing information on available CLI modules", "version": "0.6" }, "last_serial": 2032724, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "7df59e0803249c951a10d9134ecc2550", "sha256": "fc68ba8d22548038dbb4545156d47673714628f61065d102f1beb02e4b9124f3" }, "downloads": -1, "filename": "ctk-cli-indexer-0.2.tar.gz", "has_sig": false, "md5_digest": "7df59e0803249c951a10d9134ecc2550", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6446, "upload_time": "2016-01-05T19:48:06", "url": "https://files.pythonhosted.org/packages/98/84/a886881f61cfc45491b68f65824ee7bba880511487f3e4776b4f4d3e2882/ctk-cli-indexer-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "3553fe7f5a64e45f310eae05820fccd3", "sha256": "9769a4e580ea507061d9ed8942f53b2518a6a5e85a2273c5326389624a5bc968" }, "downloads": -1, "filename": "ctk-cli-indexer-0.3.tar.gz", "has_sig": false, "md5_digest": "3553fe7f5a64e45f310eae05820fccd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7583, "upload_time": "2016-01-05T20:18:03", "url": "https://files.pythonhosted.org/packages/1c/5a/9ff6bb40ad23930ef018f92d9efc4f53f48f97c07b28b76b5d1e42164151/ctk-cli-indexer-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "d0336305781e14115dc196b834970c59", "sha256": "043f0dc06126c9f7df01000bbfb4502592753ffd0c3bcb3b9f60898bd044cee9" }, "downloads": -1, "filename": "ctk-cli-indexer-0.4.tar.gz", "has_sig": false, "md5_digest": "d0336305781e14115dc196b834970c59", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7720, "upload_time": "2016-01-05T20:27:27", "url": "https://files.pythonhosted.org/packages/c7/67/b5169585b3512fbda8f63b68689619afa39a5d2fbe2757130150d550ea77/ctk-cli-indexer-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "be319ce203d71b6ff702b15477565da8", "sha256": "e76a6fe1b7ec3b468acc5452f8b2355ebde951323017fe5a91e38fb93ab7bba4" }, "downloads": -1, "filename": "ctk-cli-indexer-0.5.tar.gz", "has_sig": false, "md5_digest": "be319ce203d71b6ff702b15477565da8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7963, "upload_time": "2016-01-05T21:49:22", "url": "https://files.pythonhosted.org/packages/7b/df/db470adacac000ea3073e48619a40308c343000abe08f0a413a3774670bb/ctk-cli-indexer-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "be5d78129224757aae96f0368c51f07d", "sha256": "529d0e63c6b6a6215a7c407d1c270ccde2eaf9080042b2a5834762603af5c0c4" }, "downloads": -1, "filename": "ctk-cli-indexer-0.6.tar.gz", "has_sig": false, "md5_digest": "be5d78129224757aae96f0368c51f07d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8180, "upload_time": "2016-01-07T21:54:10", "url": "https://files.pythonhosted.org/packages/34/fa/a2635978fabe221ca2b40f15c3763f80f33ff1d744a8ad32182dca71b3c6/ctk-cli-indexer-0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "be5d78129224757aae96f0368c51f07d", "sha256": "529d0e63c6b6a6215a7c407d1c270ccde2eaf9080042b2a5834762603af5c0c4" }, "downloads": -1, "filename": "ctk-cli-indexer-0.6.tar.gz", "has_sig": false, "md5_digest": "be5d78129224757aae96f0368c51f07d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8180, "upload_time": "2016-01-07T21:54:10", "url": "https://files.pythonhosted.org/packages/34/fa/a2635978fabe221ca2b40f15c3763f80f33ff1d744a8ad32182dca71b3c6/ctk-cli-indexer-0.6.tar.gz" } ] }