truthbrush

API client for Truth Social

https://github.com/stanfordio/truthbrush

Science Score: 52.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
    Organization stanfordio has institutional domain (io.stanford.edu)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.0%) to scientific vocabulary
Last synced: 9 months ago · JSON representation ·

Repository

API client for Truth Social

Basic Info
  • Host: GitHub
  • Owner: stanfordio
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Size: 201 KB
Statistics
  • Stars: 248
  • Watchers: 10
  • Forks: 67
  • Open Issues: 15
  • Releases: 3
Created over 4 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation Security

README.md

truthbrush

Truthbrush is an API client for Truth Social. Truthbrush is built and maintained by the Stanford Internet Observatory.

Currently, this tool can:

  • Search for users, statuses, groups, or hashtags
  • Pull a user's statuses
  • Pull the list of "People to Follow" or suggested users
  • Pull "trending" hashtags
  • Pull "trending" Truth posts
  • Pull ads
  • Pull a user's metadata
  • Pull the list of users who liked a post
  • Pull the list of comments on a post
  • Pull "trending" groups
  • Pull list of suggested groups
  • Pull "trending" group hashtags
  • Pull posts from group timeline

Truthbrush is designed for academic research, open source intelligence gathering, and data archival. It pulls all data from the publicly accessible API.

Installation

Truthbrush is not yet available on PyPI. To install it, run pip install git+https://github.com/stanfordio/truthbrush.git, or clone the repository and run pip3 install .. Provided your pip is setup correctly, this will make truthbrush available both as a command and as a Python package. Note that Truthbrush requires Python 3.9 or higher.

After installation, you will need to set your Truth Social username and password as environmental variables.

export TRUTHSOCIAL_USERNAME=foo

export TRUTHSOCIAL_PASSWORD=bar

You may also set these variables in a .env file in the directory from which you are running Truthbrush.

CLI Usage

```text Usage: truthbrush [OPTIONS] COMMAND [ARGS]...

Options: --help Show this message and exit.

Commands: search Search for users, statuses or hashtags. statuses Pull a user's statuses. suggestions Pull the list of suggested users. tags Pull trendy tags. trends Pull trendy Truths. ads Pull ads. user Pull a user's metadata. likes Pull the list of users who liked a post comments Pull the list of oldest comments on a post groupposts Pull posts from a groups's timeline grouptags Pull trending group tags. grouptrends Pull trending groups. groupsuggestions Pull list of suggested groups.

``````

Search for users, statuses, groups, or hashtags

bash truthbrush search --searchtype [accounts|statuses|hashtags|groups] QUERY

Pull all statuses (posts) from a user

bash truthbrush statuses HANDLE

Pull "People to Follow" (suggested) users

bash truthbrush suggestions Pull trendy tags

bash truthbrush tags Pull ads

bash truthbrush ads

Pull all of a user's metadata

bash truthbrush user HANDLE

Pull the list of users who liked a post

bash truthbrush likes POST --includeall TOP_NUM

Pull the list of oldest comments on a post

bash truthbrush comments POST --includeall --onlyfirst TOP_NUM

Pull trending group tags

bash truthbrush grouptags

Pull trending groups

bash truthbrush grouptrends

Pull list of suggested groups

bash truthbrush groupsuggestions

Pull posts from a group's timeline

bash truthbrush groupposts GROUP_ID

Contributing

Contributions are encouraged! For small bug fixes and minor improvements, feel free to just open a PR. For larger changes, please open an issue first so that other contributors can discuss your plan, avoid duplicated work, and ensure it aligns with the goals of the project. Be sure to also follow the code of conduct. Thanks!

Development setup (ensure you have Poetry installed):

sh poetry install poetry shell truthbrush --help # will use your local copy of truthbrush

If you prefer not to install Poetry in your root environment, you can also use Conda:

```sh conda create -n truthbrush-env python=3.9 conda activate truthbrush-env

