FPDB-for-OSX icon indicating copy to clipboard operation
FPDB-for-OSX copied to clipboard

GuiHandViewer: Original room format "Copy to clipboard"

Open astephane opened this issue 8 years ago • 6 comments

Add an "Copy to clipboard (original room format)" feature

astephane avatar Jan 19 '17 18:01 astephane

I think that the current design of having writeHand(), writeGameLine(), writeGameTable() in the Hand class and derive the Hand class for variants severly limits extensibility of the program.

IMHO, there should be a HandWriter class which would be initialized with the given Hand as reference which should be derived by room. But, the different variant supported would add some complexity by using multiple inheritance to factorize the code (crossref between HandWriter derivation for rooms and for variants).

That said, I'm only implementing export for PartyPoker. So, I add some writePartyPoker*() functions in the Hand class to limit the redesign of the code. But, if more work has to be done on this topic (e.g. export for other rooms), I think a re-design should be decided before added more code.

astephane avatar Feb 10 '17 15:02 astephane

Instead of writing site specific code to re-assemble hands histories, we could add an option for saving the entire text of each hand during import. I believe that was the original intent with the table RawHands.

ChazDazzle avatar Feb 10 '17 16:02 ChazDazzle

That would be a very nice feature. Especially if there were an option like "bulk export".

My problem is that I've lost some HH files which are in my FPDB database. I then need to re-create the original file.

astephane avatar Feb 10 '17 18:02 astephane

Currently, Hand.handText exists but, unfortunately, its value is None.

astephane avatar Feb 10 '17 18:02 astephane

Yes, we'd have to add an option to populate that table

ChazDazzle avatar Feb 10 '17 18:02 ChazDazzle

I've finished (99%) PartyPoker export. It's pushed in my GitHub.

if a field is added to the database and the original hand text is stored and retrived via Hand.handText, the copy-to-clipboard feature could be rewritten outputing Hand.handText.

astephane avatar Feb 14 '17 18:02 astephane