{"id":19908753,"url":"https://github.com/tigerpixel/pgnparser","last_synced_at":"2025-05-03T02:31:21.427Z","repository":{"id":62449907,"uuid":"91019395","full_name":"tigerpixel/PGNParser","owner":"tigerpixel","description":"A Parser for Portable Game Notation including Portable Draughts Notation","archived":false,"fork":false,"pushed_at":"2019-10-01T20:43:17.000Z","size":64,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T12:22:47.621Z","etag":null,"topics":["carthage","chess","chess-position","cocoapods","draughts","draughts-moves","ios","macos","parsing","swift","tvos","watchos"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tigerpixel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-11T20:12:47.000Z","updated_at":"2024-05-31T17:10:46.000Z","dependencies_parsed_at":"2022-11-01T23:18:07.356Z","dependency_job_id":null,"html_url":"https://github.com/tigerpixel/PGNParser","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigerpixel%2FPGNParser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigerpixel%2FPGNParser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigerpixel%2FPGNParser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tigerpixel%2FPGNParser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tigerpixel","download_url":"https://codeload.github.com/tigerpixel/PGNParser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252133702,"owners_count":21699583,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["carthage","chess","chess-position","cocoapods","draughts","draughts-moves","ios","macos","parsing","swift","tvos","watchos"],"created_at":"2024-11-12T21:13:20.289Z","updated_at":"2025-05-03T02:31:21.197Z","avatar_url":"https://github.com/tigerpixel.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PGNParser\n\n[![Build Status](https://travis-ci.org/tigerpixel/PGNParser.svg?branch=master)](https://travis-ci.org/tigerpixel/PGNParser)\n[![Version](https://img.shields.io/cocoapods/v/PGNParser.svg?style=flat)](http://cocoapods.org/pods/PGNParser)\n[![Platform](https://img.shields.io/cocoapods/p/PGNParser.svg?style=flat)](http://cocoapods.org/pods/PGNParser)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![License](https://img.shields.io/cocoapods/l/PGNParser.svg?style=flat)](http://cocoapods.org/pods/PGNParser)\n\nPGNParser is designed to parse [Portable Game Notation](https://en.wikipedia.org/wiki/Portable_Game_Notation) files describing Chess and Draughts moves into simple Swift structures.\n\nCurrently, only the draughts game strings have been implemented. Pull requests are welcome for further features.\n\nParsing can be enacted by simply making a single 'parse' call on the draughts move struct.\n\nA result type will be returned which will contain the resulting move array or details of any failure.\n\nA failure contains an enumeration describing the reason for the failure and usually the token which failed.\n\nThe following PGN string will parse to a DraughtsMove structure containing a black and a white move.\n\n```swift\nlet sinlgeMoveTwoPlayers = \"1. 9-14 23-18\"\n\nswitch DraughtsMove.parse(fromPortableGameNotation: sinlgeMoveTwoPlayers) {\ncase .success(let moves, let tail):\n// moves - a list of the above moves and any comments parsed into DraughtsMove structs.\ncase .failure(let reason):\n\n\n}\n```\n\n## Requirements\n\nThere are 2 external requirements for this project. Both by Tigerpixel, the same authors.\n\n[Currier](https://github.com/tigerpixel/Currier.git) - A helper for currying functions and initializers which is used with the project.\n\n[ParserCombinator](https://github.com/tigerpixel/ParserCombinator.git) - A General parser combinator which is extended to build PGNParser.\n\n- iOS 8.0+ / macOS 10.9+ / tvOS 9.0+ / watchOS 2.0+\n- Xcode 11+\n- Swift 5.1+\n\n## Installation\n\n### Swift Package Manager\n\nThe [Swift Package Manager](https://swift.org/package-manager) is the official tool for managing the distribution of Swift code. It is currently available for all Apple platforms. It can also be used with Linux but this project does not fully support Linux at this point in time.\n\nIf you use it to manage your dependencies, simply add PGNParser to the dependencies value of your Package.swift file.\n\n```swift\ndependencies: [\n.package(url: \"https://github.com/Tigerpixel/PGNParser.git\", from: \"0.4.0\"),\n]\n```\n\nThe Swift Package Manager can resolve sub-dependencies.\n\n### Cocoapods\n\nPGNParser is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile:\n\n```ruby\npod \"PGNParser\"\n```\n\n### Carthage\n\nIf you use [Carthage](https://github.com/Carthage/Carthage) to manage your dependencies, simply add the following lines to your Cartfile:\n\n```ogdl\ngithub \"tigerpixel/PGNParser\"\ngithub \"tigerpixel/Currier\"\ngithub \"tigerpixel/ParserCombinator\"\n```\n\nIf you use Carthage to build your dependencies, make sure you have added `PGNParser.framework`, `Currier.framework` and `ParserCombinator.framework`  to the \"_Linked Frameworks and Libraries_\" section of your target, and have included them in your Carthage framework copying build phase.\n\n### Git Submodule\n\n1. Add the PGNParser repository as a [submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules) of your application’s repository.\n1. Run `git submodule update --init --recursive` from within the PGNParser folder.\n1. Drag and drop `PGNParser.xcodeproj` into your application’s Xcode project or workspace.\n1. On the “General” tab of your application target’s settings, add `PGNParser.framework`. to the “Embedded Binaries” section.\n1. If your application target does not contain Swift code at all, you should also set the `EMBEDDED_CONTENT_CONTAINS_SWIFT` build setting to “Yes”.\n\n## MIT License\n\nPGNParser is available under the MIT license. Details can be found within the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftigerpixel%2Fpgnparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftigerpixel%2Fpgnparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftigerpixel%2Fpgnparser/lists"}