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
CSV-Handler written in Python3

CSVHandler This code allows you to work intelligently with CSV files. A file in CSV syntax is converted into several lists, which are combined in a to

Max Tischberger 1 Jan 13, 2022
Python file organizer application

Python file organizer application

Pak Maneth 1 Jun 21, 2022
A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir".

the problem What directory should your app use for storing user data? If running on macOS, you should use: ~/Library/Application Support/AppName If

ActiveState Software 948 Dec 31, 2022
Extract the windows major and minor build numbers from an ISO file, and automatically sort the iso files.

WindowsBuildFromISO Extract the windows major and minor build numbers from an ISO file, and automatically sort the iso files. Features Parse multiple

Podalirius 9 Nov 09, 2022
Powerful Python library for atomic file writes.

Powerful Python library for atomic file writes.

Markus Unterwaditzer 313 Oct 19, 2022
Extract an archive file (zip file or tar file) stored on AWS S3

S3 Extract Extract an archive file (zip file or tar file) stored on AWS S3. Details Downloads archive from S3 into memory, then extract and re-upload

Evan 1 Dec 14, 2021
Dragon Age: Origins toolset to extract/build .erf files, patch language-specific .dlg files, and view the contents of files in the ERF or GFF format

DAOTools This is a set of tools for Dragon Age: Origins modding. It can patch the text lines of .dlg files, extract and build an .erf file, and view t

8 Dec 06, 2022
dotsend is a web application which helps you to upload your large files and share file via link

dotsend is a web application which helps you to upload your large files and share file via link

Devocoe 0 Dec 03, 2022
Python interface for reading and appending tar files

Python interface for reading and appending tar files, while keeping a fast index for finding and reading files in the archive. This interface has been

Lawrence Livermore National Laboratory 1 Nov 12, 2021
pydicom - Read, modify and write DICOM files with python code

pydicom is a pure Python package for working with DICOM files. It lets you read, modify and write DICOM data in an easy "pythonic" way.

DICOM in Python 1.5k Jan 04, 2023
A file utility for accessing both local and remote files through a unified interface.

A file utility for accessing both local and remote files through a unified interface.

AI2 19 Nov 16, 2022
Maltego transforms to pivot between PE files based on their VirusTotal codeblocks

VirusTotal Codeblocks Maltego Transforms Introduction These Maltego transforms allow you to pivot between different PE files based on codeblocks they

Ariel Jungheit 18 Feb 03, 2022
Convert CSV files into a SQLite database

csvs-to-sqlite Convert CSV files into a SQLite database. Browse and publish that SQLite database with Datasette. Basic usage: csvs-to-sqlite myfile.cs

Simon Willison 731 Dec 27, 2022
This project is a set of programs that I use to create a README.md file.

🤖 codex-readme 📜 codex-readme What is it? This project is a set of programs that I use to create a README.md file. How does it work? It reads progra

Tom Dörr 224 Jan 07, 2023
A python wrapper for libmagic

python-magic python-magic is a Python interface to the libmagic file type identification library. libmagic identifies file types by checking their hea

Adam Hupp 2.3k Dec 29, 2022
CredSweeper is a tool to detect credentials in any directories or files.

CredSweeper is a tool to detect credentials in any directories or files. CredSweeper could help users to detect unwanted exposure of credentials (such as personal information, token, passwords, api k

Samsung 54 Dec 13, 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
LightCSV - This CSV reader is implemented in just pure Python.

LightCSV Simple light CSV reader This CSV reader is implemented in just pure Python. It allows to specify a separator, a quote char and column titles

Jose Rodriguez 6 Mar 05, 2022
Python function to stream unzip all the files in a ZIP archive: without loading the entire ZIP file or any of its files into memory at once

Python function to stream unzip all the files in a ZIP archive: without loading the entire ZIP file or any of its files into memory at once

Department for International Trade 206 Jan 02, 2023
Swiss army knife for Apple's .tbd file manipulation

Description Inspired by tbdswizzler, this simple python tool for manipulating Apple's .tbd format. Installation python3 -m pip install --user -U pytbd

10 Aug 31, 2022