{ "info": { "author": "Jacques Supcik", "author_email": "jacques@supcik.net", "bugtrack_url": null, "classifiers": [], "description": "# File filter plugin for mkdocs\n\n`select-files` is a\n[mkdocs plugin](http://www.mkdocs.org/user-guide/plugins/) that filters out\nfiles (pages) using a parametrized regular expression.\n\nThe main use case for this plugin is to prepare lectures or assignments\nand only publishing them at a given date.\n\n## Quick start\n\n1. Install the module using pip: `pip3 install mkdocs-select-files`\n\n2. In your project, add a plugin configuration to `mkdocs.yml`:\n\n ```yaml\n plugins:\n - select-files:\n select: '^s(\\d+)'\n where: 'lambda x : int(x) <= 5'\n ```\n\n This would search for files named `sNN...` and select only those where `NN` is\n less than or equal to `5`.\n\n In the `where` expression, you can use the following declared variables\n - `now` : represent the current time in [ISO format](https://docs.python.org/3/library/datetime.html#datetime.datetime.isoformat)\n - `sfc` : The value of the `SELECT_FILE_CONDITION` environment variable.\n\n The modules `os` and `datetime` are imported, so you can use methods from them.\n\n## Disabling the plugin\n\nYou can disable the plugin using an environment variable. For example, you could configure\nyour site this way:\n\n```yaml\nplugins:\n - select-files:\n select: '^s(\\d+)'\n where: 'lambda x : int(x) <= 5'\n disabled_if_env: SELECT_FILES_DISABLED\n```\n\nand then, running mkdocs with `SELECT_FILES_DISABLED` set to 1 would disable this plugin\nand let all pages be processed:\n\n``` bash\nSELECT_FILES_DISABLED=1 mkdocs ...\n```\n\n## Credits\n\nThank you to [Lucy Linder](https://github.com/derlin) for her great idea of using parametrized\nregular expressions.\n\n## Similar plugins\n\n- [mkdocs-exclude](https://github.com/apenwarr/mkdocs-exclude) : exclude arbitrary file paths and\npatterns from the input\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/supcik/mkdocs-select-files", "keywords": "", "license": "Apache-2.0", "maintainer": "", "maintainer_email": "", "name": "mkdocs-select-files", "package_url": "https://pypi.org/project/mkdocs-select-files/", "platform": "", "project_url": "https://pypi.org/project/mkdocs-select-files/", "project_urls": { "Homepage": "https://github.com/supcik/mkdocs-select-files" }, "release_url": "https://pypi.org/project/mkdocs-select-files/0.3.6/", "requires_dist": [ "mkdocs" ], "requires_python": "", "summary": "Filter pages for assignments", "version": "0.3.6" }, "last_serial": 5785005, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "209676a646b6f9bf02785867d0f97548", "sha256": "1d69dbc8b198c21e17d6a8318b94190c04571d571c015aba2c6cfb08e418f38b" }, "downloads": -1, "filename": "mkdocs_select_files-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "209676a646b6f9bf02785867d0f97548", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6510, "upload_time": "2019-09-04T22:59:50", "url": "https://files.pythonhosted.org/packages/c7/80/e23fc6ca80084cf32f131a2a0d2028cb4a53099a98e3e87feb0864341b67/mkdocs_select_files-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f50c63bbcaed2b1d256a0b07cb0c5fc5", "sha256": "318623e9bfb13b3eb796567b8a4f4672547c3f07e67c47a7d3d1aca42fc94130" }, "downloads": -1, "filename": "mkdocs-select-files-0.2.0.tar.gz", "has_sig": false, "md5_digest": "f50c63bbcaed2b1d256a0b07cb0c5fc5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5965, "upload_time": "2019-09-04T22:59:52", "url": "https://files.pythonhosted.org/packages/c6/78/f1b043690986bd2a2a3bce0370ad790a3a797113165b51f7e28c97a9db38/mkdocs-select-files-0.2.0.tar.gz" } ], "0.3.6": [ { "comment_text": "", "digests": { "md5": "6406968efdf22c9891e5f0d22a0d512a", "sha256": "144bba0c591e7fe7f43244ddd92f8dd42242e2d632e6c61339fa090bcbc11e1d" }, "downloads": -1, "filename": "mkdocs_select_files-0.3.6-py2-none-any.whl", "has_sig": false, "md5_digest": "6406968efdf22c9891e5f0d22a0d512a", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7999, "upload_time": "2019-09-05T07:00:59", "url": "https://files.pythonhosted.org/packages/fd/49/a2e9f8264b1032228ad2da7fc76e1c113f8f397ba3c80988dfd267e14203/mkdocs_select_files-0.3.6-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "61477cc7c3841ad4c26e939349c22125", "sha256": "e8e185f2d5ba5307d702ac4d61f82acf43130415471fe3c715d493d4395cd763" }, "downloads": -1, "filename": "mkdocs-select-files-0.3.6.tar.gz", "has_sig": false, "md5_digest": "61477cc7c3841ad4c26e939349c22125", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6947, "upload_time": "2019-09-05T07:01:01", "url": "https://files.pythonhosted.org/packages/a5/50/787f2b6c890266006d73b2dd470c6893cc0c0678b0c116ca9b9667f2dc76/mkdocs-select-files-0.3.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6406968efdf22c9891e5f0d22a0d512a", "sha256": "144bba0c591e7fe7f43244ddd92f8dd42242e2d632e6c61339fa090bcbc11e1d" }, "downloads": -1, "filename": "mkdocs_select_files-0.3.6-py2-none-any.whl", "has_sig": false, "md5_digest": "6406968efdf22c9891e5f0d22a0d512a", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7999, "upload_time": "2019-09-05T07:00:59", "url": "https://files.pythonhosted.org/packages/fd/49/a2e9f8264b1032228ad2da7fc76e1c113f8f397ba3c80988dfd267e14203/mkdocs_select_files-0.3.6-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "61477cc7c3841ad4c26e939349c22125", "sha256": "e8e185f2d5ba5307d702ac4d61f82acf43130415471fe3c715d493d4395cd763" }, "downloads": -1, "filename": "mkdocs-select-files-0.3.6.tar.gz", "has_sig": false, "md5_digest": "61477cc7c3841ad4c26e939349c22125", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6947, "upload_time": "2019-09-05T07:01:01", "url": "https://files.pythonhosted.org/packages/a5/50/787f2b6c890266006d73b2dd470c6893cc0c0678b0c116ca9b9667f2dc76/mkdocs-select-files-0.3.6.tar.gz" } ] }