Retrieving same variable from all files of a repo

26 views Asked by At

I'm trying to make a database of all the values of two specific variables across an entire codebase.

Getting the raw files and parsing through them would work, but won't work in the future and I plan to run this often to keep the db up to date with all other files that have been created.

I imagine that it could be something along the lines of

for file in all_files
    from file import var1, var2
    db.append({var1, var2})

but I need to access these files from another repo in GitLab and it seems like the only output from GitLab is a raw file. Also, 'file in 'from file' doesn't work, it needs to be the actual file, not a var of the file's path.

Has anyone else come across a situation like this?

Edit: clarification

0

There are 0 answers