#emacs #fcp #freenet
Interact with Freenet FCP using emacs (WIP)
| fcp.el | initial commit | |
| README.org | download folder | |
Emacs Freenet FCP
Install
- Clone Repo
git clone https://codeberg.org/usrib/fcp-el.git
- Load elisp code
(load-file "~/path/to/file/fcp.el")
Functions
- Open the network stream:
(fcp-open-network-stream)
- Send a Hello
(fcp-send-clienthello fcp-process)
- Upload a file, example
~/test.txt
(fcp-send-clientput fcp-process (expand-file-name "~/test.txt"))
- Download a file, example
sone.jarin~/Download/folder with file namesone-file-name.jar
(fcp-send-clientget fcp-process
"USK@nwa8lHa271k2QvJ8aa0Ov7IHAV-DFOCFgmDt3X6BpCI,DuQSUZiI~agF8c-6tjsFFGuZ8eICrzWCILB60nT8KKo,AQACAAE/sone/82/sone-current.jar"
(expand-file-name "~/Download/")
"sone-file-name.jar")
- Load a Plugin
;;an official plugin
(fcp-send-loadplugin fcp-process "HelloFCP" "official")
;;a freenet plugin via key
(fcp-send-loadplugin fcp-process "USK@nwa8lHa271k2QvJ8aa0Ov7IHAV-DFOCFgmDt3X6BpCI,DuQSUZiI~agF8c-6tjsFFGuZ8eICrzWCILB60nT8KKo,AQACAAE/sone/82/sone-current.jar" "freenet")
- Send a Plugin MSG (example send Version to Sone plugin)
(fcp-send-fcppluginmessage fcp-process
"net.pterodactylus.sone.main.SonePlugin"
"Version"
"true")
Test
- Run a freenet node
- Open the network stream, eval:
(fcp-open-network-stream) - Send a Hello, eval:
(fcp-send-clienthello fcp-process)
Optional config
(setq fcp-server "127.0.0.1"
fcp-port 9481)