Giter Site home page Giter Site logo

egonschiele / mdpress Goto Github PK

View Code? Open in Web Editor NEW
338.0 22.0 49.0 530 KB

[DEAD] Make impress.js presentations from markdown files.

Home Page: http://egonschiele.github.io/mdpress/

License: MIT License

Ruby 8.10% CSS 59.15% JavaScript 32.23% HTML 0.51%

mdpress's Introduction

mdpress

This project is looking for a new maintainer! If you are interested, please send me a message. In the meantime, I will continue accepting merge requests but I won't be fixing bugs.

This is a tool that converts markdown files to presentations using impress.js.

Example

This presentation was created from this markdown file.

This presentation was created from the same markdown file and a different stylesheet using mdpress -s [stylesheet name].

Advantages

  • dead simple, works with any markdown file
  • comes with a beautiful default stylesheet + more styles (more styles TBD) ... no need to write your own
  • ...but you can write your own easily if you want!
  • comes with prettify integrated, does code highlighting out of the box
  • has an auto-update mode; update your markdown file and mdpress will update your presentation automatically
  • quick install as a ruby gem
  • presentations are tiny and easy to distribute
  • presentations are easy to read as a plain text file

Install

gem install mdpress

Usage

  mdpress [url or filename.md]

This creates a directory named filename. Start the presentation by opening up index.html.

