Do incomplete trades properly
This commit is contained in:
parent
5d65a8b777
commit
f18ce22b47
3 changed files with 6 additions and 9 deletions
|
@ -69,5 +69,5 @@ Python scripts to generate a mobile-friendly static site for tracking tcg cards
|
||||||
- Add level images manually to =build/assets/levels/=
|
- Add level images manually to =build/assets/levels/=
|
||||||
- Add custom CSS to =build/user.css=
|
- Add custom CSS to =build/user.css=
|
||||||
*** Updating and building
|
*** Updating and building
|
||||||
- For each transaction, add a dictionary ={}= to the =log= list like in the example (removing any of ="received"=, ="lost"=, ="crayons"=, ="decks"=, ="coupons"=, ="pend"=, ="unpend"=, ="randomsin"= that aren’t relevant).
|
- For each transaction, add a dictionary ={}= to the =log= list like in the example (removing any of ="received"=, ="lost"=, ="crayons"=, ="decks"=, ="coupons"=, ="pend"=, ="unpend"= that aren’t relevant).
|
||||||
- Run =./build.sh= in this directory to download the relevant card images and then upload everything to the server.
|
- Run =./build.sh= in this directory to download the relevant card images and then upload everything to the server.
|
||||||
|
|
10
colors.py
10
colors.py
|
@ -2343,16 +2343,14 @@ def pendtradesgen():
|
||||||
if variables.newtab:
|
if variables.newtab:
|
||||||
content.write(" target=\"_blank\"")
|
content.write(" target=\"_blank\"")
|
||||||
content.write("><code>" + event["date"].strftime("%Y-%m-%d") + "</code></a></p>\n")
|
content.write("><code>" + event["date"].strftime("%Y-%m-%d") + "</code></a></p>\n")
|
||||||
|
allin = 0
|
||||||
try:
|
try:
|
||||||
allin = len(event["pend"]) + event["randomsin"]
|
allin += len(event["received"])
|
||||||
except:
|
except:
|
||||||
try:
|
pass
|
||||||
allin = len(event["pend"])
|
|
||||||
except:
|
|
||||||
allin = 0
|
|
||||||
try:
|
try:
|
||||||
if len(event["lost"]) > allin:
|
if len(event["lost"]) > allin:
|
||||||
lostlist = event["lost"][-(allin):]
|
lostlist = event["lost"][-(len(event["lost"]) - allin):]
|
||||||
else:
|
else:
|
||||||
lostlist = event["lost"]
|
lostlist = event["lost"]
|
||||||
except:
|
except:
|
||||||
|
|
|
@ -11,7 +11,6 @@ log = [
|
||||||
"decks":["deck1","deck2","deck3","deck4","deck5","deck6","deck7","deck8"], # only if "event":"portfolio"
|
"decks":["deck1","deck2","deck3","deck4","deck5","deck6","deck7","deck8"], # only if "event":"portfolio"
|
||||||
"sketch":-1, # for turning in 1 sketchpad
|
"sketch":-1, # for turning in 1 sketchpad
|
||||||
"pend":["card05"], # to mark a card as pending
|
"pend":["card05"], # to mark a card as pending
|
||||||
"unpend":["card06"], # to remove a card from the pending list if a trade is cancelled
|
"unpend":["card06"] # to remove a card from the pending list if a trade is cancelled
|
||||||
"randomsin":0 # for incomplete trades where you anticipate receiving a specified number of random cards
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue