Ning import script

For anyone playing along at home.

If you want to add import custom categories like this:

Make sure to also edit this line in ning.rb accordingly:

create_categories((["Blog", "Pages", "XYZ"] + @discussions_json.map { |d| d["category"] }).uniq.compact) do |name|

Otherwise you’ll end up with everything in the “Uncategorized” category.

4 curtidas