tongbu.el
(同步) is an Emacs package which creates a web server for sharing
text and files between your computer and phone via a web browser.
Use M-x tongbu
to start the server, then goto http://0.0.0.0:8888.
- To share text, edit textarea and hit "Save" to update to the server
- To upload file, use the file input
- To download file, click the filename; click
..
to go to parent directory
Use M-x list-processes
to stop the server, the process name looks like ws-server
.
The server port. If you set it to 0, Emacs will pick a random port for you.
Host name used by the server.
You can change it to "127.0.0.1"
then setup a reverse proxy to 127.0.0.1:8888.
The stylesheet. The default value is
(setq tongbu-css "
textarea {
font-size: 1rem;
line-height: 1.5;
padding: 10px;
width: 100%;
}
")
The script. The default value is an empty string ""
, if you want to change it,
don't forget the <script> ... </script>
, for example,
;; inline script
(setq tongbu-js "<script> alert('Hello World!'); </script>")
;; external script
(setq tongbu-js "<script src='//example.com/hello.js'></script>")
- Emacs 25.1
- emacs-web-server