Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ivan3bx/proma
Command line tool to inspect and extract data from Mastodon
https://github.com/ivan3bx/proma
api cobra-cli golang mastodon oauth2
Last synced: 3 days ago
JSON representation
Command line tool to inspect and extract data from Mastodon
- Host: GitHub
- URL: https://github.com/ivan3bx/proma
- Owner: ivan3bx
- License: mit
- Created: 2022-11-07T18:56:22.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-18T01:35:23.000Z (over 1 year ago)
- Last Synced: 2024-04-13T21:04:58.671Z (7 months ago)
- Topics: api, cobra-cli, golang, mastodon, oauth2
- Language: Go
- Homepage:
- Size: 60.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# proma
```text
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 commandFlags:
-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 modeUse "proma [command] --help" for more information about a command.
```## Examples
### Extracting links from saved bookmarks
```bash
# creates a list of embedded links from bookmarked posts
./proma links --limit 2
``````json
[
{
"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
```bash
# 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
...
``````json
[
{
"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"
}
...
]
```