Giter Site home page Giter Site logo

hotmit / table-markdown-userscript Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 0.0 115 KB

Tampermonkey script to copy html to markdown format.

Home Page: https://greasyfork.org/en/scripts/26890-table-to-markdown-copier

License: MIT License

JavaScript 100.00%
greasemonkey-script markdown html-to-markdown greasemonkey

table-markdown-userscript's Introduction

Table to Markdown Copier

Copy any html table on the web and convert them into markdown format.

Greasyfork Link

[ Greasyfork ]

[ Install ]

Usage

  1. Display The Interface
    • Press Shift, Shift, T (press in sequence, not together as combination)
  2. Click on the "MD" button to copy the markdown content to your clipboard

Features

  • Support both th and td (old vs new table markup)
  • Support colspan

Limitation

  • If the colspan is not exact, this will create improper table size (sometime ppl use large colspan to fill the unknown column size colspan="100" even when there only 7 columns for instance)

Todo

  • Fix the colspan error
  • Add ref link below the table
  • Detect and generate text alignment

Change Logs

  • v1.0.1
    • Fixed where the copy button pickup more than one tables

Example

Regular table

Before turn on the markdown control

Table after markdown table control is activated

After turn on the markdown control

Markdown Content

| Character | Byte order             | Size     | Alignment   |
|-----------|------------------------|----------|-------------|
| @         | native                 | native   | native      |
| =         | native                 | standard | none        |
| <         | little-endian          | standard | none        |
| >         | big-endian             | standard | none        |
| !         | network (= big-endian) | standard | none        |
[Table Source](https://docs.python.org/3/library/struct.html#byte-order-size-and-alignment)

Markdown Render

Character Byte order Size Alignment
@ native native native
= native standard none
< little-endian standard none
> big-endian standard none
! network (= big-endian) standard none
Table Source

table-markdown-userscript's People

Contributors

hotmit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.