Skip to content

Instantly share code, notes, and snippets.

@j4rv
Last active February 9, 2022 00:08
Show Gist options
  • Save j4rv/41a91d6bd80cc15d2ca5694852daa8de to your computer and use it in GitHub Desktop.
Save j4rv/41a91d6bd80cc15d2ca5694852daa8de to your computer and use it in GitHub Desktop.
import os
from pathlib import Path
textToSearch = "LinkJiraIssue"
# Busca los archivos llamados atlassian-plugin.xml desde el directorio activo (incluyendo directorios hijos)
xmls = list(Path(".").rglob("atlassian-plugin.xml"))
for r in xmls:
f = open(r, "r")
txt = f.read()
if textToSearch in txt:
print(r) # Imprime las rutas de los archivos que nos interesan
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment