Coder Social home page Coder Social logo

pffy / markdown-table Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 135 KB

Export Markdown tables from Google Sheets with this editor add-on (Cotton Markdown Tables)

License: The Unlicense

HTML 18.88% JavaScript 81.12%
exporter google-apps-script google-drive google-sheets-addon markdown-table

markdown-table's Introduction

markdown-table

Export Markdown tables from Google Sheets with this editor add-on

ICON

icon120

INSTALL

Google Workspace Marketplace

Google Workspace Marketplace badge

Copy spreadsheet document

  • Not available at this time.

G Suite administrator

  • Ask your G Suite administrator to add Cotton Markdown Tables to an add-on whitelist.
  • You can (alternatively) also ask your administrator to simply install Cotton Markdown Tables automatically.
  • Preferred by organizations with Chromebook management and acceptable use policies.
  • Important things to tell your administrator:
    • "Cotton Markdown Tables add-on is free and open-source."
    • "Cotton Markdown Tables add-on only provides stable features with each deployment."
    • "Thank you for keeping my Chromebook safe, secure and fully operational."
    • "Cotton Markdown Tables add-on does not phone home."
  • Important things to show your administrator:

Manual install

NOTE: for developers and power users.

  • Add each file in the dist folder to your Google Apps Script editor project.
    • Create each file. Copy/paste the contents of each file.
    • In the Google Apps Script Editor Project Settings tab, be sure the box that says Show "appsscript.json" manifest file in editor before you copy/paste the contents into that file.
    • You must still grant authorization to yourself to use the special permissions.

Command-line install with clasp

NOTE: for developers and power users.

PERMISSIONS

In order to provide useful features, this add-on requires permissions from you. The following describes the purpose of permissions for this add-on:

Google Drive

  • "See, edit, create, and delete all of your Google Drive files"
    • This permssion allows the add-on to create a Cotton Markdown Tables folder and save Markdown table documents on your Google Drive. Additionally, this feature allows the add-on to jump directly to the saved Markdown file or download the Markdown file to your desktop. No user data sent to pffy-cloud.

Google Sheets

  • "View and manage spreadsheets that this application has been installed in"
    • This permssion allows the add-on to only read the content of the spreadsheet that is currently open. Reading this information helps the add-on determine how to convert betweeen spreadsheet formatting and Markdown syntaxes. No user data sent to pffy-cloud.

Script UI

  • "Display and run third-party web content in prompts and sidebars inside Google applications"
    • This permssion allows the add-on to provide user interaction for better usability. HTML, CSS, JavaScript and frameworks (e.g., jQuery) are implemented in the sidebar to help the add-on copy text to your clipboard, view saved files in your Google Drive, or download saved files to your desktop. No user data sent to pffy-cloud.

OAuth scopes

Remove permissions

Permissions can be removed at any time from your Google Account.

COMPATIBILITY

Hardware Support

  • Apple iPad (using Safari web browser only)
  • Chromebook

Software Support

Markdown Editors Link Supports
Multi-line cells
Supports
Alignments
GitHub https://github.com [X] [X]
GitHub Web Editor and IDE https://github.dev [X] [X]
Atom https://atom.io/ [X] [X]
Bear App (with Marked 2 ??) https://bear.app [X] [X]
Day One Journal https://dayoneapp.com/ [ ] [X]
Drafts https://getdrafts.com/ [X] [X]
Dillinger https://dillinger.io/ [ ] [X]
GitLab https://gitlab.com [X] [X]
Google Colaboratory
Jupyter Notebook
https://colab.research.google.com/ [X] [X]
Mado Chrome Web Store [X] [X]
Minimalist Markdown Editor Chrome Web Store [X] [X]
StackEdit https://stackedit.io/ [X] [X]
Visual Studio Code https://vscode.dev [X] [X]
WordPress https://wordpress.com/ [ ] [X]

FEATURES

Export options

You have six options for exporting data from Google Sheets to Markdown tables:

  1. Export active range: The most basic selection in a spreadsheet.
  2. Export all active ranges: This allows you to multi-select seperate ranges and export all the converted tables into a single Markdown table document.
  3. Export entire sheet: This method includes all the data within a sheet without user selection.
  4. Export all sheets: This method exports each sheet in the spreadsheet and places them into a single document.
  5. Export selected named ranges: Choose which predefined named ranges you want and save all the generated Markdown tables in a single Markdown document.
  6. Export all named ranges: Combine all the named ranges in a spreadsheet into a single Markdown document.

