fix naming from fluxxmpp to fluuxmpp

This commit is contained in:
Martin/Geno 2019-08-06 16:03:48 +02:00 committed by Mickaël Rémond
parent 76f59be5ed
commit 6e65ba2a0b
10 changed files with 37 additions and 37 deletions

View file

@ -1,23 +1,23 @@
# fluxxmpp # fluuxmpp
fluxxIO's xmpp comandline tool fluuxIO's xmpp comandline tool
## Installation ## Installation
To install `fluxxmpp` in your Go path: To install `fluuxmpp` in your Go path:
``` ```
$ go get -u gosrc.io/xmpp/cmd/fluxxmpp $ go get -u gosrc.io/xmpp/cmd/fluuxmpp
``` ```
## Usage ## Usage
``` ```
$ fluxxmpp --help $ fluuxmpp --help
fluxxIO's xmpp comandline tool fluuxIO's xmpp comandline tool
Usage: Usage:
fluxxmpp [command] fluuxmpp [command]
Available Commands: Available Commands:
check is a command-line to check if you XMPP TLS certificate is valid and warn you before it expires check is a command-line to check if you XMPP TLS certificate is valid and warn you before it expires
@ -25,22 +25,22 @@ Available Commands:
send is a command-line tool to send to send XMPP messages to users send is a command-line tool to send to send XMPP messages to users
Flags: Flags:
-h, --help help for fluxxmpp -h, --help help for fluuxmpp
Use "fluxxmpp [command] --help" for more information about a command. Use "fluuxmpp [command] --help" for more information about a command.
``` ```
### check tls ### check tls
``` ```
$ fluxxmpp check --help $ fluuxmpp check --help
is a command-line to check if you XMPP TLS certificate is valid and warn you before it expires is a command-line to check if you XMPP TLS certificate is valid and warn you before it expires
Usage: Usage:
fluxxmpp check <host[:port]> [flags] fluuxmpp check <host[:port]> [flags]
Examples: Examples:
fluxxmpp check chat.sum7.eu:5222 --domain meckerspace.de fluuxmpp check chat.sum7.eu:5222 --domain meckerspace.de
Flags: Flags:
-d, --domain string domain if host handle multiple domains -d, --domain string domain if host handle multiple domains
@ -50,18 +50,18 @@ Flags:
### sending messages ### sending messages
``` ```
$ fluxxmpp send --help $ fluuxmpp send --help
is a command-line tool to send to send XMPP messages to users is a command-line tool to send to send XMPP messages to users
Usage: Usage:
fluxxmpp send <recipient,> [message] [flags] fluuxmpp send <recipient,> [message] [flags]
Examples: Examples:
fluxxmpp send to@chat.sum7.eu "Hello World!" fluuxmpp send to@chat.sum7.eu "Hello World!"
Flags: Flags:
--addr string host[:port] --addr string host[:port]
--config string config file (default is ~/.config/fluxxmpp.yml) --config string config file (default is ~/.config/fluuxmpp.yml)
-h, --help help for send -h, --help help for send
--jid string using jid (required) --jid string using jid (required)
-m, --muc recipient is a muc (join it before sending messages) -m, --muc recipient is a muc (join it before sending messages)
@ -76,7 +76,7 @@ Flags:
If you server is on standard port and XMPP domains matches the hostname you can simply use: If you server is on standard port and XMPP domains matches the hostname you can simply use:
``` ```
$ fluxxmpp check chat.sum7.eu $ fluuxmpp check chat.sum7.eu
info All checks passed info All checks passed
⇢ address="chat.sum7.eu" domain="" ⇢ address="chat.sum7.eu" domain=""
⇢ main.go:43 main.runCheck ⇢ main.go:43 main.runCheck
@ -86,7 +86,7 @@ $ fluxxmpp check chat.sum7.eu
You can also pass the port and the XMPP domain if different from the server hostname: You can also pass the port and the XMPP domain if different from the server hostname:
``` ```
$ fluxxmpp check chat.sum7.eu:5222 --domain meckerspace.de $ fluuxmpp check chat.sum7.eu:5222 --domain meckerspace.de
info All checks passed info All checks passed
⇢ address="chat.sum7.eu:5222" domain="meckerspace.de" ⇢ address="chat.sum7.eu:5222" domain="meckerspace.de"
⇢ main.go:43 main.runCheck ⇢ main.go:43 main.runCheck
@ -101,7 +101,7 @@ monitoring scripts.
Message from arguments: Message from arguments:
```bash ```bash
$ fluxxmpp send to@example.org "Hello World!" $ fluuxmpp send to@example.org "Hello World!"
info client connected info client connected
⇢ cmd.go:56 main.glob..func1.1 ⇢ cmd.go:56 main.glob..func1.1
⇢ 2019-07-17T23:42:43.310+02:00 ⇢ 2019-07-17T23:42:43.310+02:00
@ -113,7 +113,7 @@ $ fluxxmpp send to@example.org "Hello World!"
Message from STDIN: Message from STDIN:
```bash ```bash
$ journalctl -f | fluxxmpp send to@example.org - $ journalctl -f | fluuxmpp send to@example.org -
info client connected info client connected
⇢ cmd.go:56 main.glob..func1.1 ⇢ cmd.go:56 main.glob..func1.1
⇢ 2019-07-17T23:40:03.177+02:00 ⇢ 2019-07-17T23:40:03.177+02:00
@ -131,7 +131,7 @@ $ journalctl -f | fluxxmpp send to@example.org -
Multiple recipients: Multiple recipients:
```bash ```bash
$ fluxxmpp send to1@example.org,to2@example.org "Multiple recipient" $ fluuxmpp send to1@example.org,to2@example.org "Multiple recipient"
info client connected info client connected
⇢ cmd.go:56 main.glob..func1.1 ⇢ cmd.go:56 main.glob..func1.1
⇢ 2019-07-17T23:47:57.650+02:00 ⇢ 2019-07-17T23:47:57.650+02:00
@ -147,7 +147,7 @@ $ fluxxmpp send to1@example.org,to2@example.org "Multiple recipient"
Send to MUC: Send to MUC:
```bash ```bash
journalctl -f | fluxxmpp send testit@conference.chat.sum7.eu - --muc journalctl -f | fluuxmpp send testit@conference.chat.sum7.eu - --muc
info client connected info client connected
⇢ cmd.go:56 main.glob..func1.1 ⇢ cmd.go:56 main.glob..func1.1
⇢ 2019-07-17T23:52:56.269+02:00 ⇢ 2019-07-17T23:52:56.269+02:00
@ -167,9 +167,9 @@ journalctl -f | fluxxmpp send testit@conference.chat.sum7.eu - --muc
### Configuration file ### Configuration file
In `/etc/`, `~/.config` and `.` (here). In `/etc/`, `~/.config` and `.` (here).
You could create the file name `fluxxmpp` with you favorite file extenion (e.g. `toml`, `yml`). You could create the file name `fluuxmpp` with you favorite file extenion (e.g. `toml`, `yml`).
e.g. ~/.config/fluxxmpp.toml e.g. ~/.config/fluuxmpp.toml
```toml ```toml
jid = "bot@example.org" jid = "bot@example.org"
password = "secret" password = "secret"
@ -185,7 +185,7 @@ export FLUXXMPP_PASSWORD='secret';
export FLUXXMPP_ADDR='example.com:5222'; export FLUXXMPP_ADDR='example.com:5222';
fluxxmpp send to@example.org "Hello Welt"; fluuxmpp send to@example.org "Hello Welt";
``` ```
### Parameters ### Parameters
@ -194,5 +194,5 @@ Warning: This should not be used for production systems, as all users on the sys
can read the running processes, and their parameters (and thus the password). can read the running processes, and their parameters (and thus the password).
```bash ```bash
fluxxmpp send to@example.org "Hello World!" --jid bot@example.org --password secret --addr example.com:5222; fluuxmpp send to@example.org "Hello World!" --jid bot@example.org --password secret --addr example.com:5222;
``` ```

