Giter VIP home page Giter VIP logo

staticsitehaskell's Introduction

Generate HTML/CSS from specific syntax file

  • Last Updated: Tue Oct 11 16:01:47 PDT 2016

What does the Haskell script do?

  • Parse specific syntax file and generate HTML from a given CSS file

  • Demo

How to use it

  • Assume your have file called myfile.txt as following

    [My Linux Commands]
    :grep --color -Hnris string *.java // Search string in all java files
    :history                // Show Shell history
    `[
        String str = "my string";
        int len = str.length();
    `]
  • You want to style it or put some nice colors on it

  • Install Haskell in your machine(I use Mac)

  • Clone the repo.

  • Goto your cloned directory and run following command

runhaskell geneHtml.hs mytext.txt myhtml.html
  • myhtml.html will be generated and you can point your favour browser to the file
Note: The haskell script uses mycss.css file to style mytext.txt file

The Haskell script supports following text file syntaxes

Title syntax
[ my title ]
Comment syntax
// This is my comments
Source code syntax
`[
    myMax::[Int]->Int
    myMax [] = 0
    myMax [x] = x 
    myMax (x:xs) = if x > myMax xs then x else myMax xs  
`]
Command syntax
:grep --color -Hnris string *.java
Image syntax
{{ src=path/image.png w=50% h=50% }}

staticsitehaskell's People

Contributors

bsdshell avatar

Watchers

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.