icykoneko / ff14-fish-tracker-app

FF14 Fish Tracker App
https://ff14fish.carbuncleplushy.com
MIT License
61 stars 21 forks source link

FFX|V Fish Tracker App

A webapp designed for tracking big fish and arranging them by which fish are less often available rather than just available right now.

Development Notes

Cloning this Repo

This repo makes use of submodules. When cloning, please include the --recurse-submodules option.

git clone --recurse-submodules https://github.com/icykoneko/ff14-fish-tracker-app.git

If you forgot to include the submodules during cloning, don't worry. Assuming you haven't checked them out yet, running git submodule update --recursive --init should take care of it.

If you've already checked out the submodules and are running into issues with the SaintCoinach module, the repo address recently changed. Unfortunately, it's a pain to fix... You'll most likely need to run git submodule sync --recursive after pulling the latest changes. After that, the git submodule update --recursive --remote command should work right. Sorry it's such a pain.

Setup

The management of fish data is done using Python. It's recommended you create a virtual environment.

py -m venv pyvirt
pyvirt\Scripts\activate
pip install -r private/python-requirements.txt

The webapp itself is completely static. At this time, some of the development environment functions are manually driven. Recommended you install FNM.

NOTE: Sprity doesn't seem to work in newer versions of Node due to dependencies... I've only had success running it via Node v10.24.1 on Windows.

This application uses GitHub Pages to host the site, but the branch isn't a perfect copy of the main branch... I highly recommend using a worktree to have the gh-pages branch checked out in a folder named dist.

git worktree add --track ./dist gh-pages

Step-by-step Instructions for Updating Data

Sometimes you forget how to do this after several months... Clearly the TODO list isn't getting done...

Updating Video Links

Using Cache-Buster Update Script

Instead of manually updating the pages each time, before committing changes, you can use the updateCacheBuster Python script on the list of modified files.

python ./private/updateCacheBusters.py -p ${ver} $(git status -uno --porcelain=v1 | cut -c4-)

Updating the website

npm run build
# Assuming you've created a "workspace" folder dist that's tied to the gh-pages branch...
cd dist
# Merge master branch (deal with any "missing" files...)
git merge master
for f in $(git status --porcelain | grep "^DU" | cut -f2 -d' '); do git rm $f; done
# In case anything changed, copy files from public into the branch too.
cp -vrf ../public/images/sprite.* ./public/images/
cp -vrf ../public/js/* ./public/js/
# Remember to add them.
git add public/images/ public/js/

# Always do one final check of the site to be sure nothing got messed up in the merge.
# (This is especially important when making large changes.)
bundle exec jekyll serve

# If everything's good, commit and push.
git commit
git push

Contributing

There's lots of features waiting to be implemented if you feel you have an idea for tackling them. Please follow existing code patterns with regards to style, and when possible, utilize the Semantic UI widgets so everything meshes nicely. Keep PRs simple to ensure they get merged sooner.

For changes to availability of specific fish, please contact me directly via Discord (via Fish'cord). Please do not open issues here for that purpose.