Contents

Sort Scrapbox JSON (Export Pages) by title for git

Contents
1
2
3
4
5
# download PROJECT_NAME.json by "Export Pages" https://scrapbox.io/projects/PROJECT_NAME/settings/page-data
cp ~/Downloads/PROJECT_NAME.json ./scrapbox.json
git diff ./scrapbox.json  # large diff!
jq <~/Downloads/PROJECT_NAME.json '.pages = (.pages | sort_by(.title))' > ./scrapbox.json
git diff ./scrapbox.json  # good diff