likeawizard / polyglot-composer

A library to compose polyglot opening books from PGN game collections
GNU General Public License v3.0
5 stars 0 forks source link

Directory as pgn source #12

Closed likeawizard closed 1 year ago

likeawizard commented 1 year ago

Allow a directory to be passed as pgn source.

  1. Using FileInfo identify if the resource is a directory.
  2. Scan the directory for supported file formats.
  3. files should be of the following format: <filename>.<pgn>[.<bz2|zst>]
    1. This means we can have a mix of files and formats.
    2. Generate a list of valid sources found in the directory
    3. Create the appropriate reader depending on file format.
    4. No recursive directory traversal. Only look at files directly in the directory and ignore child directories