Oh, I totally missed that one.
2 2011-07-28 04:49:00
Topic: Feature request: Create new deck in folder (6 replies, posted in Site Discussion)
A tiny request. Could you add a button on folder line to create a new deck directly there, instead of creating in at end of the list, and having to drag and drop it to the right folder. It's slightly annoying with too many decks.
Thanks
3 2011-07-27 21:56:20
Topic: Helpful script to download a deck (3 replies, posted in Site Discussion)
Copy&pasting with a browser catches a lot of "[You have 4 cards in this set, but only 3 in your Inventory and Wishlist.]"
and related garbage, so I wrote a script to export a deck from deckbox. Paste URL, get deckbox to stdout.
I hope it will be of some use to others. By the way some function to export deck in simple text-based format would be pretty neat.
#!/usr/bin/env ruby
require "rubygems"
require "hpricot"
def extract_card(tr)
count = (tr/".card_count")
return nil if count.empty?
[count.text.to_i, (tr/".card_name a").text]
end
def extract(url)
body = `curl -s "#{url}"`
doc = Hpricot(body)
main = doc/".main.deck/tr"
side = doc/".sideboard.deck/tr"
main = main.map{|tr| extract_card(tr)}.compact
side = side.map{|tr| extract_card(tr)}.compact
[main, side]
end
url = ARGV[0]
main, side = extract(url)
puts "Mainboard (#{main.map{|cnt,name| cnt}.inject(&:+)}):"
puts main.map{|cnt, name| "#{cnt}x #{name}"}
unless side.empty?
puts "\nSideboard (#{side.map{|cnt,name| cnt}.inject(&:+)}):"
puts side.map{|cnt, name| "#{cnt}x #{name}"}
end
4 2011-07-27 21:44:23
Topic: Feature request: Search for identical or very similar decks (0 replies, posted in Site Discussion)
Identical decks
Hi,
Deckbox.org is easily the most awesome site for viewing decklists, so I copy&paste a lot of decks
from the Internet just to view them. Tournament decks, preconstructed decks, any random decklist
that looks interesting - just a lot of decks.
The problem is - I forget to put sources in their descriptions, and right now it's pretty much impossible
to figure out where these decks come from.
I'm sure other people do the same thing, but hopefully at least some describe their decks' sources better.
So if deckbox could find identical decks (or extremely similar, but that might be harder) and link them,
it would be easier to give proper attribution to decklists. I suspect a lot of people copy&paste the same
preconstructed and tournament winning decks, and at least some tag them properly.
Optionally having a central list of precontructed decks would help.
For example right now I'm left wondering if my deck labelled "Ears" is "Duels of the Planeswalkers: Ears of the Elves"
straight out of the box, or if I customized it somehow already.
And for tournament decks I have no idea which was made by whom, and I feel slightly bad about it.
Searching identical decks should be simple to implement and fast (good old hashing).
Part 2
More general search for similar decks would be even more awesome,
but what's proper similarity metric is not really obvious.
% mainboard card same + % total cards same sort of works,
it would probably overrate the difference between
24 Plains white weenie deck vs 16 Plains 4 Marsh Flats 4 Swamp
white weenie deck splashing for Doom Blade instead of Pacifisms.
(12 cards differ, but it's virtually the same deck),
while considering a wide variety of combo elf decks pretty much the same deck.
% same cards ignoring multiples + % same cards mainboard + % same cards total
might or might not work better.
Anyway, I'm just unnecessarily complicating things.
It will probably turn out to be not such a big deal, there's no unique similarity function,
and one can always click Next a few more times.
This might be harder to implement efficiently (you don't want O(n^2) comparisons
and with most similarity functions are pretty hard to get any better), but that would
be some great new functionality.
Part 3
I see how I could do that for my own use in maybe 1 hour of effort by downloading
all decks (http://deckbox.org/decks/mtg), and using a few lines of Ruby, but this
kind of mass download is usually frowned upon (I sometimes do it anyway, I needed
all cards' scans some time ago so I just took them from another website),
and I'd like others to be able to use this feature as well.
If you need some help with minor Ruby/Perl/Python scripting the website,
I have some free time occasionally, and I'd say I'm quite good at it. ;-)
Just email me.
5 2011-07-27 21:21:29
Topic: Could we make deleting folders safer? (0 replies, posted in Site Discussion)
When I'm deleting a folder I get a message "Deleting this folder will also delete all decks in it. Are you sure you want to do it?"
Could this be changed to moving all decks in the folder one level up?
Unlike with folders on all operating systems there's no way to undo it.
On Unix systems (which didn't traditionally have trash and undo option)
operations "delete empty folder" and "delete folder and all its contents"
are distinct, so you're even less likely to accidentally delete stuff which reorganizing.
Or at least change it to more informative dialog question like "Deleting folder `Affinity' will also delete all 3 decks in it.
Are you sure you want to do it?". This way mistakes would be much less likely.
If I misclick and click delete on wrong folder and see a generic confirmation question, I'll just confirm it,
thinking I'm deleting something else than I really am.
If the question says what I'm deleting, I'm very likely to notice something is wrong, saving my decks.
This confirmation question could be skipped for folder that have no decks inside it - it doesn't really matter.
I haven't made this mistake yet, but with every new deck and folder I have, the chance of deleting
not what I want by a misclick increases a lot. Especially if I tried to reorganize my decks in multiple tabs
and information on what is and what is not empty got out of sync.
In long term, it would be a good idea to send list of decks user sees as being in folder, and verifying it
server-side to make sure no deck got added to the folder in the meantime, to better support multiple tabs,
but if that sounds like way too much work, could you just provide a better message and/or move decks in deleted folder up?
The poll is really just a list of possible solutions. As a programmer I know undo systems online are just too damn hard,
so it's not going to happen. But other 3 should be easy.
6 2011-04-06 14:51:07
Topic: Filtering decks by not being EDH (0 replies, posted in General Discussion)
I cannot find any way of filtering out EDH decks. Could you add this option?
7 2010-12-04 13:54:38
Re: Removing whole inventory; getting list of misimported cards (4 replies, posted in Site Discussion)
API is too weird, so no Greasemonkey scripts ;-)
What I'm doing now is typing new cards as deck - as deck view is unpaginated, it's easy to remove all cards from it (or delete it and start a new one).
8 2010-11-25 18:51:38
Re: Removing whole inventory; getting list of misimported cards (4 replies, posted in Site Discussion)
Will I get b&d for violating ToS or something if I write GreaseMonkey script to do just that :-p ?
9 2010-11-25 06:11:21
Topic: Removing whole inventory; getting list of misimported cards (4 replies, posted in Site Discussion)
I had a list of cards in text file, and I tried to import it, export it back, and see what was missing.
Obviously a few misspellings were there. So I fixed misspellings and tried again:
But is there any way to remove all cards from my inventory, and reimport new list?
(I will have to do that a few more times, I still haven't typed all cards, and I prefer to have
master list as plain text file I update every time I get new cards)
Is there a way to find which card names didn't get imported, without exporting and comparing lists?
I guess I could write short scripts to automate both, but I'm certainly not the only person with such problem.