This repository contains a script gen.py
that generates a generic folder structure when provided with a list of subjects and labs.
To use the script, follow the instructions below:
- Ensure you have Python installed on your system.
- Open a terminal or command prompt.
- Navigate to the directory where
gen.py
is located. - Run the script with the following command:
python gen.py --course <your_course> --subjects <subject1> <subject2> ... --labs <lab1> <lab2> ...
To generate a folder structure for subjects "Math" and "Science" and labs "PhysicsLab" and "ChemistryLab", use the following command:
python gen.py --course NEP2020_2023_BCA --addsem 3rdsem --subjects Sub1 Sub2 --labs Sub1 Sub3
The script will create the following folder structure for each subject and lab:
<subject>
├── assignments
│ └── index.md
├── solved
│ └── index.md
├── notes.md
│
└── index.md
<lab>
├── lab
│ └── index.md
├── assignments
│ └── index.md
├── solved
│ └── index.md
├── notes.md
│
└── index.md
The script places placeholders in the index.md
files to maintain consistency and ensure the frontmatter is understandable.
The frontmatter in the generated files is as follows:
index.md
:
---
order: 0
title: <Subject> - Syllabus
---
# <Subject>
assignments/index.md
:
---
order: 0
title: <Subject> - Assignments
---
# Assignments - <Subject>
solved/index.md
:
---
order: 0
title: <Subject> - Solved Questions
---
# Solved Questions - <Subject>
notes/index.md
:
---
order: 0
title: <Subject> - Notes
---
# Notes - <Subject>
lab/index.md
(for labs):
---
order: 0
title: <Lab> - Lab Records
---
# Lab Records - <Lab>