Convert HTML tags to Django static
pip install beautifulsoup4
python convert_static.py
Enter the file you want to convert the tags for.
You have purchased a html theme off themeforest for instance and you want to quickly turn the template into a website fast. The template comes with many absolute paths to the assets and you just want to get the tags for images, scripts or css working ASAP.
You can use the script to save you hours even days.
Always back up your files before running the script to avoid accidental data loss.
- Make it possible to convert all html files in a specific folder
- Done
- I added partials isolation. For now,
partials.py
will isolate<footer>
intofooter.html
and write an include in your target file. This also happens for<header>
- You can now generate view names and have url entries created for you to ensure you move even faster.
- Supposing you have
header.html
andfooter.html
already created, runcreate_partials_includes_without_file_creation.py
to avoid repeating creating fresh html files.
Cheers.