View file

@ -10,7 +10,7 @@ var domain = ""
var cmdCheck = &cobra.Command{ var cmdCheck = &cobra.Command{
Use: "check <host[:port]>", Use: "check <host[:port]>",
Short: "is a command-line to check if you XMPP TLS certificate is valid and warn you before it expires", Short: "is a command-line to check if you XMPP TLS certificate is valid and warn you before it expires",
Example: "fluxxmpp check chat.sum7.eu:5222 --domain meckerspace.de", Example: "fluuxmpp check chat.sum7.eu:5222 --domain meckerspace.de",
Args: cobra.ExactArgs(1), Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {
runCheck(args[0], domain) runCheck(args[0], domain)

5
cmd/fluuxmpp/doc.go Normal file
View file

@ -0,0 +1,5 @@
/*
fluuxmpp: fluuxIO's xmpp comandline tool
*/
package main

View file

@ -7,8 +7,8 @@ import (
// cmdRoot represents the base command when called without any subcommands // cmdRoot represents the base command when called without any subcommands
var cmdRoot = &cobra.Command{ var cmdRoot = &cobra.Command{
Use: "fluxxmpp", Use: "fluuxmpp",
Short: "fluxxIO's xmpp comandline tool", Short: "fluuxIO's xmpp comandline tool",
} }
func main() { func main() {

View file

@ -21,7 +21,7 @@ var isMUCRecipient = false
var cmdSend = &cobra.Command{ var cmdSend = &cobra.Command{
Use: "send <recipient,> [message]", Use: "send <recipient,> [message]",
Short: "is a command-line tool to send to send XMPP messages to users", Short: "is a command-line tool to send to send XMPP messages to users",
Example: `fluxxmpp send to@chat.sum7.eu "Hello World!"`, Example: `fluuxmpp send to@chat.sum7.eu "Hello World!"`,
Args: cobra.ExactArgs(2), Args: cobra.ExactArgs(2),
Run: sendxmpp, Run: sendxmpp,
} }
@ -99,7 +99,7 @@ func init() {
cmdRoot.AddCommand(cmdSend) cmdRoot.AddCommand(cmdSend)
cobra.OnInitialize(initConfigFile) cobra.OnInitialize(initConfigFile)
cmdSend.PersistentFlags().StringVar(&configFile, "config", "", "config file (default is ~/.config/fluxxmpp.yml)") cmdSend.PersistentFlags().StringVar(&configFile, "config", "", "config file (default is ~/.config/fluuxmpp.yml)")
cmdSend.Flags().StringP("jid", "", "", "using jid (required)") cmdSend.Flags().StringP("jid", "", "", "using jid (required)")
viper.BindPFlag("jid", cmdSend.Flags().Lookup("jid")) viper.BindPFlag("jid", cmdSend.Flags().Lookup("jid"))
@ -119,7 +119,7 @@ func initConfigFile() {
viper.SetConfigFile(configFile) viper.SetConfigFile(configFile)
} }
viper.SetConfigName("fluxxmpp") viper.SetConfigName("fluuxmpp")
viper.AddConfigPath("/etc/") viper.AddConfigPath("/etc/")
viper.AddConfigPath("$HOME/.config") viper.AddConfigPath("$HOME/.config")
viper.AddConfigPath(".") viper.AddConfigPath(".")

View file

@ -1,5 +0,0 @@
/*
fluxxmpp: fluxxIO's xmpp comandline tool
*/
package main