How to automate tasks with Python
As per our logic we need to create the list of links that contains some characteristics and for that we need to go through all directories and all the files in that and make the list of all links.
So we need to follow actions:
-
List all directories(listDir),
-
Scan them through their sub-directories(scanDir),
-
List all the files in them (listFiles),
-
Scan the files for links(scanFiles)
-
Map all the files to find links that matches to our criteria(mapFilesLinks)
-
Make a list of all the links in one file(generateLinks)
-
Update the links by replacing strings with v2(updateLinks)