{ "info": { "author": "Facundo Batista", "author_email": "facundo@taniquetil.com.ar", "bugtrack_url": null, "classifiers": [], "description": "certg\n=====\n\nA certificate generator, from a SVG to a lot of PDFs\n\nHow to use it as a lib\n----------------------\n\nInstall certg from PyPI and then...\n\n::\n\n >>> import certg\n >>> certg.process(\n svg_source,\n result_prefix,\n result_distinct,\n replace_info,\n progress_cb=None,\n pdf_optimized=False)\n\n... where all mandatory parameters have the same meaning that if you have them\nin the YAML config (see below), and `progress_cb` is a callback to be called\nafter processing each item (useful to report progress).\n\n\nSome usage examples\n-------------------\n\nGet the code, and run::\n\n bin/certg examples/certificate.yaml\n\nThe `example_certificate.yaml` is included in the project, with the\nother file it uses: `example_certificate.svg`.\n\nAfter successful execution, you will get three `.pdf` files, the result\nof the generation.\n\nHere's other example that inserts different images in the outputs::\n\n bin/certg examples/carnet.yaml\n\nFinally, if you want to check a code that uses `certg` programatically,\nreplacing several fields and *multiple* images in the SVG, see\n`this real life code `_.\n\n\nWhat do you need to have installed\n----------------------------------\n\nThe Python's module `yaml` and `Inkscape` in your system. If you want to\noptimize the resulting PDF, also need Ghostscript installed (`gs`).\n\n\nHow to really use it, for your specific needs\n---------------------------------------------\n\nYou need to create two files: the configuration, and the source SVG.\nHere's a deep explanation of how it all works, but remember you can\nget the examples provided and start tweaking them :)\n\nThe source SVG is the SVG you want to transform into PDFs, but with\nsome indications for text to be replaced in. These indications are\nbetween curly brackets. For example, you may have::\n\n Thanks {{name}} for all your {{type_of_doing}}!\n\nThen, in the configuration file you have a `replace_info` variable: it's\na list of dictionaries. Each dictionary will produce a generated PDF with\nthe info replaced, and the keys/values in that dictionary will be the\ninfo to replace.\n\nNote that you need to provide in the config all the attributes to\nreplace; for example::\n\n name: Foo Bar\n type_of_doing: support\n\nFurthermore, in the config you have some mandatory variables you need\nto fill. Those are:\n\n- `svg_source`: the filename of the SVG you created\n\n- `result_prefix`: the prefix of the PDFs' filenames that will\n be generated\n\n- `result_distinct`: the name of the variable in the replacing\n attributes used as a distinct string for the PDFs.\n\nFor example, if you put `certs` as the prefix and `name` as the\ndistinct value, you'll get as output a file named `certs-foobar.pdf`.\n\nThere are some optional variables for different configurations, currently:\n\n- `pdf_optimized`: it will run Ghoscript (`gs`, which you need to have\n installed in the system) to optimize the resulting PDF.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/facundobatista/certg", "keywords": "", "license": "GPL-3", "maintainer": "", "maintainer_email": "", "name": "certg", "package_url": "https://pypi.org/project/certg/", "platform": "", "project_url": "https://pypi.org/project/certg/", "project_urls": { "Homepage": "https://github.com/facundobatista/certg" }, "release_url": "https://pypi.org/project/certg/4.2/", "requires_dist": null, "requires_python": "", "summary": "A certificate generator, from a SVG to a lot of PDFs", "version": "4.2" }, "last_serial": 4661689, "releases": { "3.0": [ { "comment_text": "", "digests": { "md5": "87f03fabc3c8190da4ed28f37d53aef7", "sha256": "3eb77acb1f77cb66e5414ba80738cb9fc661c038ec10a85c73ee191475820e0f" }, "downloads": -1, "filename": "certg-3.0.tar.gz", "has_sig": false, "md5_digest": "87f03fabc3c8190da4ed28f37d53aef7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2940, "upload_time": "2017-11-28T16:48:38", "url": "https://files.pythonhosted.org/packages/32/05/d1f1eef2cb611f4f7ee99d588a5815ed339d6e5970ef782715a40fe7559f/certg-3.0.tar.gz" } ], "3.1": [ { "comment_text": "", "digests": { "md5": "e3cde0d53782c017eb2e4db58f007292", "sha256": "2ab9b70f23448919d7a0f46a2b0c8e2e1118a3489553b9c5561d8ee08d88fe33" }, "downloads": -1, "filename": "certg-3.1.tar.gz", "has_sig": false, "md5_digest": "e3cde0d53782c017eb2e4db58f007292", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3153, "upload_time": "2017-11-28T16:52:19", "url": "https://files.pythonhosted.org/packages/95/d4/6a311995b3ca9ca57cbf1cc421003e11d8f6bbad1451e1d3280cec8591e6/certg-3.1.tar.gz" } ], "3.2": [ { "comment_text": "", "digests": { "md5": "425fa5a79e0fe672acd0dea51558d7dd", "sha256": "6330452c01c5fa260a47ca9142a02b8e6d534097cf9195e8f84502c1f5effa6a" }, "downloads": -1, "filename": "certg-3.2.tar.gz", "has_sig": false, "md5_digest": "425fa5a79e0fe672acd0dea51558d7dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6754, "upload_time": "2017-11-28T17:13:50", "url": "https://files.pythonhosted.org/packages/42/11/1773ae62d314b50daa296f540ba22dc02f36a5c0247a81c09b8cc0b47fec/certg-3.2.tar.gz" } ], "3.3": [ { "comment_text": "", "digests": { "md5": "dd463933f45b9319aa91ec46366c8d40", "sha256": "43c930d32763c3f5126ca2647ab4e031cfc2e9d5e023af4cdd1ce056227a1186" }, "downloads": -1, "filename": "certg-3.3.tar.gz", "has_sig": false, "md5_digest": "dd463933f45b9319aa91ec46366c8d40", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6768, "upload_time": "2017-11-28T23:11:24", "url": "https://files.pythonhosted.org/packages/e6/68/2d088f79c6fe5767fc762c235e8fd9c8163388e09665a9838b9ae45a5ac9/certg-3.3.tar.gz" } ], "4.0": [ { "comment_text": "", "digests": { "md5": "12ae7653a430dbbd839fd1cab721b020", "sha256": "def381a7bab8e588cd9e749b687ee6d237196900a0705fb9276ad777ee689952" }, "downloads": -1, "filename": "certg-4.0.tar.gz", "has_sig": false, "md5_digest": "12ae7653a430dbbd839fd1cab721b020", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4557, "upload_time": "2019-01-04T20:23:03", "url": "https://files.pythonhosted.org/packages/dc/2b/fad72bf5f31202112b3accaeb0b9dfe3f4f4b8ed20736dbe2d481579f45a/certg-4.0.tar.gz" } ], "4.1": [ { "comment_text": "", "digests": { "md5": "244bec877ce8ffb26b5bb21282a17490", "sha256": "9bcd1344fb8701fa43c499deb3bc394b6d3687e8a5566ca3e0ab5981c125f4a0" }, "downloads": -1, "filename": "certg-4.1.tar.gz", "has_sig": false, "md5_digest": "244bec877ce8ffb26b5bb21282a17490", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4564, "upload_time": "2019-01-04T20:30:52", "url": "https://files.pythonhosted.org/packages/89/2e/24d61524b9862d8e5ccee6667fcdb6d280fa14a631ad0ff71431f0146ee2/certg-4.1.tar.gz" } ], "4.2": [ { "comment_text": "", "digests": { "md5": "f75b8a46490f57a0e93d9f99ff8757ad", "sha256": "d6f2fd7daa91b77f13e4231fec474f0227f3ab59a90fafe70089fcc72314f04e" }, "downloads": -1, "filename": "certg-4.2.tar.gz", "has_sig": false, "md5_digest": "f75b8a46490f57a0e93d9f99ff8757ad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4625, "upload_time": "2019-01-04T20:40:37", "url": "https://files.pythonhosted.org/packages/80/f2/c1c789b6e3490c1484d81760390a997589481d05c23166d3a99d284aff2f/certg-4.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f75b8a46490f57a0e93d9f99ff8757ad", "sha256": "d6f2fd7daa91b77f13e4231fec474f0227f3ab59a90fafe70089fcc72314f04e" }, "downloads": -1, "filename": "certg-4.2.tar.gz", "has_sig": false, "md5_digest": "f75b8a46490f57a0e93d9f99ff8757ad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4625, "upload_time": "2019-01-04T20:40:37", "url": "https://files.pythonhosted.org/packages/80/f2/c1c789b6e3490c1484d81760390a997589481d05c23166d3a99d284aff2f/certg-4.2.tar.gz" } ] }