1
0
Fork
You've already forked fcp-el
0
#emacs #fcp #freenet Interact with Freenet FCP using emacs (WIP)
  • Emacs Lisp 100%
Find a file
2023年06月14日 09:45:15 +02:00
fcp.el initial commit 2023年06月13日 17:38:08 +02:00
README.org download folder 2023年06月14日 09:45:15 +02:00

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.jar in ~/Download/ folder with file name sone-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)