{ "info": { "author": "James W. Kennington", "author_email": "jameswkennington@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# solman\n\n**Sol**utions **man**ual writing utility. Though this utility is written in Python, the user is not expected to write\nany python as part of writing solutions. Rather, the solutions are written individually as markdown files (.md) in a \nmeaningful directory structure. This package aims to convert those separate solutions into a variety of outputs, \nincluding a single LaTeX file as well as Pelican-compatible blog posts / web pages. \n\nTest Result: [![CircleCI](https://circleci.com/gh/JWKennington/solman/tree/master.svg?style=svg)](https://circleci.com/gh/JWKennington/pyperbolic/tree/master)\n\n\n## Solution Groups\n\nA SolutionGroup represents a related collection of problem solutions. The problem solutions must be grouped into\nsections, by means of subdirectories. Each problem solution is a single \".md\" file, but the SolutionGroup can be \nconverted into a single LaTeX file. Exercise solution files begin with \"ex-\" prefix and problem solutions begin with \n\"prob-\" prefix (for instances when the distinction is useful).\n\n### Solution Group Structure\n\nA SolutionGroup has a few important pieces:\n\n1. **Sections** a hierarchical level of grouping for problem solutions, often a chapter or section in the text from where the problems came.\n1. **Solutions** markdown files that may include latex. Each file represents the solution to a single problem, allowing for maximum versioning across problems.\n1. **MetaData** a YAML file at the top of the directory structure containing relevant metadata fields. \n\nSpecifically, the meta data file MUST contain the following fields:\n\n- _Author_ The author of the problems\n- _Book_ The source of the problems\n- _Category_ A categorical descriptor of the group (i.e. \"Maths\" or \"Physics\") \n- _Name_ A name for the group\n- _SolutionAuthor_ The author of the solutions\n\nThe meta data file may also contain the following OPTIONAL fields:\n\n- _ISBN_ The ISBN of the text from where the problems come\n- _ReferencesFile_ A BibTex file containing references, include the \".bib\"\n- _SectionPrefix_ (default \"Chapter\") - the prefix for the section headings\n- _SolutionDate_ (default datetime.date.today) - The date of the solutions. Only set this value if the solutions are no longer likely to change.\n- _Subcategory_ A generic subcategorical label for the group, i.e. \"Linear Algebra\" or \"Mechanics\"\n- _Tags_ A comma-separated list of tags for the problems\n\n\n## Sample File Structure\n\nThe file structure below represents an example of a set of solutions called \"demo\",\nin which there are two sections (1 and 2), each of which have 1 exercise solution and \n2 problem solutions. Notice how the problem solutions are prefixed with \"prob-\" and the \nexercise solutions are prefixed with \"ex-\". Also notice how the meta file is at the top\nof the directory. The bibtex file is optional.\n\n```\ndemo\n\u251c\u2500\u2500 1\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 ex-1.md\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 prob-1.md\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 prob-2.md\n\u251c\u2500\u2500 2\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 ex-1.md\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 prob-1.md\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 prob-2.md\n\u251c\u2500\u2500 meta.yml\n\u2514\u2500\u2500 references.bib\n```\n\n## Creating a SolutionGroup\n\nCreating a SolutionGroup is simple. Once you have a directory structure that complies with above criteria, point\nthe SolutionGroup.from_meta function at your meta file, and all solution files will be automatically discovered.\nSuppose that in the above example, the \"demo\" folder is in the home directory (or \"~\"). Then the below code \nwould be sufficient to create the associated SolutionGroup:\n\n```python\n>>> from solman import SolutionGroup\n>>> s = SolutionGroup.from_meta(\"~/demo/meta.yaml\")\n>>> s.name\n\"SampleName\"\n``` \n\n\n## Converting solutions to LaTeX\n\nA SolutionGroup is capable of compiling all solutions into a single LaTeX file. Each solutions file (.md) is \nconverted from Markdown to LaTex source using PanDoc [1]. The resulting LaTeX source snippets are combined using\na Jinja template [2]. Finally, the result is converted to PDF using latexmk (to properly handle the building of\ndocument-references, i.e. table of contents or bibliography). The SolutionGroup class has a method for creating \na Latex file:\n\n```python\n>>> s.to_latex('~/sample.tex') # will output a combined LaTeX file\n```\n\n\n## Converting solutions to PDF\n\nSimilar to converting solutions to LaTeX, converting solutions to pdf (via prior conversion to LaTeX) is as simple\nas calling the \"to_pdf\" method of the SolutionGroup.\n\n```python\n>>> s.to_pdf('~/sample.pdf') # will output a combined PDF file\n```\n\n\n## References\n1. https://pandoc.org/\n1. http://jinja.pocoo.org/docs/2.10/\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": "http://github.com/JWKennington/solman", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "solman", "package_url": "https://pypi.org/project/solman/", "platform": "", "project_url": "https://pypi.org/project/solman/", "project_urls": { "Homepage": "http://github.com/JWKennington/solman" }, "release_url": "https://pypi.org/project/solman/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "Solutions manual writing utility in Python.", "version": "0.0.2" }, "last_serial": 5109184, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "47b8cb0a5b9467039417c2201a7ca746", "sha256": "cd67eaa67ee27fe2a6c8c86a4f161b52e29346397a6b73e201c05ccd11f18141" }, "downloads": -1, "filename": "solman-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "47b8cb0a5b9467039417c2201a7ca746", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13104, "upload_time": "2019-04-07T06:38:44", "url": "https://files.pythonhosted.org/packages/f6/9f/05d156816f20b8c7c1a55e0727d85469ed7840f52865519d1842f93576e5/solman-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6c4e434da2678e79acb71803a9fe8fb4", "sha256": "5479ccf5e60c3f1134439eef9e62af858cb6ec60e5b8c56429806465dba8e96b" }, "downloads": -1, "filename": "solman-0.0.1.tar.gz", "has_sig": false, "md5_digest": "6c4e434da2678e79acb71803a9fe8fb4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10137, "upload_time": "2019-04-07T06:38:46", "url": "https://files.pythonhosted.org/packages/9e/0f/25a5d861a05ad9d2a0332053818b7de9ca8f68092df3b5cb3ac2632d8c06/solman-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "54488abf7337189ea33bf809043b05e1", "sha256": "ccbfde1a6271b1a4583095bf76c87032d724fde1791d172e25f83fdc8cdb595a" }, "downloads": -1, "filename": "solman-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "54488abf7337189ea33bf809043b05e1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13153, "upload_time": "2019-04-07T07:06:33", "url": "https://files.pythonhosted.org/packages/ee/76/93964ef2748fbf1dd55dce40a045f8e25add988de11e2edab487927e87ac/solman-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e55e109bd54500984644a3bcf2cbcd9a", "sha256": "3e505415bf484a0e7d116e1c4168bf6b67966a1afc792c197f3bdeb3d43e0d12" }, "downloads": -1, "filename": "solman-0.0.2.tar.gz", "has_sig": false, "md5_digest": "e55e109bd54500984644a3bcf2cbcd9a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10161, "upload_time": "2019-04-07T07:06:34", "url": "https://files.pythonhosted.org/packages/71/b5/bd2bfbbda5d8aa7020a9589b3268309759eec929ccff53223a527937bdda/solman-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "54488abf7337189ea33bf809043b05e1", "sha256": "ccbfde1a6271b1a4583095bf76c87032d724fde1791d172e25f83fdc8cdb595a" }, "downloads": -1, "filename": "solman-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "54488abf7337189ea33bf809043b05e1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13153, "upload_time": "2019-04-07T07:06:33", "url": "https://files.pythonhosted.org/packages/ee/76/93964ef2748fbf1dd55dce40a045f8e25add988de11e2edab487927e87ac/solman-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e55e109bd54500984644a3bcf2cbcd9a", "sha256": "3e505415bf484a0e7d116e1c4168bf6b67966a1afc792c197f3bdeb3d43e0d12" }, "downloads": -1, "filename": "solman-0.0.2.tar.gz", "has_sig": false, "md5_digest": "e55e109bd54500984644a3bcf2cbcd9a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10161, "upload_time": "2019-04-07T07:06:34", "url": "https://files.pythonhosted.org/packages/71/b5/bd2bfbbda5d8aa7020a9589b3268309759eec929ccff53223a527937bdda/solman-0.0.2.tar.gz" } ] }