Skip to content
Mihail Kirilov edited this page Jun 21, 2014 · 5 revisions

HexBin

Creates a number Bitwise tests with 12 questions and two levels of hardness. Exports the tests and the answers to the tests in both PDF and HTML. The tests are with English headings, but you could change it inside the code.

#Uses I use PDFKit to render the PDFs which on its own uses wkhtmltopdf to rendet HTML to PDF using Webkit.

Install

Ruby

If you don't have Ruby installed on your computer you can find it here

PDFKit

`gem install pdfkit`

wkhtmltopdf

HexBin

  • Clone the repository: git clone https://github.com/hidroo/HexBin.git
  • Or download link: here

Usage

  • You go to the folder cd HexBin/Project
  • There you run ruby HexBin.rb hardness n dir
  • The hardess can be "easy" or "hard".
  • The n is the number of tests you want to generate.
  • The dir is the directory name you want your test to be generated in the "Project" folder. If you don't enter a directory name a random one will be generated for you. If you enter an existing directory name the directory will be deleted and everything inside it.

Configuration

It is tested on Mac and Linux. No Windows support for now.

TODO

Making it work faster by making a smarter algorithm that generates the tests. Windows support.

Notes when using

  • It always tries to remove the folder you give it, so don't worry about texts like:
    • rm: KWpmDLMzgWxWeINz: No such file or directory
  • The PDFKit prints some stuff in the console as well:
    • Loading pages (1/5)
    • Resolving links (2/5)
    • Counting pages (3/5)
    • Printing pages (5/5)
    • Done

Copyright

Copyright (c) 2014 Mihail 'hidr0' Kirilov & Elsys-bg.org.

Clone this wiki locally