Hacker News doesn't have an API, and mobile apps usually implement their own post saving/bookmarking mechanism. For convenience, I decided to sync posts which I upvote to my raindrop.io account.
Install required dependencies
pip install -r requirements.txt
Then add your raindrop API token and collection ID to import-hackernews-to-raindrop.py
RAINDROP_API_TOKEN="your-token-goes-here"
RAINDROP_COLLECTION_ID="your-collection-id-goes-here"
Finally, run import-hackernews-to-raindrop.py
python3 import-hackernews-to-raindrop.py your-hackernews-username your-hackernews-password
Voila!