Rotten-Scripts icon indicating copy to clipboard operation
Rotten-Scripts copied to clipboard

Python Script to find all Environment Variables in a Codebase

Open HarshCasper opened this issue 6 years ago • 14 comments

Description

Create a Python Script to find all Environment Variables in a Codebase. It is usual to entirely forget about documenting the Environment Variables in your Project. Your Script should parse the entire codebase and find all the necessary environment variables and create a env.example file as the output.

Language

  • [X] Python

Type of issue

Please delete options that are not relevant.

  • [X] Feature

HarshCasper avatar Oct 03 '20 06:10 HarshCasper

I would like to work on this issue but i don't know much about this, it will be so helpful if you could guide me through this.

narayan2111 avatar Oct 03 '20 08:10 narayan2111

Hi! I'll be trying this out and making a pull request. I am participating in the Hacktoberfest 2020. They have issued an update for maintainers you can see it here https://hacktoberfest.digitalocean.com/hacktoberfest-update Please help with this update. Have a good day!

Ishita-Mehta avatar Oct 03 '20 10:10 Ishita-Mehta

Hi, I had a question regarding this issue. Do we take a python code file as input then parse it to find environment variables which have been set by the code? @HarshCasper

Ishita-Mehta avatar Oct 03 '20 10:10 Ishita-Mehta

@Ishita-Mehta This Issue is open only for SLoP Participants. If you are a SLoP Participant I would love to assign it to you.

@narayan2111 You can ping me on Gitter Channel to have further clarity about the Issue.

HarshCasper avatar Oct 04 '20 06:10 HarshCasper

@narayan2111 You can ping me on Gitter Channel to have further clarity about the Issue.

I would like to work on this issue, kindly assign this issue to me @HarshCasper

narayan2111 avatar Oct 04 '20 08:10 narayan2111

@narayan2111, this issue hasn't had any activity in 7 days. It will become unassigned in 14 days to make room for someone else to contribute.

github-actions[bot] avatar Nov 23 '20 10:11 github-actions[bot]

I would like to work on this issue

ag200130 avatar Dec 08 '20 08:12 ag200130

Assigned @agrima84

HarshCasper avatar Dec 08 '20 10:12 HarshCasper

May I work on this issue?

SmritiAgrawal04 avatar Mar 24 '21 14:03 SmritiAgrawal04

Hi,

Please review the idea I have for this. I'm planning to go through each python script in the codebase and check on each code line through regular expressions if it gets or sets any environment variable. If it does so, I'll be using a set/dictionary to save that variable. Finally having read all the scripts I'll write this set/dict to output file.

Let me know if you find this correct or suggest changes if you do not.

SmritiAgrawal04 avatar Mar 28 '21 07:03 SmritiAgrawal04

@HarshCasper What do you think?

vybhav72954 avatar Mar 28 '21 08:03 vybhav72954

Hi,

Please review the idea I have for this. I'm planning to go through each python script in the codebase and check on each code line through regular expressions if it gets or sets any environment variable. If it does so, I'll be using a set/dictionary to save that variable. Finally having read all the scripts I'll write this set/dict to output file.

Let me know if you find this correct or suggest changes if you do not.

This looks perfect! Please go ahead.

HarshCasper avatar Mar 30 '21 12:03 HarshCasper

@SmritiAgrawal04, this issue hasn't had any activity in 7 days. It will become unassigned in 14 days to make room for someone else to contribute.

github-actions[bot] avatar Apr 20 '21 13:04 github-actions[bot]

Hi @vybhav72954 and @HarshCasper Please check the added script.

SmritiAgrawal04 avatar Apr 26 '21 11:04 SmritiAgrawal04