See full usage (it's easy!).

Mdpress in the wild

Contributors

Copyright (C) 2013 by Aditya Bhargava (MIT license)

mdpress's People

Contributors

delwaterman avatar egonschiele avatar iamsebastian avatar jj avatar kmlawson avatar svenwin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mdpress's Issues

Bug creating

When trying to create an initial presentation, a 'no such file or directory' error is thrown.

charlie@charlie-VirtualBox:~$ mdpress [test.md]
/home/charlie/.rvm/gems/ruby-1.9.3-p374@global/gems/mdpress-0.0.12/bin/mdpress:33:in read': No such file or directory - [test.md] (Errno::ENOENT) from /home/charlie/.rvm/gems/ruby-1.9.3-p374@global/gems/mdpress-0.0.12/bin/mdpress:33:inrender'
from /home/charlie/.rvm/gems/ruby-1.9.3-p374@global/gems/mdpress-0.0.12/bin/mdpress:125:in <top (required)>' from /home/charlie/.rvm/gems/ruby-1.9.3-p374@global/bin/mdpress:19:inload'
from /home/charlie/.rvm/gems/ruby-1.9.3-p374@global/bin/mdpress:19:in <main>' from /home/charlie/.rvm/gems/ruby-1.9.3-p374@global/bin/ruby_noexec_wrapper:14:ineval'
from /home/charlie/.rvm/gems/ruby-1.9.3-p374@global/bin/ruby_noexec_wrapper:14:in `

'

Image folder not included correctly with -i

When I do

mdpress -r img presentation.md

I get a folder presentation/img/ with my images in it.

When I do

mdpress -i img presentation.md

I get a folder presentation/img/img with my images in it and the images aren’t included correctly.

Explanation on how to include images needed

Please include a note or example on how to include images on the presentation.

I have tried to put them next to the md file, but then they are not 'automatically copied' to the generated folder.

Is there a folder where I can put my images?

How to change the default highlight style for Prettify ?

Hi,
Mdpress is an amazing tool, thanks for share it !

Im just wondering about an easy way to select the default style to prettify the code blocks.

It seems that github.css style is used as a default, and even when this can be fixed manually by copying the styles included under css/highlight_styles/* or by editing the main index.html to choose the desired path to the css file, the changes are erased when the -a flag is used to continuously run mdpress.

Cheers

Define additional overwriting styles

There is the possibility to replace the whole stylesheet locally, but I quite like the default theme.
In my use case, all I want to do is give images a little box-shadow, small enhancements for my particular presentation.

I propose using the „cascading“ in CSS:
• The user can have a themes/custom.css in his presentation folder
• The changes here are applied onto the final styling (that should be very easy to implement, just include the custom.css last in the html)

add examples, LICENSE and README in the gem

Hi!

I noticed that the git repo has a examples/ directory, which is not shipped in the gem.
Can you add it in the gem?
Can you also LICENSE and README too?
A Debian package is being prepared for mdpress, and gems are usually what is used as the source of Ruby library. I would be nice to have examples readily available.

Thanks!

Cédric

1024x768 zoom factor

When setting the screen resolution to 1024x768 the presentation will be cut off at the edges.

XML tags are stripped.

Paketverwaltung **Maven**

- IDE-agnostisch
- Dependency-Management

        <dependency>
            <groupId>edu.gmu.cs</groupId>
            <artifactId>mason</artifactId>
            <version>14.0</version>
        </dependency>

- einfaches deployment

displays as
screenshot

compared to
screenshot

Can not create a new slides, NoMethodError

% mdpress chi.md
/Users/hsu-wei-cheng/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mdpress-0.0.15/bin/mdpress:90:in render': private methodrender' called for #RedcarpetCompat:0x007fa0db7e8af0 (NoMethodError)
from /Users/hsu-wei-cheng/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/mdpress-0.0.15/bin/mdpress:149:in <top (required)>' from /Users/hsu-wei-cheng/.rbenv/versions/2.1.2/bin/mdpress:23:inload'
from /Users/hsu-wei-cheng/.rbenv/versions/2.1.2/bin/mdpress:23:in `

'

14:03:37
% rbenv local 1.9.3-p547

14:03:43
% mdpress chi.md
/Users/hsu-wei-cheng/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/mdpress-0.0.15/bin/mdpress:90:in render': private methodrender' called for #RedcarpetCompat:0x007fb973a12320 (NoMethodError)
from /Users/hsu-wei-cheng/.rbenv/versions/1.9.3-p547/lib/ruby/gems/1.9.1/gems/mdpress-0.0.15/bin/mdpress:149:in <top (required)>' from /Users/hsu-wei-cheng/.rbenv/versions/1.9.3-p547/bin/mdpress:23:inload'
from /Users/hsu-wei-cheng/.rbenv/versions/1.9.3-p547/bin/mdpress:23:in `

'

Minor inconsistency in handling resource folders

For themes, the folder themes/ is implicitely used to incude custom themes, there is no command line switch.

For images, there is no implicit folder like images/, only the -i command line option.

I’d advise to either use one or the other, or implicit folders which can be overwritten by switches. The last option would be the most convenient imho.

\ Escaping broken

I have problems using brackets () underscores _ etc.
It seems that escaping with \ doesn't work correctly. I don't have this problem for example with pandoc.

default.css ignores <ol>

default.css has a rule:

li {
    line-height: 50px;
    list-style: disc;
}

But this makes ol elements appear with bullets instead of numbers. Perhaps this instead?

ul>li {
    line-height: 50px;
    list-style: disc;
}

ol>li {
    line-height: 50px;
    list-style: decimal;
}

Or, more simply, remove the list-style attribute?

li {
    line-height: 50px;
}

Thanks for a great package!

Impress old version

the actual version are the 0.5.3 while the version of the gem package are the 0.3.

Parsing of subscript formulas in latex conflicts with parsing of markdown italic

Not so much an issue, but it took me some time to realize this, so maybe it could be in the docs.

If you try to put an equation like:

$a_k = b_k$

with latex, it won't work, because the parses sees _k = b_ as an italic text. You have to explicitly scape the _ characters:

$a\_k = b\_k$

works alright. Maybe it would be good to pass all strings enclosed by $ or $$ through the markdown parser without modification, or maybe just warn in the docs that such conflicts may happen.

I can't think of another conflict between markdown syntax and latex code that I frequently write. Maybe this is the only really frequent one.

Thanks a lot for mdpress! It's great to have it.

Include language in the code blocks (if available)

Along the lines of the previous issue, line 25 of lib/impress_renderer.rb can be changed to use the language definition of fenced blocks.

My naive kludge is to use:

   "<pre><code class='prettyprint #{lang}'>#{code}</code></pre>"

worse case, if lang is not defined, there will be an extra empty space in the class attribute for that element.

Bet you can make it better. Tnxs again for you gem.

Cheers.

Auto-update dies under OS X

I tried mdpress -a and it always dies after 2 seconds of running with the error:

$ mdpress -a notes.md/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:150:in `uptodate?': undefined method `each' for "notes/index.html":String (NoMethodError)
    from /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/mdpress-0.0.10/bin/mdpress:135:in `auto'
    from /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/mdpress-0.0.10/bin/mdpress:144:in `<top (required)>'
    from /usr/local/Cellar/ruby/1.9.3-p194/bin/mdpress:23:in `load'
    from /usr/local/Cellar/ruby/1.9.3-p194/bin/mdpress:23:in `<main>'

This is a fresh install of ruby from homebrew, with the only gem installed being mdpress (and its prereqs, I suppose).

please tag versions in the repo

Hi!

I would like to package mdpress for Debian. As a starting point, I would like to use github tarball instead of gems, because it contains examples, README, LICENSE.
Unless you consider include these files in the gem, may I kindly ask to to tag the version in github repository to allow one to follow released version more easily?

Thanks!

Cédric

Markdown parsing should include fenced code and tables

My knowledge of ruby is practically nil, so my kludge was to change line 57 of bin/mdpress to read:

  m = Markdown.new(ImpressRenderer, :autolink => true, :fenced_code_blocks => true, :tables => true)

which does the trick.

Tnxs for a nice markdown -> impress.js converter.

Support for title

mdpress not support the title tag for the html page.
it's possible integrate it?

Add latex mathematical formula support

Because of my special situation, I often need to insert latex mathematical formula in my slides, but mdpress doesn't this feature now, it is possible to integrate it in the future?

Check out url2mdpress

Hey mdpress is a really cool project, thanks for your hard work! I totally used it for my presentation last week.

Because my workflow involved editing the markdown in Gingko, I needed to write a wrapper script that download the markdown from a URL, and then ran mdpress.

Eventually I refactored the 3 line shell script into a 100 line ruby script called mdpress.
Check it out at @dergachev/url2mdpress

@egonSchiele what's the best way to maintain this going forward?
Does it make sense to try to integrate the two libraries?

please tag versions in the repo

Hi,

I have noticed that 0.14 hasn't been tag in the repo. Could you please tag the version so that following development from the Git repo is easier?

Thanks!

Cédric

Improve impress.js attribute integration

Right now, the way to specify the impress.js attributes is a "ugly hack"; I'm quoting the source here ;)

I've had this idea: instead of specifying the attributes inside the markdown, use a separate file that would contains the attribute per step. The way to link the two would be by using the heading (single '#') and/or by step number. This file could be in a simple format, like YAML or JSON. So, for example:
The markdown file

# Intro
This is an intro 

---
And this is step 2!

And the "attributes" file

{ "intro": { "data-x" : -100 }, "step-2" : { "data-x" : 200 }}

Also, since this mechanism links both files using an "id", the same id could be the id of the html element. So for most cases you'd get the html id for free and this would help with custom theme. For cases where you'd want a specific id instead of "step-#" and don't have an heading for a step, you could still specify "id" in the attributes file.

This has the benefit that you can still visualize the markdown file without using mdpress, as a big one html page. Markdown stays Markdown.

Thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.