Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Features] A few ideas for improvement #23

Open
yasircoskun opened this issue Jun 15, 2022 · 1 comment
Open

[Features] A few ideas for improvement #23

yasircoskun opened this issue Jun 15, 2022 · 1 comment

Comments

@yasircoskun
Copy link
Contributor

yasircoskun commented Jun 15, 2022

i wanna improve this project and i have some ideas about it.

Add html formatter to processing pipeline

HTML files must be formatted in pre-processing time because sometimes a team member use different ide or different configuration. We need html templates in a standart form.

Formatter Customization

we can use a file called .djangify.conf for this task. Users change this files and set formatter options before execution. if file not found in locale directory we can get default configuration from global.

Handle internal directories and static files.

we can use a recursive function for this task. We create a dictionary for save directory hierarchy and store a global variable we use this for detection used static file. (we have to filter the unused (one important point here -> some js and css files use other static files like .map files or json files for causes like language packs etc.))

this contain my suggestion about issues #3

directory_hierarchy  = {
  "base_dir": {
    "messy_assets" : {
      jquery.js
      style.css
      logo.png   <-- One static file
    }
    "role_1": {
      profile.html  <-- role specific profile file
    }
    profile.html
    index.html
    about.html
    sample.pdf  <-- another static file
    test.js           <-- another asset (static)
  }
}

create _base.html and components directory for organization and reduce recurrent code

Most of the time, files have fixed fields such as header, footer, navbar. We should include these fields by singularizing them. (we need pre-processing (format files) and XML/HTML Parser (like beautifulsoup) for this task)

we must create a measure (one treshold value) for diff rate of files. So we can create _base and other file of components.

in my opinion success measure for this task is organization of a copied website files with httrack.com

this is a difficult task and i have a design in my head but sametime i open for suggestions.

@amartya-dev
Copy link
Collaborator

I like your ideas here, would suggest you start with the detecting and moving part and work your way through the rest slowly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants