k0kubun / md2key Goto Github PK
View Code? Open in Web Editor NEWConvert markdown to keynote
License: MIT License
Convert markdown to keynote
License: MIT License
https://github.com/k0kubun/md2key/blob/master/scripts/insert_image.scpt#L16
should
set imgHeight to its width
be
set imgHeight to its height
? or intentionally to set the height to be the width?
Thank you so much for making this awesome tool!
md2key reduces most of my manual work when creating slides, but I wish I could automate the creation of speaker notes too. Would you consider adding this feature?
As the version 0.13.1 of Haroopad, it adds support to draw diagrams which includes flowchart/sequence/gantt.
We can use Mermaid to convert codes like below to png, and paste the image to slide. I had take some tries, it's workable. But the code style is not same as common markdown extras like mmd/phpextra.
Can you accept this style? @k0kubun
sequenceDiagram
Alice->Bob: Hello Bob, how are you?
Note right of Bob: Bob thinks
Bob-->Alice: I am good thanks!
Bob-->John the Long: How about you John?
Bob-->Alice: Checking with John...
Alice->John the Long: Yes... John, how are you?
John the Long-->Alice: Better then you!
graph TD;
A[Hard edge]-->|Link text|B(Round edge);
B-->C{Decision};
C-->|One|D[Result one];
C-->|Two|E[Result two];
I want ![]()
to be compatible with Deckset's inline-images.
Currently the position is fixed to right.
http://www.decksetapp.com/cheatsheet/#inline-images
For keynote, it'd be nice to have a switch of automatic start for gif animations.
**text**
or ~~text~~
should be rendered with rich texts.
I think it is good to use it for changes font colors, which should be an optional feature.
I want to generate keynote even if keynote is not activated.
# List up keynote themes
$ md2key themes
theme1
theme2
...
# Craete keynote from selected theme
$ md2key create markdown.md -t theme1
I think we can do this using https://github.com/katsuma/keynote-client. I'm waiting it to be pushed to rubygems.
If the string contains " or $ , the behaviour will be strange.
If the markdown has something like this, the md2key will exit normally and remain slides will not be generated.
# MAINTAINER指令
- MAINTAINER <name>
List item from the second, with additional two spaces added.
The source
# Test
- item1
- item2
- item3
Workaround, change https://github.com/k0kubun/md2key/blob/master/lib/md2key/keynote.rb#L41 to
set object text of default body item to " #{content}"
By adding two spaces before real content.
Thanks,
Bin
I should be able to size the diagram and influence the alignment. (Center should be default)
```extension code ... ```
The implementation of code listing is not so good.
The position is not correct for long code, fonts and its size can't be configured and I want to put the code in the left-top of the background for code listing.
Hello, Do you consider to support Homebrew to install it as follows?
brew install md2key
/Users/peter/.rvm/gems/ruby-1.9.3-p547/gems/md2key-0.4.4/bin/md2key:3:in `<top (required)>': undefined local variable or method `__dir__' for main:Object (NameError)
from /Users/peter/.rvm/gems/ruby-1.9.3-p547/bin/md2key:23:in `load'
from /Users/peter/.rvm/gems/ruby-1.9.3-p547/bin/md2key:23:in `<main>'
from /Users/peter/.rvm/gems/ruby-1.9.3-p547/bin/ruby_executable_hooks:15:in `eval'
from /Users/peter/.rvm/gems/ruby-1.9.3-p547/bin/ruby_executable_hooks:15:in `<main>'
What is going wrong with my simple example.
md2key default.md
I'm getting this error:
72:131: execution error: Keynote got an error: Can’t get document 1. Invalid index. (-1719)
My file default.md
is this
# The presentation
@k0kubun
## Hello world
- I'm takashi kokubun
- This is a pen
- Nested item is available
## How are you?
- I'm fine thank you
And my presentation is a copy off assets/default.key
Tanks in advance.
I' using Keynote 6.6.1 and md2key 0.4.4, and will got these errors:
every slide of document 1 doesn’t understand the “count” message
or
slide 2 of document 1 doesn’t understand the “move” message
Updating only changed slides by receiving notification from fsevent, we can make the preview faster.
This library uses the same template.key
for generating the presentation. So we are not longer available to reuse the template.key for other projects.
One idea could be:
template.key
called final_presensation.key
final_presensation.key
to generate the presentation.The main advantage of this feature request is that we can reuse one template for multiple projects.
Also, one related idea for this library is let the user specify the name of the output file and the name of the template. A syntax like this could help:
Bash
$ md2key test.md -t template.key -o final_presentation.key
Where -t -> template and -o -> output file
What do you think? Does it make sense?
Proposed by @Iwark
I think it's useful too and want to support it.
Hello again,
I've just created a simple template with 2 slides:
When using your script with the test sample, the placeholder texts are not well substituted, generating an undesired presentation. This is the result:
The template.key and test.md are attached to the issue in this zip:
Is there a problem in the way templates declare the placeholders or there is a problem with the library itself? How to fix this?
Hello. I'm running the command md2key test.md
with the following data example:
# The presentation
@k0kubun
## Hello world
- I'm takashi kokubun
- This is a pen
- Nested item is available
## How are you?
- I'm fine thank you
And... I created a template.key
file in the same folder as test.md
However, the program fails with the following error:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': /Library/Ruby/Gems/2.0.0/gems/md2key-0.8.2/lib/md2key/config_builder.rb:14: syntax error, unexpected ')' (SyntaxError)
/Library/Ruby/Gems/2.0.0/gems/md2key-0.8.2/lib/md2key/config_builder.rb:27: syntax error, unexpected keyword_end, expecting end-of-input
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/md2key-0.8.2/lib/md2key/cli.rb:1:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/md2key-0.8.2/lib/md2key.rb:1:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/md2key-0.8.2/exe/md2key:4:in `<top (required)>'
from /usr/local/bin/md2key:23:in `load'
from /usr/local/bin/md2key:23:in `<main>'
OS: MacOS Sierra
md2key version: 0.8.2 (latest)
Could you help?
Change to seperate slides with ---
. If a slide has only headers, they should be centered.
http://www.decksetapp.com/cheatsheet/#headings
Code like following example is parsed correctly but wrongly rendered to keynote (flattened).
- foo
- bar
- hello
I think we can do this with applescript by clicking default body of a slide and input cursor key or indentation bindings.
i am not able to install this package
Mac : 10.15
Xcode : 11.3
can you please let me know how to install this i am new to apple script
Hey, there. I was following the instructions in readme file, but I got an error message saying uninitialized constant Redcarpet::Render::XHTML (NameError)
when I run md2key markdown.md
from terminal.
I'm using ruby 2.2.3 and redcarpet-3.4.0, here is the backtrace:
/Users/user/.rvm/gems/ruby-2.2.3/gems/md2key-0.8.1/lib/md2key/parser.rb:121:in `to_xhtml': uninitialized constant Redcarpet::Render::XHTML (NameError)
from /Users/user/.rvm/gems/ruby-2.2.3/gems/md2key-0.8.1/lib/md2key/parser.rb:24:in `parse_slides'
from /Users/user/.rvm/gems/ruby-2.2.3/gems/md2key-0.8.1/lib/md2key/parser.rb:13:in `parse'
from /Users/user/.rvm/gems/ruby-2.2.3/gems/md2key-0.8.1/lib/md2key/cli.rb:14:in `convert'
from /Users/user/.rvm/gems/ruby-2.2.3/gems/md2key-0.8.1/lib/md2key/cli.rb:32:in `method_missing'
from /Users/user/.rvm/gems/ruby-2.2.3/gems/thor-0.19.4/lib/thor/command.rb:29:in `run'
from /Users/user/.rvm/gems/ruby-2.2.3/gems/thor-0.19.4/lib/thor/command.rb:126:in `run'
from /Users/user/.rvm/gems/ruby-2.2.3/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/user/.rvm/gems/ruby-2.2.3/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
from /Users/user/.rvm/gems/ruby-2.2.3/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
from /Users/user/.rvm/gems/ruby-2.2.3/gems/md2key-0.8.1/exe/md2key:6:in `<top (required)>'
from /Users/user/.rvm/gems/ruby-2.2.3/bin/md2key:23:in `load'
from /Users/user/.rvm/gems/ruby-2.2.3/bin/md2key:23:in `<main>'
from /Users/user/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
from /Users/user/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'
The strange thing is in irb, I did
2.2.3 :001 > require 'redcarpet'
=> true
2.2.3 :002 > Redcarpet::Render::XHTML
=> Redcarpet::Render::XHTML
and it works fine, what do you think about it?
Running OS X 10.11
$ sudo gem install md2key
ERROR: Error installing md2key:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile
make "DESTDIR="
make: *** No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15/ruby/config.h', needed by `driver.o'. Stop.
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/ruby-ll-2.1.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/ruby-ll-2.1.2/ext/c/gem_make.out
It'd be good to have ~/.md2key
for configuration.
code:
font_family: Monaco
font_size: 26
custom_thems:
- name: Theme1
bold_color: [0, 255, 255]
italic_color: [0, 255, 0]
default_template: master1
- name: Theme2
font_family: Monaco
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.