Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/realkarthiknair/code-to-md
Create a single md file from a directory full of code files
https://github.com/realkarthiknair/code-to-md
automation generator github markdown markdown-generator md python python-3 python3
Last synced: 2 months ago
JSON representation
Create a single md file from a directory full of code files
- Host: GitHub
- URL: https://github.com/realkarthiknair/code-to-md
- Owner: realKarthikNair
- Created: 2022-02-02T17:44:30.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-26T12:57:35.000Z (about 1 year ago)
- Last Synced: 2024-10-11T13:39:28.922Z (3 months ago)
- Topics: automation, generator, github, markdown, markdown-generator, md, python, python-3, python3
- Language: Python
- Homepage:
- Size: 74.2 KB
- Stars: 14
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: readme.md
- Funding: .github/funding.yml
Awesome Lists containing this project
README
# **Code-to-md**
*inspired from [code_to_md](https://github.com/Dinex-dev/code_to_md) by @Dinex-dev*
## **Generate a markdown file from a folder of programs, each program numbered with the first comment as title and the rest as code block**
### **1. Why?**
#### To generate a file like [this](https://github.com/realKarthikNair/Learning-C-Lang/blob/main/Learning_C/F.%20Loops/1.%20For%20loops/programs0/readme.md) from a directory filled with programs.
### **2. How to set-up**
Method 1: Clone the repo
git clone https://github.com/realKarthikNair/Code-to-md
cd Code-to-mdMethod 2: [Download zip](https://github.com/realKarthikNair/Code-to-md/archive/refs/heads/main.zip) and extract it
### **3. Usage**
./code-to-md.py -idir -e -odir -o
for example,
./code-to-md.py -idir /home/karthik/Temp/python/new/programs/ -e .py -odir /home/karthik/Temp/python/ -o programs.mdTo choose \ as code dir and \ as markdown location without any further prompts
./code-to-md.py -d
> The script also has a CLI-based interface, so you can even skip entering path as shell arguments
> The default code directory is \/programs/ and the default output directory is \/
> I personally have this script placed at /usr/local/bin so that I can use it from anywhere
> Okay so that's it: Enjoy!
### **4. How to reach me?**
### Incase you want to buy me a coffee...