Coder Social home page Coder Social logo

genhtml's Introduction

GenHTML v1

A command line utility that allows you to create HTML documents from raw text files.

Why?

Personal reasons! When I build an application I tend to document it in two formats, text and HTML.

What I normally did, was first write the text documentation, then take a copy of that and mark it up with HTML.

But I wanted to do away with that, the markup and formatting. I wanted an application that could take my raw but presentable and readable text documentation and build the HTML directly from that, without any extensive markup - in simple terms I want to write my docs one single time, in a neat and presentable text format then run a single command to get the HTML equivalent.

Laziness, really. I was motivated by laziness, odd but true.

So I created GenHTML, it's fairly simple - it uses indentation to break the input files into pages and sections, and links the pages and sections together.

This is version 1, written in php. To be honest I mostly hacked it together out of necessity, too much time was being wasted writing and marking up documentation.

On the next release I might re-build in c or another language, but for now it's doing everything I need it to - it doesn't output anything too fancy, it's just documentation at the end of the day - but it's configurable and quick and that's the point.

Example

I used GenHTML to build the HTML documentation for GenHTML!!

See the text docs in:

GenHTML/doc/txt/

And the HTML documents in:

GenHHTML/doc/HTML/

GenHTML was used to turn those text files into the HTML files. The text files were processed as they appear, now - no additional formatting or markup was required.

The documentation describes the GenHTML application in some detail, so if you want to try it out then that's a good place to start.

To do

Some of the classes need re-factoring and there is additional functionality I'd like to add - I'm torn between modifying this release or rebuilding in c.

For now, though - I have other projects to work on so GenHTML is something I'll have to come back to in future.

Issue

I noticed that when generating a single-page document that for some reason the horizontal rule and page break isn't being inserted. this worked at one point during production - links to skip between sections were inserted between each page...but not any more! I am a bad boy! S....s'embarassinnnnnnn!

Why didn't I notice this? Most of the testing I did was for compiling multi-page as opposed to single-page documents!

I reckon some changes to the templating system will also be amarked improvement - when I finish bitraq I'll re-do this as I found this utility to be quite useful.

I'll look into this at some point, just wanted to leave a note here lest I forget!

Michael.

genhtml's People

Contributors

michael-dev-glasgow avatar

Watchers

 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.