Closed russellaugust closed 1 year ago
Screenplain was mainly designed as a CLI application, but you should be able to use it in your own code.
Check the file main.py for how the CLI program does it. It goes something like this:
from screenplain.parsers import fountain
screenplay = fountain.parse(input) # where input is some kind of stream, e.g. an open file
# To convert it to pdf for example:
from screenplain.export.pdf import to_pdf
to_pdf(screenplay, "out.pdf")
Please let me know if this works, or doesn't. Better instructions would definitely be good.
I've pip'd but I don't seem to be able to import this into my code. Is this command line only? I don't see any examples of this being used. Any help would be very appreciated!