Two scripts help you to convert csv file to md file by template

Overview

csv2md_by_template (csv2mdt.py)

  • this script helps you to convert csv file to multiple md files by template, the filename of each comes from first column in your csv file.
  • this idea came from dicussion with @candideu !

csv2md_blocks_by_template (csv2mdbt.py)

  • this script helps you to convert csv file to single md file with several blocks by template. the first-level block of each comes from first column in your csv file. the name of output file is the same as input csv file.

Preparation

  • python3
  • pandas
  • template.md
  • filename.csv

Caution

  • the variables in template.md should be like $title, $name or $title_name (no blank in variables, please replace blank with '_' by yourself)
  • the variables in template.md should match the first row (colume name) in data.csv
  • but you don't need to replace the blank in column name in csv file by yourself. script will do that. So you can keep column name in csv file as "title name"

Quick start

  • csv2md_by_template (csv2mdt.py)

    • download csv2mdt.py and put it in the same folder as template.md and filename.csv
    • use shell and 'cd' to that folder
    • use follow command

      python csv2mdt.py filename.csv

  • csv2md_blocks_by_template (csv2mdbt.py)

    • download csv2mdbt.py and put it in the same folder as template.md and filename.csv
    • use shell and 'cd' to that folder
    • use follow command

      python csv2mdbt.py filename.csv

  • the output file(s) will be automatically generated in the same folders

  • you can use template.md and data.csv in this repo to play around!

Video

  • csv2md_by_template (csv2mdt.py)
153729075-4263ff1b-68c6-4309-bcfc-1075c82d330c.mp4
  • csv2md_blocks_by_template (csv2mdbt.py)
2022-02-13.14.12.22.mp4

Advanced

  • you can edit the script somehow, such as the path to your template.md and the path to your csv file
  • you can also put the script in $PATH, to make it easier to call
This python project contains a class FileProcessor which allows one to grab a file and get some meta data and header information from it

This python project contains a class FileProcessor which allows one to grab a file and get some meta data and header information from it. In the current state, it outputs a PrettyTable to txt file as

Joshua Wren 1 Nov 09, 2021
Media file renamer and organizion tool

mnamer mnamer (media renamer) is an intelligent and highly configurable media organization utility. It parses media filenames for metadata, searches t

Jessy Williams 533 Dec 29, 2022
Pti-file-format - Reverse engineering the Polyend Tracker instrument file format

pti-file-format Reverse engineering the Polyend Tracker instrument file format.

Jaap Roes 14 Dec 30, 2022
A simple bulk file renamer, written in python.

Python File Editor A simple bulk file renamer, written in python. There are two functions, the bulk rename and the bulk file extention change. Bulk Fi

Sam Bloomfield 2 Dec 22, 2021
Better directory iterator and faster os.walk(), now in the Python 3.5 stdlib

scandir, a better directory iterator and faster os.walk() scandir() is a directory iteration function like os.listdir(), except that instead of return

Ben Hoyt 506 Dec 29, 2022
A platform independent file lock for Python

py-filelock This package contains a single module, which implements a platform independent file lock in Python, which provides a simple way of inter-p

Benedikt Schmitt 497 Jan 05, 2023
Convert All TXT Files To One File.

AllToOne Convert All TXT Files To One File. Hi 👋 , I'm Alireza A Python Developer Boy 🔭 I’m currently working on my C# projects 🌱 I’m currently Lea

4 Jun 07, 2022
Copy only text-like files from the folder

copy-only-text-like-files-from-folder-python copy only text-like files from the folder This project is for those who want to copy only source code or

1 May 17, 2022
A simple tool to find and replace all the matches of a regular expression in file(s).

FindREp A simple tool to find and replace all the matches of a regular expression in file(s). You can either select the file(s) directly or select a f

Biraj 5 Oct 18, 2022
Provides a convenient way to append numpy arrays to a file.

Provides a convenient way to append numpy arrays to a file. The NpendWriter and NpendReader classes are used to write and read numpy arrays respective

3 May 14, 2022
MHS2 Save file editing tools. Transfers save files between players, switch and pc version, encrypts and decrypts.

SaveTools MHS2 Save file editing tools. Transfers save files between players, switch and pc version, encrypts and decrypts. Credits Written by Asteris

31 Nov 17, 2022
Python code snippets for extracting PDB codes from .fasta files

Python_snippets_for_bioinformatics Python code snippets for extracting PDB codes from .fasta files If you have a single .fasta file for all protein se

Sofi-Mukhtar 3 Feb 09, 2022
Python library and shell utilities to monitor filesystem events.

Watchdog Python API and shell utilities to monitor file system events. Works on 3.6+. If you want to use Python 2.6, you should stick with watchdog

Yesudeep Mangalapilly 5.6k Jan 04, 2023
Powerful Python library for atomic file writes.

Powerful Python library for atomic file writes.

Markus Unterwaditzer 313 Oct 19, 2022
This is a junk file creator tool which creates junk files in Internal Storage

This is a junk file creator tool which creates junk files in Internal Storage

KiLL3R_xRO 3 Jun 20, 2021
Small-File-Explorer - I coded a small file explorer with several options

Petit explorateur de fichier / Small file explorer Pour la première option (création de répertoire) / For the first option (creation of a directory) e

Xerox 1 Jan 03, 2022
Python file organizer application

Python file organizer application

Pak Maneth 1 Jun 21, 2022
csv2ir is a script to convert ir .csv files to .ir files for the flipper.

csv2ir csv2ir is a script to convert ir .csv files to .ir files for the flipper. For a repo of .ir files, please see https://github.com/logickworkshop

Alex 38 Dec 31, 2022
A bot discord that can create directories, file, rename, move, navigate throw directories etc....

File Manager Discord What is the purpose of this program ? This program is made for a Discord bot. Its purpose is to organize the messages sent in a c

1 Feb 02, 2022
Automatically generates a TypeQL script for doing entity and relationship insertions from a .csv file, so you don't have to mess with writing TypeQL.

Automatically generates a TypeQL script for doing entity and relationship insertions from a .csv file, so you don't have to mess with writing TypeQL.

3 Feb 09, 2022