Skip to content

πŸ”£ Python script for generating tables in markdown syntax using .csv files. Language: Python3 (No libraries used)

Notifications You must be signed in to change notification settings

Aayushi-Mittal/Markdown-Table-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“… Markdown-Table-Generator

Convert your csv files into markdown syntax easily.

πŸ“š CSV Files

A CSV (comma-separated values) file is a text file that has a specific format which allows data to be saved in a table structured format. Each line of the file is a data record. Each record consists of one or more fields, separated by commas. CSV is human readable and easy to edit manually. It is simple to implement and parse and smaller in size.

πŸ“š Markdown Syntax

Markdown is a lightweight markup language for creating formatted text using a plain-text editor. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML). Markdown is widely used in blogging, instant messaging, online forums, collaborative software, documentation pages, and readme files.

  • Markdown Syntax for Tables : To add a table, use three or more hyphens (---) to create each column’s header, and use pipes (|) to separate each column. You can optionally add pipes on either end of the table.

πŸŽ‰ Demo

demo

✨ Requirements

  • python 3

πŸ’Ž How to use?

  • Fork the repository.
  • Open Command Prompt/Terminal and copy-paste the following command and type git clone https://github.com/user-name/Markdown-Table-Generator.git to clone the repository on your system. πŸ™Œ
  • Now copy paste your csv file to Markdown-Table-Generator folder. πŸ‘€
  • Run Markdown-Table-Generator.py on your system and enter the required details- file name and whether you want the contents of the file to be centered or not.
  • Now, check table.md and copy the text and paste it to .md file to see the output. πŸ’ƒ
  • Hope, It helped you in some way! πŸ˜ƒ
πŸ“‚input.csv
header1,header2,header3
Value1,Value2,Value3
Value1,Value2,Value3
Value1,Value2,Value3
Value1,Value2,Value3
Value1,Value2,Value3
πŸ“‚table.md
| 	header1	 | 	header2	 | 	header3	 | 
| 	:-----:	 | 	:-----:	 | 	:-----:	 | 
| 	Value1	| 	Value2	| 	Value3	 | 
| 	Value1	| 	Value2	| 	Value3	 | 
| 	Value1	| 	Value2	| 	Value3	 | 
| 	Value1	| 	Value2	| 	Value3	 | 
| 	Value1	| 	Value2	| 	Value3	 | 
Rendered Output:
header1 header2 header3
Value1 Value2 Value3
Value1 Value2 Value3
Value1 Value2 Value3
Value1 Value2 Value3
Value1 Value2 Value3

About

πŸ”£ Python script for generating tables in markdown syntax using .csv files. Language: Python3 (No libraries used)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages