franciscoBSalgueiro / en-croissant

The Ultimate Chess Toolkit
https://encroissant.org
GNU General Public License v3.0
653 stars 82 forks source link

Combine several DBs into a Single one #226

Open illuminat281090 opened 9 months ago

illuminat281090 commented 9 months ago

Describe the feature

I see it with 2 possible behaviors

  1. Create DB from existing couple of DBs and you are able to select few of already existing DB and get 1 new
  2. You pick one of already existing DB. Pick smth like Merge or Combine and select which DBs you want to add to the existing. As an alternative it van be like Drag&Drop feature when you drag DB to some target
gennaro-tedesco commented 8 months ago

Alternatively, would it be possible to use more than one database as "reference"? Ultimately I presume the problem we want to address is to have multiple database files be browsable as local database copy (otherwise, when importing multiple single pgn files, not all games can appear in the database, as only a single pgn file is selectable as such).

illuminat281090 commented 8 months ago

Alternatively, would it be possible to use more than one database as "reference"? Ultimately I presume the problem we want to address is to have multiple database files be browsable as local database copy

Umm. Not really. Reference database needed mostly for searches, but my goal is to unite different databases into one. For instance, I have 2 accs on lichess, 2 on chess.com, 1 db from my OTB play. I want to combine them in single and only one DB like "My games" Let assume I'm a coach and my students have the same situation, so I can combine their DBs with the same Idea.

But I don't need anything to do with them if I want to stay with a MegDB as a Reference

gennaro-tedesco commented 8 months ago

For instance, I have 2 accs on lichess, 2 on chess.com, 1 db from my OTB play. I want to combine them in single and

In that case you could simply "concatenate" the pgn files into one before uploading it as database (if the problem you are trying to address is in fact creating one file from many), could you not?

illuminat281090 commented 8 months ago

For instance, I have 2 accs on lichess, 2 on chess.com, 1 db from my OTB play. I want to combine them in single and

In that case you could simply "concatenate" the pgn files into one before uploading it as database (if the problem you are trying to address is in fact creating one file from many), could you not?

It's unpractical from the manual handling and historical activity perspectives. It can be changed/expanded in a different ways. You can hold each game in a different pgn file and read them through the Notepad, couldn't you?

gennaro-tedesco commented 8 months ago

You can hold each game in a different pgn file and read them through the Notepad, couldn't you?

No, because concatenating N pgn files takes only one line of bash code, and Notepad isn't a database viewer.

I have tried to suggest a workaround for you to use while this is implemented - feel free to ignore.

illuminat281090 commented 8 months ago

I have tried to suggest a workaround for you to use while this is implemented - feel free to ignore.

I appreciate that but it is not thread for workarounds, it's for tool improvements, I believe. Moreover, I didn't say that is smth urgent I can't live without. That is just useful tip for improvement of the product not only for me but for all users who might be far away from programming and against manual changing of any files. As a user they might expect just do drag&drop and have it done easily without knowing what the concatenating in bash is.