From dca04aaf45403526f46d0f2ffe07cf6f062ee136 Mon Sep 17 00:00:00 2001 From: Joe Wreschnig Date: Mon, 24 Aug 2015 22:02:05 +0200 Subject: [PATCH] Update URLs and documentation formats. --- .gitignore | 1 + NEWS.org | 11 +++++++++++ NEWS.txt | 7 ------- README.txt => README.md | 35 ++++++++++++++++------------------- bulletml/__init__.py | 24 ++++++++++++------------ setup.py | 21 +++++++++------------ 6 files changed, 49 insertions(+), 50 deletions(-) create mode 100644 .gitignore create mode 100644 NEWS.org delete mode 100644 NEWS.txt rename README.txt => README.md (73%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0d20b64 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.pyc diff --git a/NEWS.org b/NEWS.org new file mode 100644 index 0000000..d0232bc --- /dev/null +++ b/NEWS.org @@ -0,0 +1,11 @@ +* 3 - 2015.?.? +- Update documentation and homepage. +- Fix a security issue reading untrusted bullet files. + +* 2 - 2010.04.24 +- Easier to extend Action with new behaviors. +- Conditional // elements. +- Faster Pyrex-less collision extension. + +* 1 - 2010.04.10 +- Initial release. diff --git a/NEWS.txt b/NEWS.txt deleted file mode 100644 index a2eecb9..0000000 --- a/NEWS.txt +++ /dev/null @@ -1,7 +0,0 @@ -2 - 2010.04.24 - * Easier to extend Action with new behaviors. - * Conditional // elements. - * Faster Pyrex-less collision extension. - -1 - 2010.04.10 - * Initial release. diff --git a/README.txt b/README.md similarity index 73% rename from README.txt rename to README.md index c7a1633..7990787 100644 --- a/README.txt +++ b/README.md @@ -1,41 +1,38 @@ -python-bulletml - BulletML for Python -------------------------------------- +# python-bulletml - BulletML for Python BulletML is the Bullet Markup Language. BulletML can describe the barrage of bullets in shooting games. (For example Progear, Psyvariar, Gigawing2, G DARIUS, XEVIOUS, ...) This module parses and executes BulletML scripts in Python. All data structures in it are -renderer-agnostic. +renderer-agnostic. A sample renderer for Pygame is included. The full +API documentation is contained in its Python docstrings. In addition to the standard BulletML XML format, this module supports -an equivalent YAML format. See bulletml.bulletyaml for more details. +an equivalent YAML format. For convenience, two simple collision +routines are provided, `bulletml.overlaps` for stationary circles and +`bulletml.collides` for moving circles. -Finally, two simple collision routines are provided, bulletml.overlaps -for stationary circles and bulletml.collides for moving circles. +More information is available at +[the BulletML homepage](http://www.asahi-net.or.jp/~cs8k-cyu/bulletml/index_e.html), +or +[the python-bulletml homepage](https://yukkurigames.com/python-bulletml/). -A sample renderer for Pygame is included. - -More information is available at the BulletML homepage, -http://www.asahi-net.or.jp/~cs8k-cyu/bulletml/index_e.html, or the -python-bullet homepage, http://code.google.com/p/python-bulletml/. - -$ ./bulletml-runner examples/*/*.xml + $ ./bulletml-runner examples/*/*.xml Use Page Up and Page Down to switch between bullet definitions, S to respawn the bullet pattern, and Enter to restart it. -Installing ----------- +## Installing + BulletML requires Python 2.6 or later. It should work on Python 3. It has no dependencies outside the CPython standard library. -$ ./setup.py build -$ sudo ./setup.py install + $ ./setup.py build + $ sudo ./setup.py install -License -------- +## License The BulletML specification is the work of Kenta Cho. diff --git a/bulletml/__init__.py b/bulletml/__init__.py index 62a1d04..d872be8 100644 --- a/bulletml/__init__.py +++ b/bulletml/__init__.py @@ -4,31 +4,32 @@ BulletML is the Bullet Markup Language. BulletML can describe the barrage of bullets in shooting games. (For example Progear, Psyvariar, Gigawing2, G DARIUS, XEVIOUS, ...) This module parses and executes BulletML scripts in Python. All data structures in it are -renderer-agnostic. +renderer-agnostic. A sample renderer for Pygame is included. The full +API documentation is contained in its Python docstrings. In addition to the standard BulletML XML format, this module supports -an equivalent YAML format. See bulletml.bulletyaml for more details. - -Finally, three simple collision routines are provided: -bulletml.overlaps for stationary circles, bulletml.collides for moving -circles, and bulletml.collides_all for one moving circle against many -moving circles. +an equivalent YAML format. For convenience, two simple collision +routines are provided, bulletml.overlaps for stationary circles and +bulletml.collides for moving circles. More information is available at the BulletML homepage, http://www.asahi-net.or.jp/~cs8k-cyu/bulletml/index_e.html, or the -python-bullet homepage, http://code.google.com/p/python-bulletml/. +python-bulletml homepage, https://yukkurigames.com/python-bulletml/. + Basic Usage: from bulletml import Bullet, BulletML - doc = Bulletml.BulletML.FromDocument(open("test.xml", "rU")) + + doc = BulletML.FromDocument(open("test.xml", "rU")) player = ... # On your own here, but it needs x and y fields. rank = 0.5 # Player difficulty, 0 to 1 + bullet = Bullet.FromDocument(doc, x, y, target=player, rank=rank) bullets = [bullet] ... for bullet in bullets: - bullets.extend(bullet.step()) + bullets.extend(bullet.step()) # step() returns new Bullets ... For drawing, you're on your own, but Bullet instances have a number of @@ -40,9 +41,8 @@ from bulletml.parser import BulletML from bulletml.impl import Bullet from bulletml.collision import overlaps, collides, collides_all -VERSION = (2,) +VERSION = (3,) VERSION_STRING = ".".join(map(str, VERSION)) __all__ = ["VERSION", "VERSION_STRING", "Bullet", "BulletML", "overlaps", "collides", "collides_all"] - diff --git a/setup.py b/setup.py index fb4b2e3..a6c07cd 100755 --- a/setup.py +++ b/setup.py @@ -105,8 +105,8 @@ class test_cmd(Command): if __name__ == "__main__": setup(cmdclass=dict(clean=clean, test=test_cmd, coverage=coverage_cmd, sdist=sdist), - name="python-bulletml", version="2", - url="http://code.google.com/p/python-bulletml/", + name="python-bulletml", version="3", + url="https://yukkurigames.com/python-bulletml/", description="parse and run BulletML scripts", author="Joe Wreschnig", author_email="joe.wreschnig@gmail.com", @@ -122,18 +122,15 @@ BulletML is the Bullet Markup Language. BulletML can describe the barrage of bullets in shooting games. (For example Progear, Psyvariar, Gigawing2, G DARIUS, XEVIOUS, ...) This module parses and executes BulletML scripts in Python. All data structures in it are -renderer-agnostic. +renderer-agnostic. A sample renderer for Pygame is included. The full +API documentation is contained in its Python docstrings. In addition to the standard BulletML XML format, this module supports -an equivalent YAML format. - -Finally, two simple collision routines are provided, bulletml.overlaps -for stationary circles and bulletml.collides for moving circles. - -A sample renderer for Pygame is included. +an equivalent YAML format. For convenience, two simple collision +routines are provided, bulletml.overlaps for stationary circles and +bulletml.collides for moving circles. More information is available at the BulletML homepage, http://www.asahi-net.or.jp/~cs8k-cyu/bulletml/index_e.html, or the -python-bullet homepage, http://code.google.com/p/python-bulletml/. -""" - ) +python-bulletml homepage, https://yukkurigames.com/python-bulletml/. +""") -- 2.20.1