Extract code, markdown, and yaml files from R markdown.
Project description
Create R markdown (Rmd) files from YAML, code, and markdown files.
Extract YAML, code, and markdown files from R markdown files.
The rmdawn Python package consists of 2 shell commands and functions:
rmdawn, which concatenates input files to output an R Markdown (Rmd) file.
rmdusk, which extracts 1) a YAML file, 2) Python or R scripts and 3) Markdown (md) files from Rmd files.
Installation
pip install rmdawn
or clone the repo, e.g. git clone https://github.com/marskar/rmdawn and install locally using setup.py (python setup.py install) or pip (pip install .).
Creating an R markdown file with the rmdawn shell command
rmdawn header.yml intro.md scrape.py plot.R notes.txt > example.Rmd
Extract YAML, markdown, and code files from R markdown files with the rmdusk shell command
rmdusk example.Rmd
Basic usage: Python environment
from pathlib import Path
from rmdawn import rmdawn, rmdusk
# Create an R markdown file from source files
Path("example.Rmd").write_text(
rmdawn(["header.yml", "intro.md", "scrape.py", "plot.R", "notes.txt"])
)
# Extract source files from an R markdown file
rmdusk("example.Rmd")
History
0.0.1 (2018-12-11)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rmdawn-0.0.14.tar.gz
(306.6 kB
view hashes)
Built Distribution
Close
Hashes for rmdawn-0.0.14-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce3a67d8d8bfbc8eba0bfd53f44ff59037280d9f7bbe12dd3f2ac7cc22050e16 |
|
MD5 | 22f8b7537d38912846f87eefb60a9ff9 |
|
BLAKE2b-256 | ee297272b5b2d0c33b6a9ebb1a004faa730df8cbc1f1fc12d85e8b953bfa78db |