This is the main javascript logic from the dndbeyond.com character sheets The data is downloaded using `sourcemapper` from https://github.com/denandz/sourcemapper Given the main JS file URL, the source code can be downloaded and mapped using: ``` ~/go/bin/sourcemapper -output ddb -jsurl https://media.dndbeyond.com/character-app/static/js/main.90aa78c5.js ``` For convenience you can run `python update.py` ## Syncing with git repo The script is designed to keep the contents of a git repo up-to-date with the current files. This can be paired with a cronjob to keep an up-to-date version of the code someplace. To ensure the `push` phase of the update works as expected, it is recommended to provide an SSH URL for the repository, as we can leverage an SSH key for a password-less authentication. The following example would keep the latest code extracted from dndbeyond.com stored in the `ddb_src` directory on the `master` branch of the given git repo. If changes are found they are automatically pushed to the repository, ``` python update.py \ --directory "ddb_src" \ --git-repo "ssh://git@git.example.com/test/dndbeyond_src.git" --git-branch "master" ```