Is it OK to just require bbcode-to-md in importers?

AI-generated summary

The discussion revolves around whether requiring ruby-bbcode-to-md in importers, specifically in vbulletin.rb, is acceptable. pfaffman suggests including code that requires ruby-bbcode-to-md to simplify the process, as the current method of enabling it through a command line argument is not clearly documented. However, gerhard points out that ruby-bbcode-to-md is already included in the Gemfile and can be enabled by setting the IMPORT=1 environment variable before running bundle install or executing the import script.

TL;DR: When I submit a PR for vbulletin.rb (I added support for assigning admins and moderators, and maybe something else), can I include code that requires ruby-bbcode-to-md so that it just works?

Painful Explanation

I’ve been running and writing importers for about a year now and this is the first time that I’ve managed to include ruby-bbcode-to-md.

When I follow these directions I get some kind of version error:

If I instead do this:

  puts "echo gem \\'ruby-bbcode-to-md\\' >> Gemfile"
  puts "bundle install"

and

@bbcode_to_md  = true
  require 'ruby-bbcode-to-md'

It works. And there’s no mention of the bbcode-to-me command line argument in vbulletin.rb, so unless someone running the script instinctively reads base.rb, they don’t have much chance of knowing about that. And the importer is pretty much broken without it.

Wait, there is this comment # convert *-tags to li-tags so bbcode-to-md can do its magic on phpBB's lists: but even then, there’s no hint how to make that happen.

It’s already in the Gemfile. :wink:

Just set the environment variable IMPORT=1 before your run bundle install or execute the import script.