Closed feeley closed 4 years ago
Hey Marc! Glad to see you're interested.
As you've probably seen in the readme, keynote-parser
does simple text replacement and handles unpacking/repacking of Keynote files. What's done to those files once they're unpacked is up to the user. Most custom use cases should be handleable by running keynote-parser unpack
, running your own code to edit the resulting yaml
files, then running keynote-parser pack
again (or doing the equivalent in your own Python script by importing keynote_parser
).
To break down each of your points:
keynote-parser
, you'd be able to use any other syntax highlighting library and then could give the resulting rich text to keynote-parser
to insert into a presentation.yaml
file to reconstruct the code. Again, running the extracted code in nodejs would be something your code could do, after importing keynote-parser
to use its unpacking functionality.If you're interested in diving into this library to help add rich text replacement and hyperlink replacement functionality, contributions would be much appreciated!
Thanks for your quick and informative reply. I'm also exploring the possibility of creating the keynote slides for the examples using AppleScript to simplify the creation of character styles, etc. I'm not excluding the use of keynote-parser
for some operations, but it seems a bit too "low-level" (sort of like patching a binary executable rather than editing the source code of a program and recompiling it). In particular the creation of new character styles by modifying the .yaml files is too complex as keynote uses its own identifiers for resources and I don't know how to generate them without corrupting the keynote format.
I've just discovered keynote-parser and would like to use it to automate some processing of my slides.
Some context... I teach introductory programming using the JavaScript language, the codeBoot interpreter (http://codeboot.org) and slides prepared with Keynote. The slides contain JavaScript code examples that can be run in codeBoot by simply clicking on them. Here's an example slide (.pdf and .key) :
What I would like to do with keynote-parser is
1) create the hyperlinks on the examples automatically (so they match the code)
2) apply syntax highlighting to the code
3) extract the examples and run them in nodejs to validate their correctness
This is probably not possible with keynote-parser in its current state, but could you give me some guidance on how this could be done?
Note that the hyperlinks are essentially a base64 encoding of the content of the example with a few codeBoot specific commands to create the source code file in the codeBoot environment. For the example above the hyperlink encodes the file content after the
REPLAY=
part: