SWF Parsing Utilities
Project description
PYSWF
=====
A Python library for reading and writing SWF files.
PYSWF is a Python port of Claus Wahlers *great* SWF parser https://github.com/claus/as3swf
Can't thank Claus enough!
INSTALL
-------
git clone git@github.com:timknip/pyswf.git
python setup.py install
or you might need do:
pip install the-downloaded.whl
USAGE
-----
Basic example:
--------------
```python
from swf.movie import SWF
# create a file object
file = open('path/to/swf', 'rb')
# print out the SWF file structure
print SWF(file)
```
SVG export example:
-------------------
```python
from swf.movie import SWF
from swf.export import SVGExporter
# create a file object
file = open('path/to/swf', 'rb')
# load and parse the SWF
swf = SWF(file)
# create the SVG exporter
svg_exporter = SVGExporter()
# export!
svg = swf.export(svg_exporter)
# save the SVG
open('path/to/svg', 'wb').write(svg.read())
```
=====
A Python library for reading and writing SWF files.
PYSWF is a Python port of Claus Wahlers *great* SWF parser https://github.com/claus/as3swf
Can't thank Claus enough!
INSTALL
-------
or you might need do:
USAGE
-----
Basic example:
--------------
```python
from swf.movie import SWF
# create a file object
file = open('path/to/swf', 'rb')
# print out the SWF file structure
print SWF(file)
```
SVG export example:
-------------------
```python
from swf.movie import SWF
from swf.export import SVGExporter
# create a file object
file = open('path/to/swf', 'rb')
# load and parse the SWF
swf = SWF(file)
# create the SVG exporter
svg_exporter = SVGExporter()
# export!
svg = swf.export(svg_exporter)
# save the SVG
open('path/to/svg', 'wb').write(svg.read())
```