-
Notifications
You must be signed in to change notification settings - Fork 242
Add cards from Genetic Apex and some promo cards #554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Related to #553 |
I've added all missing fields now. |
{ | ||
"id": "tcgp1", | ||
"name": "Genetic Apex", | ||
"series": "TCG Pocket", | ||
"printedTotal": 226, | ||
"total": 286, | ||
"ptcgoCode": "A1" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey man, just asking, is there a reason why you didn't include the releaseDate
and images
properties, that are present in other sets, for the Pocket sets? I'm planning on doing a small personal project related to TCG Pocket using this API, so I'm just wondering if these fields will be available.
Thanks @Joaos98 for pointing that out. Fields are now up to date. |
Thanks for this - going to be reviewing and potentially getting this added in the next week or so. |
@Xernisfy, would you happen to have the newest expansion as well - Mythical Island? |
Sorry for answering so late. |
- add regulation marks - correct rarities (Bulbapedia made them more detailed) - added new evolutions for older sets - remove evolutions for ex (namely Pikachu ex) - fix missing attacks (namely Meowth's Pay Day) (still incorrectly on Bulbapedia) - slot sets in chronologically by release date (global)
- add regulation marks - correct rarities (Bulbapedia made them more detailed) - added new evolutions for older sets - remove evolutions for ex (namely Pikachu ex) - fix missing attacks (namely Meowth's Pay Day) (still incorrectly on Bulbapedia) - slot sets in chronologically by release date (global)
I dockerized my scraping tool and made it available as an on-demand GitHub Action.
name: import TCG Pocket cards
on:
# make this action "on-demand"
workflow_dispatch:
jobs:
import:
runs-on: ubuntu-latest
permissions:
# needed to commit changes
contents: write
# needed to download the importer package
packages: read
# needed to create a pull-request
# make sure "Allow GitHub Actions to create and approve pull requests" is enabled in Repository > Settings > Actions > General
pull-requests: write
container: ghcr.io/xernisfy/pokemon-tcg-importer
steps:
- name: install Git and GitHub CLI in container
run: |
apk --no-cache add git github-cli
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v4
- name: import cards
run : |
cd /app
deno run -A src/main.ts bulbapedia
- name: copy cards to repo
run: cp -r /app/out/* .
- name: commit cards to new branch
run: |
git config --global user.name 'Xernisfy'
git config --global user.email '[email protected]'
git checkout -b tcgp-import-${{ github.run_id }}
git add .
git commit -m 'import TCG Pocket cards'
git push origin tcgp-import-${{ github.run_id }}
- name: create pull request
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr create \
--title "Import TCG Pocket cards - ${{ github.run_id }}" \
--body "This PR contains newly imported cards for TCG Pocket" \
--base main \
--head tcgp-import-${{ github.run_id }} |
I scraped Bulbapedia for the new cards from TCG Pocket.
Some props like rarity and artist are missing (because it's tricky to parse), I'll add them as soon as possible.