Skip to content

Commit

Permalink
chore: update urls
Browse files Browse the repository at this point in the history
  • Loading branch information
purarue committed Oct 24, 2024
1 parent 22194e4 commit c8d6d54
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Sean Breckenridge
Copyright (c) 2021 purarue

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ The `inspect` command just accepts the file as the first argument, like `chess_e
The only required argument is your username, the API serves public data and has no serial rate limit

```
$ chess_export chessdotcom export seanbreckenridge >data.json
Requesting https://api.chess.com/pub/player/seanbreckenridge/games/archives
Requesting https://api.chess.com/pub/player/seanbreckenridge/games/2021/01
$ chess_export chessdotcom export purarue >data.json
Requesting https://api.chess.com/pub/player/purarue/games/archives
Requesting https://api.chess.com/pub/player/purarue/games/2021/01
...
```

Expand All @@ -41,19 +41,19 @@ To do that, you can pass the `--user-agent-email` flag or set the `CHESSDOTCOM_U
Requires your username and a [token](https://lichess.org/account/oauth/token/create?description=lichess+export) (this requires no extra scopes). The token can be provided with the `--token` flag or by setting the `LICHESS_TOKEN` environment variable.

```
$ chess_export lichess export seanbreckenridge > data.json
Requesting https://lichess.org/api/games/user/seanbreckenridge?pgnInJson=true
$ chess_export lichess export purarue > data.json
Requesting https://lichess.org/api/games/user/purarue?pgnInJson=true
```

### Example

The games are described in [`PGN`](https://en.wikipedia.org/wiki/Portable_Game_Notation) (which can be parsed using the [`chess`](https://python-chess.readthedocs.io/en/latest/pgn.html) package)

```
$ chess_export chessdotcom export seanbreckenridge >data.json
Requesting https://api.chess.com/pub/player/seanbreckenridge/games/archives
Requesting https://api.chess.com/pub/player/seanbreckenridge/games/2021/01
Requesting https://api.chess.com/pub/player/seanbreckenridge/games/2021/02
$ chess_export chessdotcom export purarue >data.json
Requesting https://api.chess.com/pub/player/purarue/games/archives
Requesting https://api.chess.com/pub/player/purarue/games/2021/01
Requesting https://api.chess.com/pub/player/purarue/games/2021/02
$ chess_export chessdotcom inspect data.json
In [1]: import io, chess.pgn
Expand All @@ -79,7 +79,7 @@ The information returned by `chess.com`/`lichess` are slightly different, see th
### Tests

```bash
git clone 'https://github.com/seanbreckenridge/chess_export'
git clone 'https://github.com/purarue/chess_export'
cd ./chess_export
pip install '.[testing]'
mypy ./chess_export
Expand Down
2 changes: 1 addition & 1 deletion chess_export/chessdotcom/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def _user_agent(user_agent_email: Optional[str] = None) -> Dict[str, str]:
user_agent_email = os.environ["CHESSDOTCOM_USER_AGENT_EMAIL"]
if user_agent_email:
return {
"User-Agent": f"https://github.com/seanbreckenridge/chess_export {user_agent_email}"
"User-Agent": f"https://github.com/purarue/chess_export {user_agent_email}"
}
return {}

Expand Down
5 changes: 2 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ version = 0.1.1
description = Export your chess.com/lichess.org games
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/seanbreckenridge/chess_export
author = Sean Breckenridge
author_email = "[email protected]"
url = https://github.com/purarue/chess_export
author = purarue
license = MIT
license_files = LICENSE
classifiers =
Expand Down

0 comments on commit c8d6d54

Please sign in to comment.