{ "info": { "author": "https://github.com/willsALMANJ", "author_email": "wsha.code@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: X11 Applications :: Qt", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# mansel\n\n`mansel` is a Python library and command line tool for manually selecting files and directories from a tree view.\n\n## Features\n\n* Graphical user interface with a tree view of the directory structure.\n* Support for pre-selection of paths in the directory tree.\n* Running total of the size of selected directories and files.\n* Running total of selection size calculated in a background thread.\n\n## Installation\n\n`mansel` can be installed with `pip`:\n\n pip install mansel\n\nThe `mansel` package depends on `PySide2` which packages the Qt runtime and Python bindings to it.\nAlternatively, the `mansel` command line tool can be installed with\n\n pip install mansel-pyqt\n\n[mansel-pyqt](https://github.com/willsALMANJ/mansel-pyqt) depends on `PyQt5` and requires that the Qt runtime be installed separately.\n\nBoth `mansel` and `mansel-pyqt` depend on the `mansel-lib` package which can be installed directly if you want to use `mansel`'s features in another project without installing the command line tool.\n\n## Usage\n\n`mansel` can be run from the command-line with\n\n mansel --path PATH --selection SELECTION\n\nwhere `PATH` is the root path to use for file selection and `SELECTION` is a file containing a newline delimited list of paths relative to `PATH` which should be selected when the file selection window opens. Invoking `mansel` opens a dialog window with the contents of `PATH` shown as an expandable tree view with checkboxes by every file and directory. Individual files and directories can be selected and unselected and directories can be expanded to select individual files on paths below `PATH`. When `OK` is pressed to exit the window, the list of selected files and directories is printed to `stdout`.\n\n### Usage notes\n\n* If `SELECTION` is `-`, then the selection list is read from `stdin`. \n* A running tally of the current selection size is shown at the bottom of the window. The calculation is performed on a background thread. The size total is followed by \"(Calculating)\" while the selection size is being re-tallied.\n* `Cancel`, `Ctrl+W`, `Ctrl+Q` all close the window without printing to `stdout`.\n* `Ctrl+Enter` is equivalent to pressing `OK`.\n* `mansel-cli` is a wrapper for `mansel`. Effectively, installing `mansel-cli` instealls `mansel` and `PySide2` (`mansel` does not list `PySide2` as a dependency to allow it to be used with `PyQt5` as well) and sets up a wrapper sript that calls `python -m mansel`.\n\n## API\n\nWhen using `mansel` in a larger Qt project, there are two main classes for interfaces for working with the manual file selection:\n\n1. `UIDialog(root_path, selection, parent)`: a complete dialog window displaying a tree view of a file system with checkboxes for all entries.\n\n + `root_path`: top level directory to show in the tree view of the file ssytem.\n + `selection`: list of paths relative to the `root_path` of files that should be selected when the dialog window is first shown.\n + `parent`: parent Qt object for the dialog window.\n\n2. `CheckableFileSystemModel`: a data model of a file system that supports selecting items from a tree view.\n\n## Contributing\n\n`mansel` is distributed under the permissive 0BSD license.\nOutside contirubtions are welcome.\nContributions should be licensed under the 0BSD license.\nIf you want your name added to the contributors list, add it to AUTHORS.md as part of your submission.\n\nWhile the license does not require acknowledgement, acknowledgement is still appreciated if you use `mansel` in your project.\nIf you make improvements to `mansel`, please share them if sharing is feasible.\n\n## Related projects\n\n* [treesel](https://github.com/mcchae/treesel) provides a terminal-based tree view of a directory for selecting a file to print to stdout. However, it only allows for a single file to be selected. Before writing `mansel` some effort was spent looking for an existing project that could select and print files but `treesel` was not found. It was found later when doing a search to see if the name `treeselect` was available for a Python package.\n* [Urwid](http://urwid.org/) is a Python terminal interface library. One of the example projects in the Urwid documentation is a file browser naemd `browse.py` which allows for multiple selection of files and then prints out the file paths on exit.\n* [fzf](https://github.com/junegunn/fzf) is a terminal program that allows for selection of file paths through fuzzy finding of the path strings. There are many similar projects (see `fzf`'s releated projects list). `fzf` does not have a tree view but it does allow selecting and printing multiple file paths to stdout.\n\n## Future directions\n\n`mansel` meets its original design requirements (tree view file selection with the ability to preselect some files and with a running sum of the selected files' sizes). Here are some possible future improvements that could be made:\n\n* Implement a console version. This implementation would likely be based on `treesel` (using the `curses` module) or Urwid's `browse.py`. Alternatively, it could use [Prompt Toolkit](https://github.com/jonathanslenders/python-prompt-toolkit).\n\n* Improve continuous integration:\n - Run tests on new commits\n - Run nightly tests against latest versions of dependencies\n - Add pylint and pycodestyle tests\n - Add UI tests that click on checkboxes and buttons\n\n* Improve packaging:\n - Create PyPI package\n - Create conda package\n - Create other packages (PyInstaller? Linux snap package?)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/willsALMANJ/mansel", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "mansel-lib", "package_url": "https://pypi.org/project/mansel-lib/", "platform": "", "project_url": "https://pypi.org/project/mansel-lib/", "project_urls": { "Homepage": "https://github.com/willsALMANJ/mansel" }, "release_url": "https://pypi.org/project/mansel-lib/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "Library for manual file selection", "version": "0.1.0" }, "last_serial": 4426225, "releases": { "0.0.3": [ { "comment_text": "", "digests": { "md5": "e0369cb6f6073c98cba919e710b543a6", "sha256": "72e94b852638bb4550d712a612a8a33423081c60875e31a80e896ccd50c086bc" }, "downloads": -1, "filename": "mansel_lib-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "e0369cb6f6073c98cba919e710b543a6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8671, "upload_time": "2018-10-24T13:02:17", "url": "https://files.pythonhosted.org/packages/51/4e/695e792011ecd1744624707d97d9fd45ee64bf02272ca1b1a44229e33bee/mansel_lib-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fa654cf88f911304093ab67c978aac8e", "sha256": "e1d0af65436995cb0d945eeb3221039ca7e378241c5783b6f3dfe7d7be9aca1e" }, "downloads": -1, "filename": "mansel-lib-0.0.3.tar.gz", "has_sig": false, "md5_digest": "fa654cf88f911304093ab67c978aac8e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8505, "upload_time": "2018-10-24T13:02:18", "url": "https://files.pythonhosted.org/packages/3b/57/b76ab181995b2b7d4dc25474beb405789075680d3ed52b6d95121d949021/mansel-lib-0.0.3.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "05fcf3e91a1f403743b7c806c19a2030", "sha256": "c7f4509c32347acec0abd44fee27688c8f7e38b09c2bc005b8d12de06f349cdb" }, "downloads": -1, "filename": "mansel_lib-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "05fcf3e91a1f403743b7c806c19a2030", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9119, "upload_time": "2018-10-29T05:48:15", "url": "https://files.pythonhosted.org/packages/39/f1/6cf4b1a2e6fe5f4ccdfb0a4635de7a351e588fb22d083e207f4e3ce3f7d5/mansel_lib-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f8da37cc7f62610d2b60c2d34f966dc2", "sha256": "f3f76ff22ac512e91314b7363a204862d71ab7ce4afdb4765812091db4b25aa6" }, "downloads": -1, "filename": "mansel-lib-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f8da37cc7f62610d2b60c2d34f966dc2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8938, "upload_time": "2018-10-29T05:48:16", "url": "https://files.pythonhosted.org/packages/02/84/81fb0d01cec818903eedd5cd942bbc808b1695d850412c4dffcd5c17d803/mansel-lib-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "05fcf3e91a1f403743b7c806c19a2030", "sha256": "c7f4509c32347acec0abd44fee27688c8f7e38b09c2bc005b8d12de06f349cdb" }, "downloads": -1, "filename": "mansel_lib-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "05fcf3e91a1f403743b7c806c19a2030", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9119, "upload_time": "2018-10-29T05:48:15", "url": "https://files.pythonhosted.org/packages/39/f1/6cf4b1a2e6fe5f4ccdfb0a4635de7a351e588fb22d083e207f4e3ce3f7d5/mansel_lib-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f8da37cc7f62610d2b60c2d34f966dc2", "sha256": "f3f76ff22ac512e91314b7363a204862d71ab7ce4afdb4765812091db4b25aa6" }, "downloads": -1, "filename": "mansel-lib-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f8da37cc7f62610d2b60c2d34f966dc2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8938, "upload_time": "2018-10-29T05:48:16", "url": "https://files.pythonhosted.org/packages/02/84/81fb0d01cec818903eedd5cd942bbc808b1695d850412c4dffcd5c17d803/mansel-lib-0.1.0.tar.gz" } ] }