#! /usr/bin/env python3

import my_search

if __name__ == "__main__":
    search_jenkins_folder = "/home/jonnybravo/.jenkins/data/jobs"
    search_string = """<command>./test_play.yml</command>"""
    for i_full in my_search.read_all_sub_Folder(target_folder=search_jenkins_folder, search_string="config.xml"):
        #print(i["FullPath"])
        with open(i_full["FullPath"], 'r') as file:
            data = file.read()
            index = data.find(search_string)
            if not index == -1: 
                print("Ist in file vorhanden", file.name, sep=" ")

            #data = data.replace('<daysToKeep>-1</daysToKeep>', '')
        #with open(i["FullPath"], 'w') as file: 
        #    file.write(data)
