nolanlawson / pokedex.org

Offline-capable Pokédex web site (unmaintained)
https://www.pokedex.org
Apache License 2.0
2.27k stars 325 forks source link

Generate from CSV #75

Closed sidmani closed 6 years ago

sidmani commented 6 years ago

Rewrote all the scripts to create the databases from the pokeapi CSV files. Run npm get-csv and then run each file in bin/build-csv/build-*

The scripts now generate all the data for Gen 6 and 7. The only things left are to update the CSS sprites and the monsterSummaries.json. (How are those generated?)

There are still some glitches that I need to fix, but I wanted to make the pull request to summarize the progress anyway. To fix:

nolanlawson commented 6 years ago

Thanks very much for this PR! Will take a look soon, and migrate to GH pages so we can do everything within GitHub. :)

On June 25, 2018 11:13:36 AM PDT, Sid Mani notifications@github.com wrote:

Rewrote all the scripts to create the databases from the pokeapi CSV files. Run npm get-csv and then run each file in bin/build-csv/build-*

  • The monsters.txt database is no longer necessary
  • Currently, the EV data is broken as it isn't present in the CSV files, but I can replace the JSON containing that data if you think that's an important stat to have

The scripts now generate all the data for Gen 6 and 7. The only things left are to update the CSS sprites and the monsterSummaries.json. (How are those generated?)

There are still some glitches that I need to fix, but I wanted to make the pull request to summarize the progress anyway. To fix:

-- Commit Summary --

  • download CSVs
  • Assign stats, types, moves from CSV
  • Load abilities, egg groups, species data
  • Load descriptions from CSV
  • Build moves from CSV
  • Build pokemon moves from CSV
  • Removed dependency on monsters.txt and static data
  • Build evolutions from CSV
  • optimized ability data
  • Build type efficacy from CSV

-- File Changes --

M .gitignore (1) A bin/build-csv/build-descriptions-csv.js (30) A bin/build-csv/build-evolution-csv.js (79) A bin/build-csv/build-monster-moves-csv.js (60) A bin/build-csv/build-moves-csv.js (41) A bin/build-csv/build-skim-csv.js (97) A bin/build-csv/build-supplemental-csv.js (47) A bin/build-csv/build-types-csv.js (61) A bin/build-csv/csv-load.js (38) A bin/build-csv/download-csv.js (40) D bin/build-descriptions-database.js (61) D bin/build-evolutions-database.js (89) D bin/build-monster-moves-database.js (42) D bin/build-monsters-database.js (32) D bin/build-monsters-skim-database.js (44) D bin/build-monsters-supplemental-database.js (49) D bin/build-moves-database.js (97) D bin/build-pokeapi.sh (9) D bin/build-types-database.js (75) M bin/dev-server.js (2) M package-lock.json (322) M package.json (5) M src/assets/descriptions.txt (564) M src/assets/evolutions.txt (506) M src/assets/monster-moves.txt (568) M src/assets/monsters-supplemental.txt (568) D src/assets/monsters.txt (275) M src/assets/moves.txt (520) M src/assets/skim-monsters.txt (568) M src/assets/types.txt (14) M src/js/shared/data/bulbasaur.json (8) D src/js/shared/data/eggGroups.json (651) D src/js/shared/data/hepburnNames.json (651) D src/js/shared/data/japaneseNames.json (651) D src/js/shared/data/species.json (651) D src/js/shared/data/supplemental.json (7141) M src/js/shared/prerendered/bulbasaur.json (8) M src/js/shared/renderMonsterDetailView/renderEvolutions.js (12) M src/js/shared/renderMonsterDetailView/renderMinutia.js (4) M src/js/shared/renderMonsterDetailView/renderStats.js (6) M src/js/shared/renderMovesList/index.js (4) M src/js/worker/databaseService.js (6)

-- Patch Links --

https://github.com/nolanlawson/pokedex.org/pull/75.patch https://github.com/nolanlawson/pokedex.org/pull/75.diff

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/nolanlawson/pokedex.org/pull/75

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

nolanlawson commented 6 years ago

This looks fantastic. For the sprites, I manually downloaded them from some sprite sheet site (can't recall which one). For the summaries, I believe those are just a simple filter() operation on the monsters themselves, containing only the minimal data we need to render the home page (names, types, and IDs IIRC).

This PR looks great, still some work to do it seems but I'm happy to merge. You are also now a collaborator with full push rights, but feel free to open PRs and tag me for review. :)

I also still need to set up GitHub Pages so that we can deploy from the docs/ directory, and I also need to give you access to the public CouchDB database, but those are next on my todo list. Great work!!