cotton_menu

Deliverables

After you export Markdown tables with Cotton, you have three choices for deliverables.

You can:

  • Copy the Markdown text to clipboard
  • View the Markdown file in Google Drive
  • Download the Markdown file to your desktop

You can watch the deliverable options video on YouTube.

cotton_prompt

YOUTUBE CHANNEL

SCOPES

The following OAuth scopes were used for granting this add-on PERMISSIONS.

Non-sensitive scopes

https://www.googleapis.com/auth/spreadsheets.currentonly

Sensitive scopes

https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/script.container.ui

Restricted scopes

There are no restricted scopes used in this add-on.

COMPLIANCE

This section is for compliance departments within companies, agencies or organizations that must provide documentation of licensing for internal or external audit processes.

The Cotton Markdown Tables spreadsheet editor add-on is free, libre, and open source software. Printing this web page (either as paper for PDF) and retaining a copy for your records is sufficient documentation for your organization’s site license or domain license.

PRIVACY POLICY

This add-on complies with the Google API Services User Data Policy. Additionally, we are committed to exceeding these requirements while delivering wonderful user experiences, without collecting any personally-identifying information about you. These efforts are described with greater detail in our privacy policy:

TERMS OF SERVICE

DISCLAIMERS

Google Sheets, Google Drive, and other Google software or features are trademarks of Google, an Alphabet company. jQuery belongs to the OpenJS Foundation and jQuery contributors. GitHub belongs to Microsoft.

LICENSE

REFERENCE

  • Does the name Gruber mean anything to you, lieutenant? It rings a few bells. Markdown was created by John Gruber.

markdown-table's People

Contributors

pffy avatar

Watchers

 avatar

Forkers

fhyltavz

markdown-table's Issues

[ feature ]: Convert <<YOUTUBE_URL>> into linked preview thumbnail image

Using the canonical YouTube watch URL:

https://www.youtube.com/watch?v=[VIDEO_ID]

Adding double brackets to each side:

<<https://www.youtube.com/watch?v=[VIDEO_ID]>>

generates a linked YouTube thumbnail during Markdown table conversion:

[![TEXT_HERE](YOUTUBE_IMAGE_URL "TEXT_HERE")](YOUTUBE_WATCH_URL)

Some punctuation affects Markdown table renderning on GitHub

When certain characters start a Markdown table sequence, GitHub attempts to render the table sequence as another HTML element. The following table provides results of a pass/fail test that placed items from an enumerated list of punctuation characters at the beginning of a Markdown table sequence.

[feature class]: features that use the Google Sheets FORMULA are locale-dependent

There is a "class of features" for add-ons that depend on spreadsheet formulas (e.g., =HYPERLINK(), =IMAGE(), etc.). The behavior of these formulas depend on spreadsheet locale (language and location).

Before we add these type of features that depend on spreadsheet cell formulas, this Markdown table add-on should be (somewhat) localized.

Localization requires a better understanding for each implemented locale. For example, functions either use a COMMA or SEMICOLON as function parameter delimiters.

Test data available here: pffy/udon#1

Hyperlinked number cells lose links when exported

A cell that contains only a number and has a hyperlink loses the link when exported. For example, I would expect a cell with 3.1415 linked to the Wikipedia page for pi to export as:

|Value|
|--: |
|[3.1415](https://en.wikipedia.org/wiki/Pi)|

but instead it produces

|Value|
|--: |
|3.1415|

In contrast, hyperlinked text exports correctly.

removing deprecated stuff

with the implementation of the classes TextStyle and RichTextValue the following are no longer needed:

Range.getFontWeights()
Range.getFontStyles()
Range.getFontLines()

[ update ]: refresh list of Google monospace (fixed-width) fonts for detection

Current list:

'anonymous pro',
'b612 mono',
'courier',
'courier new',
'courier prime',
'cousine',
'cutive mono',
'dm mono',
'droid sans mono',
'fira code',
'fira mono',
'ibm plex mono',
'inconsolata',
'major mono display',
'monospace',
'nanum gothic coding',
'nova mono',
'overpass mono',
'oxygen mono',
'pt mono',
'roboto mono',
'share tech mono',
'space mono',
'source code pro',
'ubuntu mono',
'vt323'

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.