[DRE-commits] [mdpress] 01/04: Imported Upstream version 0.0.17+debian
Cédric Boutillier
boutil at moszumanska.debian.org
Sun Feb 9 22:56:10 UTC 2014
This is an automated email from the git hooks/post-receive script.
boutil pushed a commit to branch master
in repository mdpress.
commit c9cf545e5ec36103d84b130dd382e0a766759c67
Author: Cédric Boutillier <boutil at debian.org>
Date: Sun Feb 9 23:38:28 2014 +0100
Imported Upstream version 0.0.17+debian
---
README.md | 127 +++++---------------------------------------
bin/mdpress | 13 ++++-
lib/impress_css/default.css | 1 -
metadata.yml | 8 +--
4 files changed, 29 insertions(+), 120 deletions(-)
diff --git a/README.md b/README.md
index daf86e5..b3d6557 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,12 @@
# mdpress
-This is a tool that converts markdown files to presentations using impress.
+This is a tool that converts markdown files to presentations using [impress.js](https://github.com/bartaz/impress.js/).
# Example
-[This presentation](http://egonschiele.github.com/mdpress/default) was created from [this markdown file](https://raw.github.com/egonSchiele/mdpress/master/examples/demo.md).
+[This presentation](http://static.adit.io/mdpress/default) was created from [this markdown file](https://raw.github.com/egonSchiele/mdpress/master/examples/demo.md).
-[This presentation](http://egonschiele.github.com/mdpress/impress) was created from the same markdown file and a different stylesheet using `mdpress -s [stylesheet name]`.
+[This presentation](http://static.adit.io/mdpress/obtvse) was created from the same markdown file and a different stylesheet using `mdpress -s [stylesheet name]`.
## Advantages
@@ -26,112 +26,16 @@ This is a tool that converts markdown files to presentations using impress.
## Usage
- mdpress [filename.md]
- mdpress [http://www.yourdomain.com/path/to/filename.md]
+ mdpress [url or filename.md]
This creates a directory named `filename`. Start the presentation by opening up `index.html`.
-## Quickstart (writing your first presentation!)
+[See full usage](http://egonschiele.github.io/mdpress/) (it's easy!).
- # Chicken Chicken Chicken
- ## By Chicken
+## Mdpress in the wild
- ---
-
- # Chicken
- - Chicken
- - Chicken Chicken
-
-Save that as `test.md` and then use `mdpress test.md` to convert it to a presentation.
-`mdpress` uses [Redcarpet](https://github.com/tanoku/redcarpet), so it can parse whatever markdown you throw at it.
-We use the horizonal rule, `---`, to indicate the start of a new slide.
-
-### Getting Fancy: adding transformations
-
-So far the slide transitions haven't been that exciting. Let's spice them up.
-Below the `---`, type:
-
- = data-x="1000"
-
-And re-compile with `mdpress test.md` (you might have to delete your old presentation directory first).
-
-Aha! Not bad! We specify transformations with `= [list of transformations]` as the first line of whatever slide we want to apply the transformation to.
-
-We could have written
-
- = data-x="1000" data-scale="2"
-
-To make it scale as well as swipe.
-
-## Possible Attributes
-
-- `data-x`, `data-y`, `data-z`: positioning
-- `data-rotate-x`, `data-rotate-y`, 'data-rotate-z`, `data-rotate`: rotation (`data-rotate` and `data-rotate-z` are exactly the same)
-- `data-scale`: scale
-- `id`: used as the slide link. For example, if you use `id=intro`, you can link to that slide using `index.html#/intro`.
-
-See [impress.js](https://github.com/bartaz/impress.js/blob/master/index.html) for a broader description of these.
-
-Adding this syntax to Markdown feels like kind of a hack, but it's concise. I'm open to suggestions for something better.
-
-## Auto-update
-
-Earlier, our workflow involved having to delete the old presentation and recompile every time we made an edit. The better choice is to use the automatic mode:
-
- mdpress -a [filename.md]
-
-Now, `mdpress` will keep running and check for updates to your markdown file. It will automatically recompile the presentation for you, so you can seamlessly edit your markdown and view your changes instantly.
-
-## Stylesheets
-
-`mdpress` comes with a default stylesheet, plus a few more. See the full list of available stylesheets with
-
- mdpress -l
-
-Or specify a stylesheet to use with
-
- mdpress -s [stylesheet]
-
-If you make your own stylesheets, send me a pull request and I'll add them to the list! See below.
-
-You can also create your own local theme:
-
-1. Use the 'lib/impress_css/' files as a model to work from.
-2. Create a folder called 'themes' in the directory where your markdown
- file is. Inside it put the [yourtheme].css and [yourtheme].html files
-3. Call mdpress -s [yourtheme] and mdpress will look for the two theme
- files in themes/ matching that name.
-
-## Running a presentation
-
-Someone emailed you a `mdpress` presentation. Now you want to **just run it**? Sure:
-
- mdpress -r [filename.md]
-
-That will automatically compile the presentation and open it in a browser window.
-
-## Latex Support
-
-mdpress now has Latex support through [MathJax](http://www.mathjax.org/). To build your presentation with latex support, use the `--latex` flag.
-
-Put your latex code between a pair of `$$`'s, like this:
-
- # Latex!
- $$e^{\imath\pi} = -1$$
-
-**Note**: you might run into conflicts between markdown and latex. For example, `_` means emphasize in markdown. So if you want subscripts, escape `_`:
-
- $a_x$ # wrong, x will be italic
- $a\_x$ # right, x will be a subscript
-
-## Metadata
-
-Metadata can be set via YAML-Frontmatter. Have a look at the examples for further information. For example, if you want to set a title, put this at the top of the markdown file:
-
- ---
- title: All about chicken
- ---
-
+- There's a [debian package](http://ftp-master.debian.org/new/mdpress_0.0.14+debian-1.html) in progress.
+- Here's a [Yeoman generator](https://github.com/btholt/generator-mdpress) for mdpress.
## Contributing
@@ -143,14 +47,9 @@ To contribute a new stylesheet, follow these steps:
## Contributors
-- Mte90
-
-## License (MIT)
-
-Copyright (C) 2012 by Aditya Bhargava
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+- [Mte90](https://github.com/Mte90)
+- [linopolus](https://github.com/linopolus)
+- [kmlawson](https://github.com/kmlawson)
+- [guidokessels](https://github.com/guidokessels)
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+Copyright (C) 2013 by Aditya Bhargava (MIT license)
diff --git a/bin/mdpress b/bin/mdpress
index 104135a..0f63a52 100755
--- a/bin/mdpress
+++ b/bin/mdpress
@@ -84,7 +84,7 @@ def render opts
ImpressRenderer.head= File.read(STYLESHEET_HEAD)
end
- m = Markdown.new(ImpressRenderer, :autolink => true, :fenced_code_blocks => true, :tables => true)
+ m = Markdown.new(ImpressRenderer, :autolink => true, :fenced_code_blocks => true, :tables => true, :strikethrough => true)
log "rendering presentation"
f = File.open(DIRNAME + "/index.html", "w+")
f.write(m.render(text))
@@ -102,6 +102,7 @@ EOS
opt :run, "Run presentation (automatically compiles to a tmp directory and opens in a browser window)"
opt :latex, "Provide Latex support"
opt :verbose, "Be verbose."
+ opt :images, "Directory of images for the presentation", :type => :string
end
if OPTS[:list]
@@ -146,6 +147,16 @@ else
Dir.mkdir(DIRNAME)
end
+if OPTS[:images]
+ if File.directory?(OPTS[:images])
+ FileUtils.cp_r(OPTS[:images], File.join(DIRNAME, OPTS[:images]))
+ log "copy the images into the presentation"
+ else
+ puts "'#{OPTS[:images]}' is not a valid directory."
+ exit
+ end
+end
+
render OPTS
log "copying files"
diff --git a/lib/impress_css/default.css b/lib/impress_css/default.css
index 1192172..fc5461e 100644
--- a/lib/impress_css/default.css
+++ b/lib/impress_css/default.css
@@ -140,7 +140,6 @@ ul {
li {
line-height: 50px;
- list-style: disc;
}
td,th {
diff --git a/metadata.yml b/metadata.yml
index c80eb65..0f6ae9d 100644
--- a/metadata.yml
+++ b/metadata.yml
@@ -1,13 +1,13 @@
--- !ruby/object:Gem::Specification
name: mdpress
version: !ruby/object:Gem::Version
- hash: 1
+ hash: 61
prerelease:
segments:
- 0
- 0
- - 15
- version: 0.0.15
+ - 17
+ version: 0.0.17
platform: ruby
authors:
- Aditya Bhargava
@@ -15,7 +15,7 @@ autorequire:
bindir: bin
cert_chain: []
-date: 2012-10-29 00:00:00 Z
+date: 2014-01-21 00:00:00 Z
dependencies:
- !ruby/object:Gem::Dependency
name: redcarpet
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/mdpress.git
More information about the Pkg-ruby-extras-commits
mailing list