Browse Source

Fix code not running after simple refactoring

master
djib 2 months ago
parent
commit
49573abecd
  1. 21
      xmltogamelist.py

21
xmltogamelist.py

@ -13,14 +13,13 @@
from bs4 import BeautifulSoup
import glob
def main(argv):
directories = glob.glob(r"~/roms/*")
for directory in directories:
files = glob.glob(r"gamelist.xml", root_dir=directory)
for file in files:
with open(directory+"/"+file,'r') as f:
file = f.read()
soup = BeautifulSoup(file, 'xml')
favorites = soup.find_all('favorite')
for favorite in favorites:
print(directory+favorite.parent.path.text)
directories = glob.glob(r"~/roms/*")
for directory in directories:
files = glob.glob(r"gamelist.xml", root_dir=directory)
for file in files:
with open(directory+"/"+file,'r') as f:
file = f.read()
soup = BeautifulSoup(file, 'xml')
favorites = soup.find_all('favorite')
for favorite in favorites:
print(directory+favorite.parent.path.text)

Loading…
Cancel
Save