gweet

command module
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2017 License: GPL-3.0 Imports: 20 Imported by: 0

README

gweet is a sharenix plugin that uploads images and videos to twitter. It can also act as a standalone command line twitter client (it can only update your status and post media though).

Getting started

  • Download the binaries from the releases section.
  • Extract them and copy them to the plugins directory:
    
        tar -zxvf gweet-linux-amd64.tar.gz
        mkdir ~/.sharenix/plugins
        cp ./gweet-linux-amd64/gweet ~/.sharenix/plugins
    
    
  • Edit your sharenix.json config file:
    
    gedit ~/.sharenix/sharenix.json
    
    
    and add the following entry at the top of "Services":
    
      	{
      		"Name": "twitter (gweet)",
      		"RequestType": "PLUGIN",
      		"RequestURL": "gweet",
      		"FileFormName": "",
      		"Arguments": {
      			"_tail": "$input$"
      		},
      		"ResponseType": "Text",
      		"RegexList": [],
      		"URL": "",
      		"ThumbnailURL": "",
      		"DeletionURL": ""
      	}, 
    
    
  • Configure gweet with your twitter account by running
    
    ~/.sharenix/plugins/gweet -config
    
    
    You can run this again to add as many accounts as you like or overwrite old ones. The default account will always be the first one you added. Accounts and the Default Account are stored in plugins/gweet.json .
  • Upload something by using the newly added service, such as:
    
    sharenix -c -n -o -s="twitter (gweet)" /path/to/file.png
    
    

Marking your media as sensitive


	{
		"Name": "twitter (gweet)",
		"RequestType": "PLUGIN",
		"RequestURL": "gweet",
		"FileFormName": "",
		"Arguments": {
			"_tail": "$input$", 
			"lewd": "true"
		},
		"ResponseType": "Text",
		"RegexList": [],
		"URL": "",
		"ThumbnailURL": "",
		"DeletionURL": ""
	}, 
	

Uploading to a non-default account


	{
		"Name": "twitter (gweet)",
		"RequestType": "PLUGIN",
		"RequestURL": "gweet",
		"FileFormName": "",
		"Arguments": {
			"_tail": "$input$", 
			"account": "Other account name"
		},
		"ResponseType": "Text",
		"RegexList": [],
		"URL": "",
		"ThumbnailURL": "",
		"DeletionURL": ""
	}, 
	

Adding a status text to your uploads


	{
		"Name": "twitter (gweet)",
		"RequestType": "PLUGIN",
		"RequestURL": "gweet",
		"FileFormName": "",
		"Arguments": {
			"_tail": "$input$", 
			"text": "Uploaded from ShareNix"
		},
		"ResponseType": "Text",
		"RegexList": [],
		"URL": "",
		"ThumbnailURL": "",
		"DeletionURL": ""
	}, 
	

Building the plugin from source


go get github.com/ChimeraCoder/anaconda
go get github.com/garyburd/go-oauth/oauth
go get github.com/kardianos/osext
go get github.com/Francesco149/gweet
cd $GOPATH/src/github.com/Francesco149/gweet
go build ./...
cp ./gweet ~/.sharenix/plugins

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL