Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Help migrate HTML files and templates form bootstrap 2 to 3.

Project Description

Easier migration from Boostrap 2 to Boostrap 3

b2tob3 is a command line tool to help migrate Web projects from bootstrap 2 to bootstrap 3 by performing a set of replacements that reflect bootstrap 3 class name changes.

b2tob3 searches all files ending in .html, .htm, .css or .js in the current directory and its subdirectories. You can specify the working directory with the d option like b2tob3 -d /path/to/dir.

b2tob3 does not fully automate migration, but it takes away some of the tedious work. Still, you’ll most likely need to perform manual fixes too.


pip install b2tob3


cd /project/html/

Follow these steps to avoid frustration:

  • Put your HTML/template files under version control, if they aren’t yet.
  • Change to the directory with the files containing Boostrap 2 specific markup.
  • Run the b2tob3 script once and only once.
  • Review the changes with a diff tool suitable for the version control system you use.
  • Perform the rest of the necessary changes manually.


  • Let me know about bugs by posting an issue.
  • Help reduce the manual work by improving the code.
  • Write tests.


Thanks to @demiurg for adding more robust replacements and command line options.

Release History

Release History

This version
History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
b2tob3-0.4.tar.gz (4.7 kB) Copy SHA256 Checksum SHA256 Source Sep 9, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting