Repository is archived
No commit activity in last 3 years
No release in over 3 years
A General-purpose CSV to ERB template formatter
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

 Project Readme

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.