All Projects → thanhvg → emacs-hnreader

thanhvg / emacs-hnreader

Licence: other
Read Hacker News inside Emacs

Programming Languages

emacs lisp
2029 projects

Projects that are alternatives of or similar to emacs-hnreader

Haxor News
Browse Hacker News like a haxor: A Hacker News command line interface (CLI).
Stars: ✭ 3,342 (+9729.41%)
Mutual labels:  hacker-news, hacker-news-reader
hacker-news-mixin-bot
Post new hot stories from Hacker News to Mixin bot (Mixin ID: 7000100124)
Stars: ✭ 19 (-44.12%)
Mutual labels:  hacker-news
Rails Hackernews Reddit Producthunt Clone
hacker news / reddit / social link-sharing website. Built with Rails.
Stars: ✭ 107 (+214.71%)
Mutual labels:  hacker-news
Clojurenews
Clojure News Web Application - (Hacker News Clone)
Stars: ✭ 217 (+538.24%)
Mutual labels:  hacker-news
Flews
A multi-service news app written in Flutter
Stars: ✭ 148 (+335.29%)
Mutual labels:  hacker-news
Devo
A Chrome and Firefox extension that displays GitHub Trending, Hacker News, Product Hunt and Designer News on every new tab.
Stars: ✭ 236 (+594.12%)
Mutual labels:  hacker-news
Quiet Hacker News
😶 Quiet Hacker News
Stars: ✭ 100 (+194.12%)
Mutual labels:  hacker-news
tophn
An application to recommend the topmost story of Hacker News from the last 24 hours
Stars: ✭ 31 (-8.82%)
Mutual labels:  hacker-news
hnpwa-api
CDN cached Hacker News API
Stars: ✭ 73 (+114.71%)
Mutual labels:  hacker-news
What Hn Says Webext
Web Extension: Easily find Hacker News discussions about the page you're currently browsing.
Stars: ✭ 214 (+529.41%)
Mutual labels:  hacker-news
Hackernews.el
Hacker News client for Emacs
Stars: ✭ 200 (+488.24%)
Mutual labels:  hacker-news
Hackerweb Native
A simply readable Hacker News app for iOS & Android, built with React Native. V2 now over here https://github.com/cheeaun/hackerweb-native-2
Stars: ✭ 177 (+420.59%)
Mutual labels:  hacker-news
Hnpwa Vanilla
Hacker News PWA implemented using no framework just javascript
Stars: ✭ 245 (+620.59%)
Mutual labels:  hacker-news
Hackernew
The best Chrome extension to make Hacker News quicker and more useful.
Stars: ✭ 120 (+252.94%)
Mutual labels:  hacker-news
HackerNews
A .NET MAUI app for displaying the top posts on Hacker News that demonstrates text sentiment analysis gathered using artificial intelligence
Stars: ✭ 184 (+441.18%)
Mutual labels:  hacker-news
Hackernewsbot
📰 Telegram bot that posts new hot stories from Hacker News to telegram channel
Stars: ✭ 103 (+202.94%)
Mutual labels:  hacker-news
React Hn
React-powered Hacker News client
Stars: ✭ 2,174 (+6294.12%)
Mutual labels:  hacker-news
Hackerbuzz Reactnative
A Hacker News Reader built in React Native for iOS and Android
Stars: ✭ 220 (+547.06%)
Mutual labels:  hacker-news
reading-list
社区驱动的高质量聚合阅读列表
Stars: ✭ 45 (+32.35%)
Mutual labels:  hacker-news
hnlookup
A chrome extension to browse for related topics on Hacker News (built with clojurescript)
Stars: ✭ 25 (-26.47%)
Mutual labels:  hacker-news

Emacs hnreader - Read Hacker News in Emacs

https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg

Front page:

docs/screenshot.png

Comments:

docs/screenshot2.png

docs/screencast.gif

Intro

This package renders hackernews website at https://news.ycombinator.com/ in an org buffer. Almost everything works.

The org-mode buffer feature interactive links similar to html.

Features that are not supported are account related features. You cannot add comment, downvote or upvote.

Install

Manual: TBD

Melpa

https://melpa.org/packages/hnreader-badge.svg

Spacemacs layer:

https://github.com/thanhvg/spacemacs-eos

Dependencies

promise and request are required. User must have org-mode 9.2 or later installed also.

Commands

  • hnreader-news: Load news page.
  • hnreader-past: Load past page.
  • hnreader-ask: Load ask page.
  • hnreader-show: Load show page.
  • hnreader-newest: Load new link page.
  • hnreader-more: Load more.
  • hnreader-back: Go back to previous page.
  • hnreader-comment: read an HN item url such as https://news.ycombinator.com/item?id=1 this is handy when you have the link and want to read it in emacs, takes url as param
  • hnreader-org-insert-hn-link: insert hn link to org buffer, take url as param

Remarks

Listing buffer is called *HN* Command buffer is called *HNComments*

Most of links in Hacker News buffer will run elsip commands on clicking, by default org-mode will ask you for confirmation. You can disable org confirm message on clicking

(setq org-confirm-elisp-link-function nil)

But it is not recommended by the org-mode guide: just change it to ‘y-or-n-p’ if you want to confirm with a single keystroke rather than having to type “yes”.

Recommended settings for eww

eww can be used to view story. You may want to set these settings for web page display inside Emacs:

(setq shr-width 75)
(setq shr-use-fonts nil)

When displaying pictures srolling over them is jumpy. You can try this hack in your config:

(with-eval-after-load "shr"
    (defun shr-put-image (spec alt &optional flags)
      "Insert image SPEC with a string ALT.  Return image.
SPEC is either an image data blob, or a list where the first
element is the data blob and the second element is the content-type.
Hack to use `insert-sliced-image' to avoid jerky image scrolling."
      (if (display-graphic-p)
          (let* ((size (cdr (assq 'size flags)))
                 (data (if (consp spec)
                           (car spec)
                         spec))
                 (content-type (and (consp spec)
                                    (cadr spec)))
                 (start (point))
                 (image (cond
                         ((eq size 'original)
                          (create-image data nil t :ascent 100
                                        :format content-type))
                         ((eq content-type 'image/svg+xml)
                          (create-image data 'svg t :ascent 100))
                         ((eq size 'full)
                          (ignore-errors
                            (shr-rescale-image data content-type
                                               (plist-get flags :width)
                                               (plist-get flags :height))))
                         (t
                          (ignore-errors
                            (shr-rescale-image data content-type
                                               (plist-get flags :width)
                                               (plist-get flags :height)))))))
            (when image
              (let* ((image-pixel-cons (image-size image t))
                     (image-pixel-width (car image-pixel-cons))
                     (image-pixel-height (cdr image-pixel-cons))
                     (image-scroll-rows (round (/ image-pixel-height (default-font-height)))))
                ;; When inserting big-ish pictures, put them at the
                ;; beginning of the line.
                (when (and (> (current-column) 0)
                           (> (car (image-size image t)) 400))
                  (insert "\n"))

                (insert-sliced-image image (or alt "*") nil image-scroll-rows 1)
                ;; (if (eq size 'original)
                ;;     (insert-sliced-image image (or alt "*") nil image-scroll-rows 1)
                ;;   (insert-image image (or alt "*")))

                (put-text-property start (point) 'image-size size)
                (when (and shr-image-animate
                           (cond ((fboundp 'image-multi-frame-p)
                                  ;; Only animate multi-frame things that specify a
                                  ;; delay; eg animated gifs as opposed to
                                  ;; multi-page tiffs.  FIXME?
                                  (cdr (image-multi-frame-p image)))
                                 ((fboundp 'image-animated-p)
                                  (image-animated-p image))))
                  (image-animate image nil 60))))
            image)
        (insert (or alt "")))))
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].