md2phpbb - Turn markdown into phpBB code
version 0.02
Converts markdown into phpBB / BBcode format. Will read from STDIN, or files on the command-line. All output is sent to STDOUT.
Internally, this is a thin wrapper around the Markdown::phpBB module.
Of most use is :%!md2phpbb in vim, which will replace your current buffer (written in markdown) with the phpBB equivalent code. You can even bind it to a key (place in your `~/.vimrc` file):
:%!md2phpbb
:nmap <F5> :%!md2phpbb<CR>
If you've installed md2phpbb into a user (rather than system) directory, then running vim from vimperator may not have all your perl-specific environment variables in place. In that case you may need to use full paths:
:nmap <F5> :%!perl -I/home/pjf/perl5/lib/perl5 /home/pjf/perl5/bin/md2phpbb<CR>
If you're using vimperator, phpBB will get in the way of using CTRL-I to invoke vim. You can allow CTRL-E (or another key of your choice) to also invoke the editor by adding the following to your `~/.vimperatorrc` file:
:inoremap <C-e> <C-i>
You can now edit a message using vim/vimperator, and hit F5 to convert it from markdown into phpBB. Because the converter doesn't change existing phpBB code, you can make further edits in markdown and hit F5 as many times you need to refresh into phpBB.
phpbb2md < somefile.md > somefile.phpbb
Markdown::phpBB, Markdown::phpBB::Handler, phpbb2md, Markdent
Plenty. Report them or fix them at http://github.com/pjf/Markdown-phpBB/issues.
Paul Fenwick <pjf@cpan.org>
This software is copyright (c) 2014 by Paul Fenwick.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Markdown::phpBB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Markdown::phpBB
CPAN shell
perl -MCPAN -e shell install Markdown::phpBB
For more information on module installation, please visit the detailed CPAN module installation guide.