Add spoiler.xml file, gitter settings, ignore out/ folder

This commit is contained in:
tritoch 2017-05-31 15:40:20 -05:00
parent fb5f7f585c
commit c6e3293c3c
4 changed files with 11 additions and 4 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
# Project specific
out/
AllSets.pre.json
deploy_key.enc

View File

@ -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:

View File

@ -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!

View File

@ -840,6 +840,9 @@ def write_xml(mtgjson, setname, setlongname, setreleasedate, split_cards=[]):
cardsxml.write("</cards>\n</cockatrice_carddatabase>")
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)