https://github.com/ekaitz-zarraga/drowmark
VIM plugin to post in Wordpress using Markdown
https://github.com/ekaitz-zarraga/drowmark
filetype pandoc vim-plugins wordpress wordpress-xmlrpc
Last synced: about 1 month ago
JSON representation
VIM plugin to post in Wordpress using Markdown
- Host: GitHub
- URL: https://github.com/ekaitz-zarraga/drowmark
- Owner: ekaitz-zarraga
- License: gpl-3.0
- Created: 2016-04-01T21:28:07.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-12-04T20:13:55.000Z (over 7 years ago)
- Last Synced: 2025-10-13T02:42:39.251Z (8 months ago)
- Topics: filetype, pandoc, vim-plugins, wordpress, wordpress-xmlrpc
- Language: Python
- Homepage: http://www.vim.org/scripts/script.php?script_id=5374
- Size: 42 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# droWMark
Vim plugin to post from VIM to WordPress using
[Pandoc-Markdown](http://pandoc.org/README.html#pandocs-markdown).
It uses an special template in files, they are a mix between an INI header and
a MarkDown content. There is a template in `templates` directory.
## How to
Install the plugin using Vundle, Pathogen (or other package management tool) or
Manually. (see below)
When the plugin is installed, you can create a new blog entry using:
```
:NewWordPress
```
This will insert the template file in the file you are editing and switch the
filetype to `drowmark` which automatically activates the `drowmark` syntax
highlighting. This filetype is also activated when the extension of the file is
`.wp`. The template contains all the information needed to fill the
configuration part.
When the blog entry is finished, it is possible to post in WordPress with the
following command:
```
:PostWordPress
```
This will ask for the username and the password before publishing the post in
WordPress.
### Upload Images
All the URLs of the images are checked. If the URL of the image is a relative
path to a local image, it's uploaded *automagically* and the URL is changed to
the uploaded media file URL.
## Installation
Installation could be done using a plugin manager or manually.
### Manual installation
Copy the directories in you `.vim` folder and you are done. Keep the
directories in the correct order. For example, put all the files in `ftplugin`
folder inside `.vim/ftplugin` and so on.
### Plugin manager installation
Most of the plugin managers, like Vundle (I recommend this one) are able to
download the code of the plugin from gitHub and install it correctly, putting
the directory tree under `.vim/bundle/droWMark` directory.
### Dependencies
It is necessary to have Vim compiled with `+python` option.
Dependencies for the python script are:
- Panflute package, wich also depends on Pandoc
`pip install panflute`
- Wordpress XML RPC
`pip install python_wordpress_xmlrpc`
- ConfigParser package
`pip install configparser`
## Contributing
This is a very small project I've made mostly for myself. This means a couple
of interesting things:
- It's flexible: New features could be added easily if requested.
- It's easy to contribute: Just make a pull request, open an issue or whatever
you prefer.
Being a small project it's not always good. I only develop this plugin during
my free time and, since I'm a freelance, it's very difficult to find free time
for my own coding. Contributions are welcome.
## Notes
### Vim independent
It keeps python code as separate as possible from VIM. Python code is also
callable from outside with the same functionality. VIM is only an interface to
insert the parameters correctly.
### Useful links for writing plugins
- [How to write vim plugins](http://stevelosh.com/blog/2011/09/writing-vim-plugins/)
- [Python in vim plugins](http://vimdoc.sourceforge.net/htmldoc/if_pyth.html#:pyfile)
- [XML-RPC WordPress](http://python-wordpress-xmlrpc.readthedocs.org/en/latest/overview.html)
- [Syntastic help file](https://github.com/scrooloose/syntastic/blob/master/doc/syntastic.txt)