A swift solution for uploading SubRip file as danmaku to Bilibili.
Inspired by srt2bilibili by @cnbeining under GPLv2 License and bilibili-mac-client by @typcn under GPLv3 License.
To install the command line tool, you either needs the latest Xcode, or both the Swift Package Manager and the Swift compiler installed.
Copy and paste the following code to your favorite terminal app, Srt2BilibiliKit will compile and install to /usr/local/bin
eval "$(curl -sL https://raw.githubusercontent.com/ApolloZhu/Srt2BilibiliKit/master/sh/install-cmd)"
You should see the usage printed out.
Your cookie will only be used in the header section of POST requests when sending danmaku. They are not stored or used in any other ways.