New README.md
Thanks ChatGPT
This commit is contained in:
parent
43256b9991
commit
49015f3263
78
README.md
78
README.md
@ -1,8 +1,76 @@
|
||||
# NostrSMS
|
||||
### That's right folks, we got SMS to Relay!
|
||||
|
||||
I realize this is super niche, but I had fun creating it none the less.
|
||||
I am trying to get delegated signing working, but for now your best interest
|
||||
is to follow the install instructions [here](https://wiki.vanderwarker.family/doku.php?id=code:nostrsms:install)
|
||||
NostrSMS is a bridge between XMPP and Nostr, allowing users to send and receive messages through Nostr via an XMPP bot. This bot connects to an XMPP server and listens for messages from authorized users, posting them to Nostr and fetching recent global posts.
|
||||
|
||||
⚡: stephen@vanderwarker.family
|
||||
## Features
|
||||
- Connects to an XMPP server with configured credentials.
|
||||
- Posts messages received from XMPP/SMS to Nostr.
|
||||
- Fetches recent global posts from Nostr and returns them to users.
|
||||
- Allows only authorized users to interact with the bot.
|
||||
- Supports simple commands such as `!help` and `!g`.
|
||||
|
||||
## Requirements
|
||||
- Node.js
|
||||
- A configured XMPP account
|
||||
- A Nostr private key for signing events
|
||||
- A valid `config.ini` file (see [Configuration](#configuration))
|
||||
|
||||
## Installation
|
||||
1. Clone the repository or download the script.
|
||||
2. Install dependencies:
|
||||
```sh
|
||||
npm install
|
||||
```
|
||||
3. Ensure you have a valid `config.ini` file in the appropriate location for your operating system (see below).
|
||||
4. Run the bot:
|
||||
```sh
|
||||
node index.js
|
||||
```
|
||||
|
||||
## Configuration
|
||||
Create a `config.ini` file in the appropriate location:
|
||||
- **Windows**: `%APPDATA%/nostrsms/config.ini`
|
||||
- **macOS**: `~/Library/Application Support/nostrsms/config.ini`
|
||||
- **Linux**: `~/.config/nostrsms/config.ini`
|
||||
|
||||
### Example `config.ini`:
|
||||
```ini
|
||||
[nostr]
|
||||
pkhex=your_private_key
|
||||
|
||||
[xmpp]
|
||||
host=wss://your-xmpp-server
|
||||
user=your_xmpp_username
|
||||
domain=your_xmpp_domain
|
||||
password=your_xmpp_password
|
||||
resource=bot
|
||||
|
||||
[relays]
|
||||
read=wss://relay.example.com
|
||||
write=wss://relay.example.com
|
||||
|
||||
[authorized_users]
|
||||
users=user1@xmpp.server,user2@xmpp.server
|
||||
```
|
||||
|
||||
## Usage
|
||||
- **`!help`**: Returns a help link.
|
||||
- **`!g`**: Fetches the latest 10 global posts from Nostr.
|
||||
- **Any other message**: Posts the message to Nostr.
|
||||
|
||||
## Error Handling
|
||||
- If `config.ini` is missing or invalid, an error message is displayed, and the program exits.
|
||||
- XMPP errors are logged to the console.
|
||||
- If the bot receives a message from an unauthorized user, it responds with "Not authorized".
|
||||
|
||||
## Stopping the Bot
|
||||
To stop the bot, press `CTRL+C`. The bot will cleanly disconnect from XMPP before exiting.
|
||||
|
||||
## License
|
||||
This project is licensed under the MIT License.
|
||||
|
||||
## Support
|
||||
For setup and troubleshooting, visit the [wiki](https://wiki.vanderwarker.family/doku.php?id=code:nostrsms:install).
|
||||
|
||||
|
||||
**//README generated by ChatGPT.//**
|
||||
|
Loading…
x
Reference in New Issue
Block a user