bunto-import is entirely open-source, which means we need your help to make it better!
Ran into an Issue?
Found an issue with one of the importers? Sorry about that! In order to better assist you and make sure the problem never happens, again, we would love for you to do a few things:
- Collection information about your system: operating system and version, Ruby version, Bunto version, bunto-import version.
- Which importer are you using? Note this.
- Collect the relevant data. This may be data from your database or input file. This will help us diagnose where the issue occurred.
- Ensure the
--traceoption is specified if you’re running
bunto importfrom the command-line.
- Open a new issue describing the four above points, as well as what you expected the outcome of your incantation to be.
You should receive help soon. As always, check out our help repo if you just have a question.
Creating a New Importer
So you have a new system you want to be able to import from? Great! It’s pretty simple to add a new importer to
bunto-import. In this example, we’ll be creating the
First thing’s first: create the file where the importer will go. In this case, that will be
Inside this file, we’ll add this template:
Let’s go through this quickly.
This function is called before you run your importer to make sure all the necessary gem dependencies are installed on the user’s system.
specify_options function is passed
c, which is the
Mercenary::Command instance for this importer. It allows you to specify the right options for your importer to be used with the command-line interface for your importer.
bunto-import sets up everything else – just specify these options and you’re golden.
Where the magic happens! This method should read from your Blag source, then output a Bunto site.
This function is entirely optional, but allows for some validation of the options. This method allows you to validate the options any way you wish. For example:
Once you have your importer working (test with
script/console), then you’re ready to add documentation. Add your new file:
site/_importers/blag.md. Take a look at one of the other importers as an example. You just add basic usage and you’re golden.
All set? Add everything to a branch on your fork of bunto-import and submit a pull request. Thank you!