All Projects → L4TTiCe → djangify

L4TTiCe / djangify

Licence: MIT license
A Python script that converts HTML Files / Templates to Django compatible HTML Templates.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to djangify

Python-NEO-6M-GPS-Raspberry-Pi
Python script for the NEO-6M GPS module on the Raspberry Pi
Stars: ✭ 41 (-24.07%)
Mutual labels:  python-script
dirbpy
This is the new version of dirb in python
Stars: ✭ 36 (-33.33%)
Mutual labels:  python-script
Python-project-Scripts
This repositories contains a list of python scripts projects from beginner level advancing slowly. More code snippets to be added soon. feel free to clone this repo
Stars: ✭ 627 (+1061.11%)
Mutual labels:  python-script
rpi3-wifi-conf
A simple Python script to configure wifi over bluetooth for a Raspberry Pi 3
Stars: ✭ 112 (+107.41%)
Mutual labels:  python-script
IpHack
Track Location With Live Address And City in Termux
Stars: ✭ 315 (+483.33%)
Mutual labels:  python-script
Smtp-cracker
[NEW] : Simple Mail Transfer Protocol (SMTP) CHECKER - CRACKER Tool V2
Stars: ✭ 67 (+24.07%)
Mutual labels:  python-script
warpi
"GUI" script running on a Raspberry Pi 4
Stars: ✭ 29 (-46.3%)
Mutual labels:  python-script
JGetFund
Mac OS 开机自动执行脚本,爬取基金数据。
Stars: ✭ 15 (-72.22%)
Mutual labels:  python-script
OpenCVB
OpenCV .Net application supporting several RGBD cameras - Kinect, Intel RealSense, Luxonis Oak-D, Mynt Eye D 1000, and StereoLabs ZED 2
Stars: ✭ 60 (+11.11%)
Mutual labels:  python-script
Github-Environment-Cleaner
An interactive script to clean up GitHub environments
Stars: ✭ 101 (+87.04%)
Mutual labels:  python-script
GhostNET
GhostNET script that will help you be safer on the cyber
Stars: ✭ 45 (-16.67%)
Mutual labels:  python-script
Airscript-ng
A python script to simplify the process of auditing wireless networks.
Stars: ✭ 83 (+53.7%)
Mutual labels:  python-script
videoslimmer
Utility to remove unwanted audio and subtitles from mkv files.
Stars: ✭ 23 (-57.41%)
Mutual labels:  python-script
Dseized-Bot
This repository contains all of the code required NOTE you may need to download other dependencies which will be mentioned below. This bot has many features such as playing songs in multiple servers and making a queue for songs.
Stars: ✭ 20 (-62.96%)
Mutual labels:  python-script
the-seinfeld-chronicles
A dataset for textual analysis on arguably the best written comedy television show ever.
Stars: ✭ 14 (-74.07%)
Mutual labels:  python-script
github-clear-merged-pull-requests
Clear merged pull requests ref (branch) on GitHub
Stars: ✭ 12 (-77.78%)
Mutual labels:  python-script
fa
Automation tool for locating symbols & structs in binary (primary IDA focused)
Stars: ✭ 58 (+7.41%)
Mutual labels:  python-script
funny-words
A Python script that generates a list of pairs of funny words for naming things such as app releases, internal projects, servers and children.
Stars: ✭ 26 (-51.85%)
Mutual labels:  python-script
WiCrackFi
Python Script to help/automate the WiFi hacking exercises.
Stars: ✭ 61 (+12.96%)
Mutual labels:  python-script
Efficient-office
Alfred-Workflows,Vim,Script,Mac
Stars: ✭ 36 (-33.33%)
Mutual labels:  python-script

Djangify

djangify

A Python script that converts HTML Files / Templates to Django compatible HTML Templates. Brought to you by : Ohuru

Installation

pip install djangify

Usage Info

username@hostname $ djangify -h
usage: djangify [-h] [-d [BASE_DIRECTORY]] [-a [APP_NAME]] [f [f ...]]

Converts specified html files or all html files to django format within a
specified directory.

positional arguments:
  f                    provide file names to convert

optional arguments:
  -h, --help           show this help message and exit
  -a [APP_NAME]        provide django app name
  -d [BASE_DIRECTORY]  provide base directory
  -e [ENCODING]        provide encoding

Description

Converts all the HTML files specified in the files (' f ') argument into Django templates, replacing the contents of 'src', 'href' and 'url' tags with their Django compatible static conterparts with their Django App name prefixed.

For Example:

To process a set of HTML files, copy the djangify.py script to the directory containing these HTML files, and run the following command, (Here 'blog' refers to the App name for which we are processing these files)

$ djangify -a blog

This command will replace all local files referenced in 'src', 'href' and 'url' tags in the following way :

Original :

    <img class="mySlides" src="res/landreg/1.jpg" style="width:100%">
    <li><a href="register.html">Register</a></li>

After script execution :

   <img class="mySlides" src=" {% static 'blog/res/landreg/1.jpg' %} " style="width:100%">
   <li><a href=" {% static 'blog/register.html' %} ">Register</a></li>

The generated files from app Blog will reside inside Modified_Files

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].