Git Product home page Git Product logo

htmloutliner's Introduction

HTMLOutliner

I'm busy producing HTML mockups/templates at the moment, and finding that it's a real pain in the ass to have meaningful discussions about a page's structure when it's full of dummy text. The "content" simply overwhelms the markup, and moreover makes it simply impossible to print (if Norm's taught me anything, he certainly beat it into my head that a printed copy is essential for review).

HTMLOutliner is a toy Python project, really just a slight tweaking of work that BeautifulSoup is already doing brilliantly. It pretty-prints an HTML document after removing all the text nodes that would otherwise distract from the pure flow of the markup. Attributes may, or may not, be displayed, depending on your needs.

In short, it turns:

<div class="module">
    <div class="hd">
        <h3>This is a module title</h3>
        <ul>
            <li>I like lists!</li>
            <li>Totally!</li>
        </ul>
    </div>
    <div class="bd">
        <p>This is a paragraph of text!</p>
        <p>Look at how much text it contains!</p>
    </div>
</div>

into:

<div class="module">
    <div class="hd">
        <h3></h3>
        <ul>
            <li></li>
            <li></li>
        </ul>
    </div>
    <div class="bd">
        <p></p>
        <p></p>
    </div>
</div>

Enjoy.

TODO

  • Determine some way to reasonably label sections of the document. Comment blocks seem like a reasonable way to make this happen.

  • Look for ways to bind placeholder text to an element. It would be nice if I could end up with something like <h1>Page Title</h1> at the end of the day. That dovetails with the labeling TODO nicely.

htmloutliner's People

Contributors

mikewest avatar

Stargazers

Mark Norman Francis avatar  avatar

Watchers

 avatar James Cloos avatar  avatar  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.