mgp2pdf


Namemgp2pdf JSON
Version 0.11.0 PyPI version JSON
download
home_pagehttps://github.com/mgedmin/mgp2pdf/
SummaryMagicPoint to PDF converter
upload_time2024-10-09 12:06:11
maintainerNone
docs_urlNone
authorMarius Gedminas
requires_python>=3.7
licenseGPL v2 or v3
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            mgp2pdf
=======

This is a quick-and-dirty MagicPoint_ to PDF converter.

.. _MagicPoint: http://member.wide.ad.jp/wg/mgp/

It supports only a subset of MagicPoint, specifically, the subset I've
used in my slides so far.  If you send me your slide decks, I'll make
mgp2pdf handle them too.

SUPPORT.rst has a list of supported and unsupported features.

BUGS.rst has a list of known bugs.


Installation
------------

::

    pip install mgp2pdf


Usage
-----

::

    mgp2pdf [-v] [--unsafe] slides.mgp [-o output.pdf]
    mgp2pdf [-v] [--unsafe] slides.mgp ... [-o directory]
    mgp2pdf [-h|--help]


Why another converter?
----------------------

I used mgp to produce slides for a Python course I taught at Vilnius
University.  However, since most of the students are not (yet) Linux
users, they couldn't use MagicPoint to view my slides at home.  There are
some converters from MagicPoint to PostScript/HTML, but the result either
looks ugly, or doesn't support Unicode characters.  MagicPoint itself can
produce a number of bitmaps (by taking screenshots), but those are big,
and the conversion process is inconvenient (you cannot use your machine
while mgp is busy rendering slides and taking screenshots).

I wrote a Python program to interpret MagicPoint commands and produce a
PDF file using ReportLab.  It can handle my slides (Lithuanian), but
otherwise it is probably incomplete.  Feel free to give it a try.  File
bugs for missing features, and I'll see what I can do.


Resources
---------

There's a web page, of sorts, at https://mg.pov.lt/mgp2pdf

The source code can be found at https://github.com/mgedmin/mgp2pdf.

Report bugs at https://github.com/mgedmin/mgp2pdf/issues.

Licence: GPL v2 or v3 (https://www.gnu.org/copyleft/gpl.html)

.. image:: https://github.com/mgedmin/mgp2pdf/workflows/build/badge.svg?branch=master
  :target: https://github.com/mgedmin/mgp2pdf/actions

.. image:: https://ci.appveyor.com/api/projects/status/github/mgedmin/mgp2pdf?branch=master&svg=true
  :target: https://ci.appveyor.com/project/mgedmin/mgp2pdf

.. image:: https://coveralls.io/repos/mgedmin/mgp2pdf/badge.svg?branch=master
  :target: https://coveralls.io/r/mgedmin/mgp2pdf



Changelog
---------

0.11.0 (2024-10-09)
~~~~~~~~~~~~~~~~~~~

- Add support for Python 3.8, 3.9, 3.10, 3.11, 3.12, and 3.13.

- Drop support for Python 2.7, 3.5 and 3.6.


0.10.2 (2019-04-23)
~~~~~~~~~~~~~~~~~~~

- Add Python 3.6 and 3.7 support (no actual code changes required).

- Drop Python 3.3 and 3.4 support.

- Stop using :weight=bold and such when passing font patterns to fc-match;
  specify :weight=200 etc.  Fixes "Unable to parse the pattern" from fc-match
  and "Could not find the font file for Sans:weight=bold" from mgp2pdf.


0.10.1 (2016-09-17)
~~~~~~~~~~~~~~~~~~~

- Correctly recognize ``...-...-r`` fonts as roman
  (`GH #6 <https://github.com/mgedmin/mgp2pdf/pull/6>`_).

- Add support for ``cyan`` color
  (`GH #5 <https://github.com/mgedmin/mgp2pdf/pull/5>`_).

- Fix typo in error message
  (`GH #4 <https://github.com/mgedmin/mgp2pdf/pull/4>`_).

- Add Python 3.5 support.

- Drop Python 2.6 support.


0.10 (2015-01-06)
~~~~~~~~~~~~~~~~~

- ``%filter`` is disabled by default for being a security risk.  Use
  ``--unsafe`` to enable.

- ``-o DIRECTORY`` is now supported.

- Interpret image paths relative to the location of the mgp file.

- Support Python 3.3 and up in addition to 2.6 and 2.7.

- More accurate text positioning (mgp2pdf no longer truncates the
  corrdinates to integral point values).

- More color names are now recognized: white, red, green, blue, yellow.

- Better font name recognition (requires ``fc-match`` from fontconfig).

- Improved error handling and reporting.

- Support ``%%`` comment syntax.

- Corrected handling of ``%default``, ``%tab``, ``%deffont``.

- Implemented ``%include``.

- Implemented ``%newimage -raise`` (also discovered that mgp itself ignores
  ``-raise``).

- 100% test coverage.


0.9 (2014-05-09)
~~~~~~~~~~~~~~~~

- First packaged release.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mgedmin/mgp2pdf/",
    "name": "mgp2pdf",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "Marius Gedminas",
    "author_email": "marius@gedmin.as",
    "download_url": "https://files.pythonhosted.org/packages/c9/5f/a65bd39aaa6af0c7b6b1b2ae20eab78aa9dafa51bf7277e8ac42caeed127/mgp2pdf-0.11.0.tar.gz",
    "platform": null,
    "description": "mgp2pdf\n=======\n\nThis is a quick-and-dirty MagicPoint_ to PDF converter.\n\n.. _MagicPoint: http://member.wide.ad.jp/wg/mgp/\n\nIt supports only a subset of MagicPoint, specifically, the subset I've\nused in my slides so far.  If you send me your slide decks, I'll make\nmgp2pdf handle them too.\n\nSUPPORT.rst has a list of supported and unsupported features.\n\nBUGS.rst has a list of known bugs.\n\n\nInstallation\n------------\n\n::\n\n    pip install mgp2pdf\n\n\nUsage\n-----\n\n::\n\n    mgp2pdf [-v] [--unsafe] slides.mgp [-o output.pdf]\n    mgp2pdf [-v] [--unsafe] slides.mgp ... [-o directory]\n    mgp2pdf [-h|--help]\n\n\nWhy another converter?\n----------------------\n\nI used mgp to produce slides for a Python course I taught at Vilnius\nUniversity.  However, since most of the students are not (yet) Linux\nusers, they couldn't use MagicPoint to view my slides at home.  There are\nsome converters from MagicPoint to PostScript/HTML, but the result either\nlooks ugly, or doesn't support Unicode characters.  MagicPoint itself can\nproduce a number of bitmaps (by taking screenshots), but those are big,\nand the conversion process is inconvenient (you cannot use your machine\nwhile mgp is busy rendering slides and taking screenshots).\n\nI wrote a Python program to interpret MagicPoint commands and produce a\nPDF file using ReportLab.  It can handle my slides (Lithuanian), but\notherwise it is probably incomplete.  Feel free to give it a try.  File\nbugs for missing features, and I'll see what I can do.\n\n\nResources\n---------\n\nThere's a web page, of sorts, at https://mg.pov.lt/mgp2pdf\n\nThe source code can be found at https://github.com/mgedmin/mgp2pdf.\n\nReport bugs at https://github.com/mgedmin/mgp2pdf/issues.\n\nLicence: GPL v2 or v3 (https://www.gnu.org/copyleft/gpl.html)\n\n.. image:: https://github.com/mgedmin/mgp2pdf/workflows/build/badge.svg?branch=master\n  :target: https://github.com/mgedmin/mgp2pdf/actions\n\n.. image:: https://ci.appveyor.com/api/projects/status/github/mgedmin/mgp2pdf?branch=master&svg=true\n  :target: https://ci.appveyor.com/project/mgedmin/mgp2pdf\n\n.. image:: https://coveralls.io/repos/mgedmin/mgp2pdf/badge.svg?branch=master\n  :target: https://coveralls.io/r/mgedmin/mgp2pdf\n\n\n\nChangelog\n---------\n\n0.11.0 (2024-10-09)\n~~~~~~~~~~~~~~~~~~~\n\n- Add support for Python 3.8, 3.9, 3.10, 3.11, 3.12, and 3.13.\n\n- Drop support for Python 2.7, 3.5 and 3.6.\n\n\n0.10.2 (2019-04-23)\n~~~~~~~~~~~~~~~~~~~\n\n- Add Python 3.6 and 3.7 support (no actual code changes required).\n\n- Drop Python 3.3 and 3.4 support.\n\n- Stop using :weight=bold and such when passing font patterns to fc-match;\n  specify :weight=200 etc.  Fixes \"Unable to parse the pattern\" from fc-match\n  and \"Could not find the font file for Sans:weight=bold\" from mgp2pdf.\n\n\n0.10.1 (2016-09-17)\n~~~~~~~~~~~~~~~~~~~\n\n- Correctly recognize ``...-...-r`` fonts as roman\n  (`GH #6 <https://github.com/mgedmin/mgp2pdf/pull/6>`_).\n\n- Add support for ``cyan`` color\n  (`GH #5 <https://github.com/mgedmin/mgp2pdf/pull/5>`_).\n\n- Fix typo in error message\n  (`GH #4 <https://github.com/mgedmin/mgp2pdf/pull/4>`_).\n\n- Add Python 3.5 support.\n\n- Drop Python 2.6 support.\n\n\n0.10 (2015-01-06)\n~~~~~~~~~~~~~~~~~\n\n- ``%filter`` is disabled by default for being a security risk.  Use\n  ``--unsafe`` to enable.\n\n- ``-o DIRECTORY`` is now supported.\n\n- Interpret image paths relative to the location of the mgp file.\n\n- Support Python 3.3 and up in addition to 2.6 and 2.7.\n\n- More accurate text positioning (mgp2pdf no longer truncates the\n  corrdinates to integral point values).\n\n- More color names are now recognized: white, red, green, blue, yellow.\n\n- Better font name recognition (requires ``fc-match`` from fontconfig).\n\n- Improved error handling and reporting.\n\n- Support ``%%`` comment syntax.\n\n- Corrected handling of ``%default``, ``%tab``, ``%deffont``.\n\n- Implemented ``%include``.\n\n- Implemented ``%newimage -raise`` (also discovered that mgp itself ignores\n  ``-raise``).\n\n- 100% test coverage.\n\n\n0.9 (2014-05-09)\n~~~~~~~~~~~~~~~~\n\n- First packaged release.\n",
    "bugtrack_url": null,
    "license": "GPL v2 or v3",
    "summary": "MagicPoint to PDF converter",
    "version": "0.11.0",
    "project_urls": {
        "Homepage": "https://github.com/mgedmin/mgp2pdf/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b9fe39e454a64f8e79b6096c7524a6c2bfe0fcc19e5d6c6a0363bb680f03442a",
                "md5": "5d3c7e19193b602c7cc1d49d995a1715",
                "sha256": "6229bd32708c2b3b82c2d93cc7308e4d53bfea19827bfc96eff93b468032a033"
            },
            "downloads": -1,
            "filename": "mgp2pdf-0.11.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5d3c7e19193b602c7cc1d49d995a1715",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 20587,
            "upload_time": "2024-10-09T12:06:09",
            "upload_time_iso_8601": "2024-10-09T12:06:09.747164Z",
            "url": "https://files.pythonhosted.org/packages/b9/fe/39e454a64f8e79b6096c7524a6c2bfe0fcc19e5d6c6a0363bb680f03442a/mgp2pdf-0.11.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c95fa65bd39aaa6af0c7b6b1b2ae20eab78aa9dafa51bf7277e8ac42caeed127",
                "md5": "1ee0c21619fcec99b712591b8ef5a7c4",
                "sha256": "13e0fb3185db30f037c634cd87a606680e6a1a95c8aea90bea60fad8c241a677"
            },
            "downloads": -1,
            "filename": "mgp2pdf-0.11.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1ee0c21619fcec99b712591b8ef5a7c4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 35487,
            "upload_time": "2024-10-09T12:06:11",
            "upload_time_iso_8601": "2024-10-09T12:06:11.998011Z",
            "url": "https://files.pythonhosted.org/packages/c9/5f/a65bd39aaa6af0c7b6b1b2ae20eab78aa9dafa51bf7277e8ac42caeed127/mgp2pdf-0.11.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-09 12:06:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mgedmin",
    "github_project": "mgp2pdf",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "appveyor": true,
    "tox": true,
    "lcname": "mgp2pdf"
}
        
Elapsed time: 0.33246s