conda install -c conda-forge poetry poetry install ```

To run the tests:

```sh pytest

optionally run tests with verbose logging outputs:

pytest --log-cli-level=DEBUG -s ```

Please format your code with black:

sh black .

Wishlist

Support for the following capabilities is planned:

  • ...nothing right now! (Got an idea? Submit an issue/PR!)

Owner

  • Name: Stanford Internet Observatory
  • Login: stanfordio
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
message: "Feel free to cite this software in your research."
authors:
  - family-names: McCain
    given-names: Miles
  - family-names: Thiel
    given-names: David
    orcid: https://orcid.org/0000-0002-0947-5921
title: "Truthbrush"
version: 0.1.8
date-released: 2022-02-26
url: https://github.com/stanfordio/truthbrush

GitHub Events

Total
  • Issues event: 10
  • Watch event: 125
  • Issue comment event: 39
  • Pull request event: 2
  • Pull request review event: 2
  • Pull request review comment event: 2
  • Fork event: 43
Last Year
  • Issues event: 10
  • Watch event: 125
  • Issue comment event: 39
  • Pull request event: 2
  • Pull request review event: 2
  • Pull request review comment event: 2
  • Fork event: 43

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 6
  • Total pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 6
  • Total pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 6
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 6
  • Pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • mmosleh (3)
  • eelegiap (1)
  • yayoimizuha (1)
  • meln-ds (1)
  • kevin-hermeneutic (1)
  • barripdmx (1)
  • piotr-struzik (1)
  • ShawnPersonalProjects (1)
  • jason-lange (1)
  • s2t2 (1)
  • AntonioBergallo (1)
  • AndySharez (1)
Pull Request Authors
  • s2t2 (2)
  • Ashleydai2003 (2)
  • medhyaGoel (2)
  • pr-maia (1)
  • dale-wahl (1)
  • dependabot[bot] (1)
  • field-cady (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 880 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
pypi.org: truthbrush

API client for Truth Social

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 880 Last month
Rankings
Dependent packages count: 9.1%
Average: 38.7%
Dependent repos count: 68.3%
Maintainers (1)
Last synced: 10 months ago

Dependencies

poetry.lock pypi
  • astroid 2.9.3 develop
  • atomicwrites 1.4.0 develop
  • attrs 21.4.0 develop
  • black 22.1.0 develop
  • iniconfig 1.1.1 develop
  • isort 5.10.1 develop
  • lazy-object-proxy 1.7.1 develop
  • mccabe 0.6.1 develop
  • mypy-extensions 0.4.3 develop
  • packaging 21.3 develop
  • pathspec 0.9.0 develop
  • platformdirs 2.5.1 develop
  • pluggy 1.0.0 develop
  • py 1.11.0 develop
  • pylint 2.12.2 develop
  • pyparsing 3.0.7 develop
  • pytest 7.0.1 develop
  • toml 0.10.2 develop
  • tomli 2.0.1 develop
  • typing-extensions 4.1.1 develop
  • wrapt 1.13.3 develop
  • certifi 2021.10.8
  • charset-normalizer 2.0.12
  • click 8.0.4
  • colorama 0.4.4
  • idna 3.3
  • loguru 0.6.0
  • python-dateutil 2.8.2
  • python-dotenv 0.19.2
  • requests 2.27.1
  • six 1.16.0
  • urllib3 1.26.8
  • win32-setctime 1.1.0
pyproject.toml pypi
  • black ^22.1.0 develop
  • pylint ^2.12.2 develop
  • pytest ^7.0.1 develop
  • click ^8.0.4
  • loguru ^0.6.0
  • python ^3.9
  • python-dateutil ^2.8.2
  • python-dotenv ^0.19.2
  • requests ^2.27.1
.github/workflows/publish-to-pypi.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
  • pypa/gh-action-pypi-publish release/v1 composite
  • snok/install-poetry v1 composite