TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Bash one-liner to get unsubmitted HN articles from your Wallabag favorites

2 点作者 m0wer12 个月前
If you want to know which of your favorite Wallabag (self hostable application for saving web pages) articles haven&#x27;t been submitted yet to HN, you can do so with a one-liner command. After exporting your favorites to JSON from the Wallabag Web UI, do:<p>``` for url in $(jq -r &#x27;.[].url&#x27; Downloads&#x2F;Starred\ articles.json); do \ curl -s &quot;https:&#x2F;&#x2F;hn.algolia.com&#x2F;api&#x2F;v1&#x2F;search?query=$url&amp;restrictSearchableAttributes=url&amp;analytics=false&amp;typoTolerance=false&quot; \ | jq -r .nbHits | grep -q ^0$ &amp;&amp; echo $url; done | tee &#x2F;tmp&#x2F;unpublished ```<p>This is easily adaptable to other use cases. The tricky part was figuring out the query parameters for Algolia search API.<p>Previous threads about Wallabag:<p>https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14686882 https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=30421036

暂无评论

暂无评论