🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

homework_report

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

homework_report

0.0.2
Rubygems
Version published
Maintainers
1
Created
Source

HomeworkReport

HomeworkReport is an utility program, which generates HTML files with given template files.

Installation

You are a user

Install it yourself as:

$ gem install homework_report

Note that extra libraries are required if you want to use Haml, Slim, or Markdown instead of ERB

You are a developer

Add this line to your application's Gemfile:

gem 'homework_report'

And then execute:

$ bundle

Usage

Supported Template Formats

FORMAT       FILE EXTENSIONS             REQUIRED LIBRARIES
------------ --------------------------- ------------------------
ERB          .erb, .rhtml                none
Haml         .haml                       haml
Slim         .slim                       slim
Markdown     .markdown, .mkd, .md        redcarpet, maruku, or kramdown

Tool

It generates HTML text to the standard output or file

$ homework_report [options] FILE

You can execute $ homework_report --help to see the available options

Simple Example

homework.slim

- @topic = "Uncharted"
- @name = "Nathan Drake"
doctype html
html
  head
    title= @topic
  body
    p
      | Name: #{@name}

Execute the command to generate HTML

$ homework_report -o homework.html homework.slim

More Complex Example

homework.slim

- @course = "Digital Image Synthesis"
- @topic = "Assignment #1 - Height Field"
- @name = "David Lin"
- @submission_date = Date.today
= render 'template.slim'

template.slim

doctype html
html
  head
    title #{@course} - #{@topic}
  body
    div
      h1= @topic
      h3 Name: #{@name}
      h3 Submission Date: #{@submission_date}
    div
      = render "description.md"
    div
      = render "final_images.slim"

description.md

## Description of implementation approach and comments
blahblahblah

final_images.slim

h2 Final Images Rendered with my implementation of Heightfield2
p
  img src="http://www.csie.ntu.edu.tw/~cyy/courses/rendering/12fall/assignments/proj1/smooth.jpg"

Finally, execute the command to generate homework.html

$ homework_report -o homework.html homework.slim

Lib

TODO: I'm working on it

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

FAQs

Package last updated on 19 Oct 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts