diff --git a/.gitignore b/.gitignore index d6f5fcda..8e6b83cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ # Project specific +out/ AllSets.pre.json deploy_key.enc diff --git a/.travis.yml b/.travis.yml index 1b7b8a1a..20996455 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,10 +6,10 @@ notifications: email: false webhooks: urls: - - https://webhooks.gitter.im/e/7540dd1e121a1430fb8f + - https://webhooks.gitter.im/e/691b9acffe1def5f9d6b on_success: always # options: [always|never|change] default: always on_failure: always # options: [always|never|change] default: always - on_start: never # options: [always|never|change] default: always + on_start: always # options: [always|never|change] default: always deploy: provider: releases api_key: diff --git a/README.md b/README.md index 5a19c404..e2df0eac 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ -# SpoilerSeason # +# Magic-Spoiler [![Join the chat at https://gitter.im/SpoilerSeason/Lobby](https://badges.gitter.im/SpoilerSeason/Lobby.svg)](https://gitter.im/SpoilerSeason/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) # -SpoilerSeason is a python script to scrape MTGS, Scryfall, and Wizards.com to compile a cockatrice-friendly XML file as well as json files. +Magic-Spoiler is a python script to scrape MTGS, Scryfall, and Wizards.com to compile a cockatrice-friendly XML file as well as json files. + +## Output [![Build Status](https://travis-ci.org/Cockatrice/Magic-Spoiler.svg?branch=master)](https://travis-ci.org/Cockatrice/Magic-Spoiler) ## +Just looking for XML or JSON files? [They're in our files branch!](https://github.com/Cockatrice/Magic-Spoiler/tree/files) ## Errors ## Noticed an error? Check out our [Contributing file](https://github.com/Cockatrice/Magic-Spoiler/blob/master/.github/CONTRIBUTING.md) for information on how to help! diff --git a/spoilers.py b/spoilers.py index ebf88a28..527ec512 100644 --- a/spoilers.py +++ b/spoilers.py @@ -840,6 +840,9 @@ def write_xml(mtgjson, setname, setlongname, setreleasedate, split_cards=[]): cardsxml.write("\n") + if os.path.isfile('out/' + setname + '.xml'): + shutil.copyfile('out/' + setname + '.xml','out/spoiler.xml') + #failing pretty xml code #with open('out/' + setname + '.xml') as data_file: # tree = etree.parse(data_file)