Weave.jl/README.md

77 lines
2.9 KiB
Markdown
Raw Normal View History

# Weave
2014-12-01 21:41:12 +01:00
2016-12-20 20:50:51 +01:00
[![Build Status](https://travis-ci.org/mpastell/Weave.jl.svg?branch=master)](https://travis-ci.org/mpastell/Weave.jl)
[![Build status](https://ci.appveyor.com/api/projects/status/r97pwi9x8ard6xk6/branch/master?svg=true)](https://ci.appveyor.com/project/mpastell/weave-jl/branch/master)
[![Coverage Status](https://img.shields.io/coveralls/mpastell/Weave.jl.svg)](https://coveralls.io/r/mpastell/Weave.jl?branch=master)
2014-12-04 16:54:56 +01:00
Weave is a scientific report generator/literate programming tool
2016-12-12 20:40:05 +01:00
for Julia. It resembles [Pweave](http://mpastell.com/pweave), Knitr, rmarkdown
2014-12-02 15:59:26 +01:00
and Sweave.
2014-12-01 21:41:12 +01:00
2016-12-12 20:40:05 +01:00
You can write your documentation and code in input document using Noweb,
2016-12-16 23:16:40 +01:00
Markdown, Script syntax and use `weave` function to execute to document to capture results
2016-12-12 20:40:05 +01:00
and figures.
2014-12-01 21:41:12 +01:00
**Current features**
* Noweb, markdown or script syntax for input documents.
2014-12-01 21:41:12 +01:00
* Execute code as terminal or "script" chunks.
2016-12-12 13:05:26 +01:00
* Capture Plots, Gadfly, PyPlot and Winston figures.
* Supports LaTex, Pandoc, Github markdown, MultiMarkdown, Asciidoc and reStructuredText output
2016-12-16 23:16:40 +01:00
* Publish markdown directly to html and pdf using Julia or Pandoc markdown.
* Simple caching of results
2016-12-12 13:05:26 +01:00
* Convert to and from IJulia notebooks
2014-12-01 21:41:12 +01:00
## Usage
2014-12-22 16:03:33 +01:00
Run from julia using Gadfly for plots:
2014-12-01 21:41:12 +01:00
2016-04-20 21:19:01 +02:00
```julia
using Weave
2014-12-22 16:03:33 +01:00
weave(Pkg.dir("Weave","examples","gadfly_sample.mdw"))
2016-04-20 21:19:01 +02:00
```
If you have Pandoc installed you can also weave directly to html and pdf.
```julia
weave(Pkg.dir("Weave","examples","gadfly_md_sample.jmd"), informat="markdown",
out_path = :pwd, doctype = "md2html")
```
![Weave code and output](http://mpastell.com/images/weave_demo.png)
2014-12-02 09:55:32 +01:00
2015-01-02 16:40:14 +01:00
## Documentation
2014-12-05 17:58:15 +01:00
Documenter.jl with MKDocs generated documentation:
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://mpastell.github.io/Weave.jl/stable)
[![](https://img.shields.io/badge/docs-latest-blue.svg)](https://mpastell.github.io/Weave.jl/latest)
2014-12-05 17:58:15 +01:00
2016-04-25 23:43:00 +02:00
## Editor support
2016-04-25 23:41:34 +02:00
I have made [language-weave](https://atom.io/packages/language-weave) package
for Atom to do the syntax highlighting correctly.
Noweb documents work well with ESS as well, to set doc-mode for .mdw files to markdown
and code to Julia you can do:
```clojure
(defun mdw-mode ()
(ess-noweb-mode)
(setq ess-noweb-default-code-mode 'ess-julia-mode)
(setq ess-noweb-doc-mode 'markdown-mode))
(setq auto-mode-alist (append (list (cons "\\.mdw$" 'mdw-mode))
auto-mode-alist))
```
2014-12-05 17:58:15 +01:00
## Contributing
I will probably add new features to Weave when I need them myself or if they are requested and not too difficult to implement. You can contribute by opening issues on Github or implementing things yourself and making a pull request. I'd also appreciate example documents written using Weave to add to examples.
2014-12-05 17:58:15 +01:00
## Contributors
2014-12-22 16:06:08 +01:00
You can see the list of contributors on Github: https://github.com/mpastell/Weave.jl/graphs/contributors. Thanks for the important additions, fixes and comments.