A tool to convert CSV documents to MTImport, useful to convert legacy data to blog-standard format for importing.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
benchmark
bin
features
lib
public
spec
tasks
views
.gems
.gitignore
CHANGELOG
LICENSE
README.rdoc
Rakefile
VERSION
config.ru
cucumber.yml
movable_erb.gemspec

README.rdoc

Movable Erb

by Joshua Davey github.com/jgdavey/movable_erb

Description

A simple CSV to MTImport conversion utility. Useful for mapping contacts data into individual entries in Movable Type.

MTImport format is simple enough that most blogging platforms can import it, so this utility could ease the pain of moving some older data structure in CSV format into a blog platform.

Requirements

  • fastercsv gem

Installation

[sudo] gem install jgdavey-movable_erb

Usage

MovableErb uses the header names in the first row of the CSV file to map to each of the mtimport’s values: Title, Body, Extended, Category, and Tags.

So, a CSV file that looks like:

Title,Body,Extended
Title of a Post,Body content (can include html, etc),Extended content

will become:

TITLE: Title of a Post
-----
BODY:

Body content (can include html, etc)

-----
EXTENDED:

Extended content

You can even specify more than one header column as Title, Body, etc., and they will be combined into one entity, joined by:

  • a comma for one-line attributes (title, author), or

  • a newline for multi-line (Body, Extended)

Commandline usage

After installing the gem, just run

movable_erb [options] yourfile.csv

The MIT License

Copyright © 2009

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.