timknip / pyswf

A Python library to read and write SWF files

Home Page:https://github.com/timknip/pyswf/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can pyswf generate SWF files from scratch?

otherthings opened this issue · comments

I'm trying to convert some SVG files to SWF for an old web project I'm restoring (http://grafarc.org/flash/view.htm). The files themselves are very basic, just static vector outlines made mostly of straight-edged shapes.

Is pyswf capable of generating an SWF from scratch, or can it only read them from existing files? I can't quite tell from the documentation.

-Cassidy

Here's an example of one of the SVG files I'm trying to convert, in case that's helpful:

<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="761.000000pt" height="442.000000pt" viewBox="0 0 761.000000 442.000000" preserveAspectRatio="xMidYMid meet"> <metadata> Created by potrace 1.11, written by Peter Selinger 2001-2013 </metadata> <g transform="translate(0.000000,442.000000) scale(0.100000,-0.100000)" fill="#ff6600" stroke="none"> <path d="M762 4293 c-12 -71 -45 -254 -72 -408 -28 -154 -114 -638 -191 -1075 -156 -885 -350 -1985 -438 -2480 -32 -179 -57 -326 -56 -327 1 -2 118 40 261 93 357 132 561 207 1129 414 706 257 1717 627 1738 635 11 5 17 3 17 -6 -1 -8 -20 -158 -44 -334 -24 -176 -43 -321 -41 -323 2 -2 1058 372 2190 776 893 319 2131 760 2243 799 94 33 102 37 102 62 1 81 -84 1457 -90 1464 -5 5 -147 35 -317 67 -340 65 -451 84 -1178 210 -704 122 -2437 411 -2441 407 -2 -2 -12 -74 -23 -161 -10 -86 -21 -160 -24 -163 -3 -3 -48 2 -99 11 -51 9 -169 30 -263 46 -219 37 -262 45 -1200 211 -434 77 -828 147 -875 155 -47 8 -134 24 -194 34 -60 11 -110 20 -111 20 0 0 -11 -57 -23 -127z"/> </g> </svg>

No, at the moment pyswf only "reads" swf.
I should update the readme to reflect this.

Simply don't have the time to implement "write".