{ "info": { "author": "makoto tsuyuki", "author_email": "mtsuyuki@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: MIT License", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Topic :: Documentation" ], "description": "# biisan\n\n[![travis](https://travis-ci.org/tsuyukimakoto/biisan.svg?branch=master)](https://travis-ci.org/tsuyukimakoto/biisan) [![codecov](https://codecov.io/gh/tsuyukimakoto/biisan/branch/master/graph/badge.svg)](https://codecov.io/gh/tsuyukimakoto/biisan) [![Updates](https://pyup.io/repos/github/tsuyukimakoto/biisan/shield.svg)](https://pyup.io/repos/github/tsuyukimakoto/biisan/) [![Python 3](https://pyup.io/repos/github/tsuyukimakoto/biisan/python-3-shield.svg)](https://pyup.io/repos/github/tsuyukimakoto/biisan/)[![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)[![codebeat badge](https://codebeat.co/badges/e5a0ad5d-baab-4795-b07d-e03594b477d4)](https://codebeat.co/projects/github-com-tsuyukimakoto-biisan-master)\n\nbiisan is a static site generator that can write documents in [reStructuredText](http://docutils.sourceforge.net/rst.html).\n\n## Feature\n\n- Convert the structure of reStructuredText to the structure of object, and output to html with jinja2 template for each [Directives](http://docutils.sourceforge.net/docs/user/rst/cheatsheet.txt) of reStructuredText\n- The default template is attached for the directives supported by biisan, but the template to be used can be replaced if the search destination is set in the configuration\n- The conversion processor from directive to object can also replace any processor by setting\n- The processing of the directive which is not supported is also possible by the same mechanism as replacement.\n- Easy definition of new directives\n- The process of converting the structure of reStructuredText to an object is performed in parallel in multiprocessing\n\n## quick start\n\n### Installation\n\nIt can be installed with pip. Since dependent libraries are also installed at the same time, you may want to create and install a virtual environment using venv if you want to be able to erase them cleanly.\n\n```\n$ pip install biisan\n```\n\n### Initialize\n\nGenerate the basic structure of biisan and configuration file. There is a folder called `biisan_data` under the folder you have run.\n\nAnswer `blog title`, `base URL`, `language code` as it is asked. You can change it later in the configuration file.\n\n```\n$ python -m biisan.main\n? What's your blog title blog title\n? input your blog base url. like https://www.tsuyukimakoto.com http:localhost\n? input your blog language like ja en\n\n Always set environment variable BIISAN_SETTINGS_MODULE to biisan_local_settings like bellow.\n\n $ export BIISAN_SETTINGS_MODULE=biisan_local_settings\n\n```\n\nFinally, the environment variables required whenever using biisan are output. It is an environment variable that is always required when using biisan.\n\nIt is a setting framework setting of [glueplate](https://pypi.org/project/glueplate/).\n\n### First Entry\n\nLet's check the contents of the generated folder.\n\n```\n$ cd biisan_data\n$ tree\n.\n\u251c\u2500\u2500 data\n\u2502 \u251c\u2500\u2500 biisan_local_settings.py\n\u2502 \u251c\u2500\u2500 blog\n\u2502 \u251c\u2500\u2500 extra\n\u2502 \u2502 \u2514\u2500\u2500 about.rst\n\u2502 \u2514\u2500\u2500 templates\n\u2514\u2500\u2500 out\n```\n\nInside the `biisan_data` folder there are two folders, `data` and `out`.\n\n- data\n\n - biisan_local_settings.py\n\n setting file. It has been added to or overwritten in the [Original file settings](https://github.com/tsuyukimakoto/biisan/blob/master/biisan/biisan_settings.py) settings.\n\n - blog\n\n Put the reStructuredText file in this. It is good to make a folder so that it is easy to organize. The folder structure in the blog folder has nothing to do with the path of the output URL.\n\n - extra\n\n Put the file if you want to create a separate page from the date based entry. about is set by default.\n When newly added, add the definition of GLUE_PLATE_PLUS_BEFORE_extra to the setting file (data/biisan_local_settings.py).\n\n For example, if you put the file imusing.rst, define `GLUE_PLATE_PLUS_BEFORE_extra` in `data/biisan_local_settings.py` as follows.\n\n ```\n # Omitted\n\n settings = _(\n # \u7701\u7565\n multiprocess = 8,\n GLUE_PLATE_PLUS_BEFORE_extra = [\n 'imusing',\n ],\n )\n ```\n\n This is how glueplate works, ['imusing' before the `extra` setting in the [original file settings file](https://github.com/tsuyukimakoto/biisan/blob/master/biisan/biisan_settings.py) ',] Is added.\n\n See also [Actual setting](https://github.com/tsuyukimakoto/tsuyukimakoto.com/blob/master/data/biisan_local_settings.py#L19).\n\n - templates\n\n Put the template you want to overwrite. Like `GLUE_PLATE_PLUS_BEFORE_extra`, `GLUE_PLATE_PLUS_BEFORE_template_dirs` is defined in the configuration file, so first we will start looking for template files in this folder.\n\n- out\n\n Html is output statically in this folder.\n\n### This is the first entry\n\nLet's save as `my_first_entry.rst` in `data/blog` as follows. The file name may be anything before the file extension, as long as the extension is .rst.\n\n```\nIs the first entry\n=========================================================\n\n:slug: my_first_biisan_entry\n:date: 2019-05-05 13:00\n:author: Your name\n\nHello! world!\n```\n\n### Build\n\nThe operation is done in the `data` directory (in biisan_data/data).\n\n```\n$ python -m biisan.generate\n```\n\nIf you get an error like the following, it is because you have not set the environment variable displayed at the time of initialization.\n\n```\nTraceback (most recent call last):\n(Omitted)\nKeyError: 'BIISAN_SETTINGS_MODULE'\n```\n\nIf you have not set the environment variable, try setting again and executing the command again.\n\n```\n$ export BIISAN_SETTINGS_MODULE=biisan_local_settings\n$ python -m biisan.generate\n```\n\nIf you get the following error, the folder where you are executing the command is wrong. Let's execute it in `biisan_data/data`.\n\n```\nTraceback (most recent call last):\n(Omitted)\nModuleNotFoundError: No module named 'biisan_local_settings'\n```\n\nIf it works, the output is as follows, so let's open it in a browser.\n\n```\n$ python -m biisan.generate\nBIISAN 0.3.0\nINFO:__main__:Write:(omitted)/biisan_data/out/blog/2019/05/05/my_first_biisan_entry/index.html\nINFO:__main__:Write:(omitted)/biisan_data/out/about/index.html\n```\n\nThe URL is composed of `date` and `slug` described in the entry. At this point, the data folder and the out folder are as follows.\n\n```\n.\n\u251c\u2500\u2500 data\n\u2502 \u251c\u2500\u2500 __pycache__\n\u2502 \u2502 \u2514\u2500\u2500 biisan_local_settings.cpython-37.pyc\n\u2502 \u251c\u2500\u2500 biisan_local_settings.py\n\u2502 \u251c\u2500\u2500 blog\n\u2502 \u2502 \u2514\u2500\u2500 my_first_entry.rst\n\u2502 \u251c\u2500\u2500 extra\n\u2502 \u2502 \u2514\u2500\u2500 about.rst\n\u2502 \u2514\u2500\u2500 templates\n\u2514\u2500\u2500 out\n \u251c\u2500\u2500 about\n \u2502 \u2514\u2500\u2500 index.html\n \u251c\u2500\u2500 api\n \u2502 \u251c\u2500\u2500 feed\n \u2502 \u2502 \u2514\u2500\u2500 index.xml\n \u2502 \u2514\u2500\u2500 google_sitemaps\n \u2502 \u2514\u2500\u2500 index.xml\n \u251c\u2500\u2500 blog\n \u2502 \u251c\u2500\u2500 2019\n \u2502 \u2502 \u2514\u2500\u2500 05\n \u2502 \u2502 \u251c\u2500\u2500 05\n \u2502 \u2502 \u2502 \u2514\u2500\u2500 my_first_biisan_entry\n \u2502 \u2502 \u2502 \u2514\u2500\u2500 index.html\n \u2502 \u2502 \u2514\u2500\u2500 index.html\n \u2502 \u2514\u2500\u2500 index.html\n \u2514\u2500\u2500 index.html\n```\n\nAlthough the file name is index.html, it is assumed that it can be omitted by specifying the directory index of the Web server.\n\nFor example, `https://www.tsuyukimakoto.com/about/` should be set to return index.html if the file name is omitted.\n\nThe entry path is created based on `slug` and `date` described in the entry rst file.\n\n```\n:slug: my_first_biisan_entry\n:date: 2019-05-05 13:00\n```\n\n## template\n\nA template is provided for each directive. Put templates in the templates folder if you want to change the style etc.\n\n[Default template](https://github.com/tsuyukimakoto/biisan/tree/master/biisan/templates) and [real project template](https://github.com/tsuyukimakoto/tsuyukimakoto.com/tree/master/data/templates).\n\n## Deploy\n\nDeploy the contents of out to an appropriate server. Don't forget to specify the directory index.", "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/tsuyukimakoto/biisan", "keywords": "static site generator,docutils,customizable", "license": "", "maintainer": "", "maintainer_email": "", "name": "biisan", "package_url": "https://pypi.org/project/biisan/", "platform": "", "project_url": "https://pypi.org/project/biisan/", "project_urls": { "Homepage": "https://github.com/tsuyukimakoto/biisan" }, "release_url": "https://pypi.org/project/biisan/0.8.2/", "requires_dist": null, "requires_python": "", "summary": "Static site generator.", "version": "0.8.2", "yanked": false, "yanked_reason": null }, "last_serial": 6027653, "releases": { "0.8.1": [ { "comment_text": "", "digests": { "md5": "06dee8f7c05752b48b36dc75282158c0", "sha256": "07344849a8c35e2491a41b32785fc097ae0dbece89c48559aa36bcd2b196c15b" }, "downloads": -1, "filename": "biisan-0.8.1.tar.gz", "has_sig": false, "md5_digest": "06dee8f7c05752b48b36dc75282158c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19055, "upload_time": "2019-05-06T03:18:40", "upload_time_iso_8601": "2019-05-06T03:18:40.257105Z", "url": "https://files.pythonhosted.org/packages/fc/f2/b090df3bed3697bc4e408baa92c1671fc6aac3878cc69d4c24e1030c0dda/biisan-0.8.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.8.2": [ { "comment_text": "", "digests": { "md5": "647041d528b06c7b0c73b86507f935bb", "sha256": "a27404391225a5f90e2da8cc6f77965d594492e853f8d2afaf701eccc2b20ee8" }, "downloads": -1, "filename": "biisan-0.8.2.tar.gz", "has_sig": false, "md5_digest": "647041d528b06c7b0c73b86507f935bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20233, "upload_time": "2019-10-25T05:30:45", "upload_time_iso_8601": "2019-10-25T05:30:45.340556Z", "url": "https://files.pythonhosted.org/packages/82/fb/de9bebea3b097d72804c5bfe996dd44e2019bd26d46de3bc05c5f587c800/biisan-0.8.2.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "647041d528b06c7b0c73b86507f935bb", "sha256": "a27404391225a5f90e2da8cc6f77965d594492e853f8d2afaf701eccc2b20ee8" }, "downloads": -1, "filename": "biisan-0.8.2.tar.gz", "has_sig": false, "md5_digest": "647041d528b06c7b0c73b86507f935bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20233, "upload_time": "2019-10-25T05:30:45", "upload_time_iso_8601": "2019-10-25T05:30:45.340556Z", "url": "https://files.pythonhosted.org/packages/82/fb/de9bebea3b097d72804c5bfe996dd44e2019bd26d46de3bc05c5f587c800/biisan-0.8.2.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }