phpBB 3 Importer (old)

Thank you alot Gerhard! And of course everyone involved in making of this script!

The script is currently creating the topics and posts and everything seems fine so far. It was just that I was new with Docker, so I wasn’t familiar about the idea of working inside a container.

My contribution is this:

  1. Be sure to run the script inside the container with cd /var/discourse/ && ./launcher ssh app
  2. Check your table prefix in the converter script: replace phpbb_ with your own phpBB3 table prefix. Be cautious about renaming, as there are things that don’t co-operate with this simple solution.
  3. If you want to connect to a remote mySQL server, ensure that it’s accessible externally (you can check if it is with nmap <ip-address>, guide to opening it up)

And I also made the Docker-compatible script into a oneliner for an easy fire-and-forget:

apt-get update && apt-get install libmysqlclient-dev -y && git clone GitHub - nlalonde/ruby-bbcode-to-md: Convert BBCode to Markdown. · GitHub /tmp/ruby-bbcode-to-md && cd /tmp/ruby-bbcode-to-md && gem build ruby-bbcode-to-md.gemspec && gem install ruby-bbcode-to-md-0.0.13.gem && su - discourse && echo “gem ‘mysql2’” >> /var/www/discourse/Gemfile && echo “gem ‘ruby-bbcode-to-md’, path: ‘/tmp/ruby-bbcode-to-md’” >> /var/www/discourse/Gemfile && exit && cd /var/www/discourse && bundle install --no-deployment --path vendor/bundle && su - discourse && cd /var/www/discourse && RAILS_ENV=production bundle exec ruby script/import_scripts/phpbb3.rb bbcode-to-md

P.s. Perhaps the whole migration “framework” could use a Readme, the basic flow as well as these specific migration scripts. Also the punbb3 script should have a lower batch size by default (10 or 100 I think).

4 лайка