Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xuchunyang/tongbu.el
Share text/file between your computer and phone
https://github.com/xuchunyang/tongbu.el
Last synced: about 1 month ago
JSON representation
Share text/file between your computer and phone
- Host: GitHub
- URL: https://github.com/xuchunyang/tongbu.el
- Owner: xuchunyang
- License: gpl-3.0
- Created: 2020-02-29T09:18:32.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-11-04T11:47:52.000Z (about 3 years ago)
- Last Synced: 2024-10-16T01:45:55.546Z (3 months ago)
- Language: Emacs Lisp
- Homepage:
- Size: 292 KB
- Stars: 15
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# A web server to share text or files between two devices
[![Melpa](https://melpa.org/packages/tongbu-badge.svg)](https://melpa.org/#/tongbu)`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.## Usage
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 directoryUse `M-x list-processes` to stop the server, the process name looks like `ws-server`.
## Customization
### `tongbu-port` (defaults to 8888)
The server port. If you set it to 0, Emacs will pick a random port for you.
### `tongbu-host` (defaults to `"0.0.0.0"`)
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.
### `tongbu-css`
The stylesheet. The default value is
``` emacs-lisp
(setq tongbu-css "
textarea {
font-size: 1rem;
line-height: 1.5;
padding: 10px;
width: 100%;
}
")
```### `tongbu-js`
The script. The default value is an empty string `""`, if you want to change it,
don't forget the ` ... `, for example,``` emacs-lisp
;; inline script
(setq tongbu-js " alert('Hello World!'); ");; external script
(setq tongbu-js "")
```## Dependencies
- Emacs 25.1
- [emacs-web-server](https://github.com/eschulte/emacs-web-server)