Crates.io | cmark2jira |
lib.rs | cmark2jira |
version | 0.4.0 |
source | src |
created_at | 2017-06-26 15:56:06.277763 |
updated_at | 2017-06-28 16:48:43.655124 |
description | Translate good CommonMark into bad JIRA markup. |
homepage | https://github.com/brandur/cmark2jira |
repository | https://github.com/brandur/cmark2jira |
max_upload_size | |
id | 20793 |
size | 12,576 |
Translate good CommonMark (Markdown) into bad JIRA markup. This may be useful for anyone locked into Atlassian's prison of bad software.
Functionality is very minimal. It reads CommonMark from
stdin
and prints the converted content on stdout
:
cargo install cmark2jira
echo "*markdown!*" | cmark2jira
I have Vim setup so that I can easily pop open a new tab
containing an ephemeral file where I can write a comment
by pressing <leader>co
:
function! NewComment()
let r = strftime("%Y-%m-%d_%H-%M-%S")
execute "edit ~/comments/blob_" . fnameescape(r) . ".md"
endfunction
nnoremap <Leader>co :call NewComment()<CR>
After I'm done I press <leader>ji
to run the tab's
content through cmark2jira
and put the result into my
unnamed register (*
) which is mapped on Mac OS to my
clipboard:
function! ToJIRA()
let @* = system('cmark2jira', join(getline(1,'$'), "\n"))
endfunction
nnoremap <Leader>ji :call ToJIRA()<CR>
I then make my way over to a browser tab with JIRA open and
paste with Cmd+V
.
Run tests with:
cargo test
To release the package:
vi Cargo.toml # bump version number
cargo build # ensure that Cargo.lock gets updated
git add Cargo.toml Cargo.lock
git commit
cargo package
cargo publish