Skip to content

A simple python module to read and manipulate Macromedia Director files

License

Notifications You must be signed in to change notification settings

Prilkop/directorfile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

directorfile

A python module to read and manipulate Macromedia (Adobe) Director files. It is currently in an early development stage.

Usage

This package currently has two main entry points: load_projector and load_director_archive, which load Macromedia Director projector and archive files.

Projector

A projector file is an executable file wrapping a special archive of type application (APPL), which basically contains a list of files as its resources.

Here is an example code for extracting all Xtra files from a projector file:

from directorfile import load_projector

projector = load_projector(open(filename, 'rb'))

for filename, xtra in projector.application.xtras.items():
    with open(filename) as f:
        f.write(xtra.data)

Archive

An archive file is a container for multiple resources used for by a Director player. There are essentially two types of archive files - Director and Shockwave. Currently only Director archives are supported.

Here is an example code for extracting the fontmap.txt file embedded in an archive:

from directorfile import load_director_archive

archive = load_director_archive(open(filename, 'rb'))

for resource in archive.resources.values():
    if resource.TAG == 'FXmp':
        with open('fontmap.txt') as f:
                f.write(resource.data)

Reference

In the creation of the code I used some reverse engineering as well as some of the following knowledge bases:

About

A simple python module to read and manipulate Macromedia Director files

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages