Use 4chan X and org-protocol to log every post you make to emacs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
gg1234 2b8b0205c1 Tell people where to click 2 months ago
4chan-x-org-protocol.user.js Add 4chan X Org Protocol userscript 4 months ago
LICENSE Initial commit 4 months ago
README.md Tell people where to click 2 months ago

README.md

4chan X Org Protocol

Use 4chan X and org-protocol to log every post you make to emacs.

Installation

Although the code is small, there are a lot of prerequisites for getting this working.

OS

Setup a protcol handler for org-protocol:// . See org-capture-extension for instructions.

Browser

Whitelist org-protocol://*

Linux users using Chromium derivatives will be asked by the browser if it's OK to run xdg-open. For this extension, say yes, and click on the checkbox so that it never asks you again. However, for the org-capture extension, it'll ask you for every domain you use it on which is annoying. In case you're trying to solve that, I found the answer.

  • For Chrome, create a directory /etc/opt/chrome/policies/managed.
  • For Chromium, Brave, and everyone else it'll be /etc/opt/chromium/policies/managed instead.
  • In that directory, write out a file called whitelist.json with the following contents.
{
  "URLWhitelist": ["org-protocol://*"]
}

Restart your browser to make this take effect.

Emacs

Add this to your emacs config.

(server-start)
(require 'org-protocol)
(setq org-capture-templates
  '(
    ;; Add the following to your org-capture-templates.
    ("4" "Protocol 4chan Link" entry (file+headline "~/Dropbox/org/4chan.org" "Inbox")
     "* [[%:link][%:description]] \nCaptured On: %U \n%i" :immediate-finish t)
    ))
  • (server-start) is needed so that emacsclient can communicate with a running emacs process.
  • (require 'org-protocol) is needed so that emacs understands the org-protocol:// scheme and dispatches it correctly.
  • org-capture-templates is a variable that controls how org-capture dispatches to different files. In the example, it uses ~/Dropbox/org/4chan.org but please change that to whatever makes sense for your system.

Screenshot

Remember What You Posted