Code Monkey home page Code Monkey logo

django-bootstrap-studio-tools's Introduction

django-bootstrap-studio-tools

A collection of scripts/tools to help export from Bootstrap Studio(BSS) to django template format

Prerequistes

Install beautifulSoup 4, see: https://www.crummy.com/software/BeautifulSoup/bs4/doc/ ideally in a virtualenv, eg:

python -m venv ~/venv/django-bss-tools
source ~/venv/django-bss-tools/bin/activate
python -m pip install pipenv
pipenv install

or in Ubuntu:

sudo apt-get install python3-bs4

To run:

python export.py <name of your file to convert/process>

Currently supports following attributes for django conversion:

dj-for   => will create a for loop
dj-ref   => will create ref to variable
dj-if    => will create if block
dj-block => will create a block

In bootstrap Studio, you can include the script export_settings.sh in the advance option in the export settings. So your html files will automatically be converted into django template format.

If this is not working, you will need to copy the export.py script to the location of your BSS app image.

Also you need to ensure that you have BeautifulSoup installed correctly.

TODO:

Add automated test to verify code is working. See the example.html and expected.html files.

django-bootstrap-studio-tools's People

Contributors

cheoppy avatar lingster avatar sojohnnysaid avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.