Giter VIP home page Giter VIP logo

image-to-html-table's Introduction

Image to HTML table

Turns image into an HTML table.

Basically this, except not as a gist.

Click here for example page (Click here for example source)

Warning: Depending on your browser and device large images might not load very well. Also file sizes are not small since each individual pixel requires HTML code. That's a lot of code for large images.

How to use:

script.py [-h] [-o OUTPUT] [-n NAME] [-t {code,website}] [-b] [--nocollapse] [-v] [-r RESIZE] [-s SIZE] input

Examples:

  • script.py image.png
  • script.py image.png -o ~/output
  • script.py image.png -o ~/output -n image-table.html -t website -b -r 40 -s 200
flag values meaning default example
-h --help (none) shows help
-o --output (string) output location working directory -o ~/output
-n --name (string) output name "output.html" -n myoutput.html
-t code / website output as full website with head and body tags or only output table code website -t code
-b --border turn on table border
--nocollapse deactivates border collapse
-v --overwrite allows script to replace output file
-r --resize (integer) resizes image. the outputs amount of pixels therefore changes. value decides new width / x pixel amount (image width) -r 60
-s --size (integer) changes size of table. value represents width. meant to make small images visible (image size) -s 400

-h output:

usage: script.py [-h] [-o OUTPUT] [-n NAME] [-t {code,website}] [-b] [--nocollapse] [-v] [-r RESIZE] [-s SIZE] input

positional arguments:
  input                 image file

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        specify output directory
  -n NAME, --name NAME  name of output file (default name is 'output.html')
  -t {code,website}, --type {code,website}
                        'website' puts out the file with head and body tags while 'code' only saves the table part in a file
  -b, --border          turns on border
  --nocollapse          disables border collapse
  -v, --overwrite       can replace existing output file
  -r RESIZE, --resize RESIZE
                        resizes image. value is new width in pixel. --> changes amounnt of pixels
  -s SIZE, --size SIZE  width of the resulting table in pixel --> changes size of table

image-to-html-table's People

Contributors

thefel0x avatar

Stargazers

 avatar  avatar

Watchers

 avatar

image-to-html-table's Issues

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.