proma

command module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: MIT Imports: 1 Imported by: 0

README

proma

proma is a CLI tool for querying data via the Mastodon API.

Usage:
  proma [command]

Available Commands:
  auth        Authenticate with a Mastodon server.
  collect     Collects and aggregates tagged posts
  links       Extract links from any saved bookmarks
  help        Help about any command

Flags:
  -c, --config string     config file (default is $HOME/.proma.json)
  -h, --help              help for proma
  -s, --servers strings   server names to check (default [mastodon.social])
  -v, --verbose           verbose mode

Use "proma [command] --help" for more information about a command.

Examples

# creates a list of embedded links from bookmarked posts
./proma links --limit 2
[
  {
    "profileName": "megmaker",
    "profileURL": "https://mastodon.social/@megmaker",
    "URL": "https://mastodon.social/@megmaker/109291500135871673",
    "linkRef": "https://www.pcmag.com/how-to/how-to-get-started-on-mastodon-and-leave-twitter-behind"
  },
  {
    "profileName": "mykalmachon",
    "profileURL": "https://indieweb.social/@mykalmachon",
    "URL": "https://indieweb.social/@mykalmachon/109299730701767558",
    "linkRef": "https://mykal.codes/posts/why-every-company-is-a-tech-company/"
  }
]
Collecting posts by hashtag across multiple instances
# collects posts containing hashtags 'streetphotography' OR 'london'
./proma collect -t streetphotography,london -s mastodon.cloud,indieweb.social,social.linux.pizza
collecting from server: https://mastodon.cloud
collecting from server: https://indieweb.social
collecting from server: https://social.linux.pizza
...
[
  {
    "uri": "https://photog.social/users/keirgravil/statuses/109377529017885305",
    "lang": "en",
    "content": "\u003cp\u003eCute little mushroom I spotted whilst out walking a section...",
    "tag_list": [
      "photography",
      "london",
      "autumn"
    ],
    "created_at": "2022-11-20T18:24:03Z"
  },
  {
    "uri": "https://mastodon.social/users/jesswade/statuses/109377446881326502",
    "lang": "en",
    "content": "...",
    "tag_list": [
      "london",
      "urbanphotography"
    ],
    "created_at": "2022-11-20T18:03:10Z"
  }
  ...
]

Documentation

Overview

Copyright © 2022 Ivan Moscoso

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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