Skip to main content

This code is for those who are tired of inserting {% static ' ' %} in every href,src links in html files while creating a Django project.

Project description

DjangoHtmlFiller

This code is for those who are tired of inserting {% static ' ' %} in every href,src links in html files while creating a Django project. :sassy_man:

From this:

Normal Html

To this:

Formatted for Django

Purpose:

  • The Main puspose of this code is to save hours of work by automatically scanning through & updating all the html files in the given folder.
  • It will store all the updated files in a seperate folder in the same directory without harming the original files.
    • You can examine & finalize all the changes and then cut+paste those files in place of original files later on.
    • You won't lose any of your files.
  • This code is properly tested & works 100% of the time. :heavy_check_mark:

Requirements:

  • Python 3

How To Use:

1. Through Github:

Steps:

  1. Clone this repository anywhere in your pc. (No need to clone in your Django project folder!)

  2. Now do cd (Cloned Directory path)/DjangoHtmlFiller/OsScrawler.py and then run OsScrawler.py program.

    Run Code

  3. Now the program will ask for the folder in which all your html/htm files are stored. In this example all of Django Project's html files are stored in templates folder.

    Assets Folder

  • You can give the program full path of that folder (all the html files within that folder will be scanned) or you can directly give the path of the html file you want to scan & update (only that file will be scanned).

  • In this case I am giving path of the templates folder in which all of the html files are stored.

    Give Full Path

  • The program will scan through given html file(s) & will save converted outputs in Formatter_Generated_Files folder in the same directory.

    program Execution

    Run Code

  • Now just replace this files in place of the original files & you are Done! :+1: :smile:

You can run this program multiple times for the same folder & it won't affect the already converted files.

Warning:

  • You CAN'T have more than one href/src links in the same line (super rare case). In this case the code will only formate left most link & you will have to manually formate the other one.

If you have any query regarding this programe you can drop a message at jayshukla0034@gmail.com or at Instagram.

Enjoy! :smile:

Project details


Download files

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

Source Distribution

DjangoHtmlFiller-1.0.4.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

DjangoHtmlFiller-1.0.4-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file DjangoHtmlFiller-1.0.4.tar.gz.

File metadata

  • Download URL: DjangoHtmlFiller-1.0.4.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.6

File hashes

Hashes for DjangoHtmlFiller-1.0.4.tar.gz
Algorithm Hash digest
SHA256 e7bba22952433a11829ad8a7d1d10c46725978df45ff3fa160510f7d49788220
MD5 22f6c3d6efaad9cbf923f6b2d74d69c4
BLAKE2b-256 6beaccffe06fa98ac64fae87deef159888560f83951ff71d9bf230dd84fab9e4

See more details on using hashes here.

File details

Details for the file DjangoHtmlFiller-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: DjangoHtmlFiller-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.6

File hashes

Hashes for DjangoHtmlFiller-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0c3faff6fe81b00c5da244ddcb19b743d2a8af5c1a3db704a1e378a791bf229e
MD5 2dc52b04b963967dd58e6dacf86b99b3
BLAKE2b-256 1e467c5cc37ff72fa731005863c3e053a0526063868930fea13e70ca07582749

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page