From 6dd01e129cea01bf590cfdfb9eca2430e52cce33 Mon Sep 17 00:00:00 2001 From: Ben Morrison Date: Sat, 20 Jun 2020 02:51:54 -0400 Subject: updated readme to reflect sourcehut --- README.md | 75 +++++++++++++++++++++++++-------------------------------------- 1 file changed, 30 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index 7f831fa..f8e734c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# getwtxt  [![Build Status](https://travis-ci.com/getwtxt/getwtxt.svg?branch=master)](https://travis-ci.com/getwtxt/getwtxt) [![Go Report Card](https://goreportcard.com/badge/github.com/getwtxt/getwtxt)](https://goreportcard.com/report/github.com/getwtxt/getwtxt) [![Code Climate Maintainability](https://api.codeclimate.com/v1/badges/0e48bd9002de0f84b24e/maintainability)](https://codeclimate.com/github/getwtxt/getwtxt/maintainability) +# getwtxt  [![builds.sr.ht status](https://builds.sr.ht/~gbmor/getwtxt.svg)](https://builds.sr.ht/~gbmor/getwtxt?) [![Build Status](https://travis-ci.com/getwtxt/getwtxt.svg?branch=master)](https://travis-ci.com/getwtxt/getwtxt) [![Go Report Card](https://goreportcard.com/badge/github.com/getwtxt/getwtxt)](https://goreportcard.com/report/github.com/getwtxt/getwtxt) [![Code Climate Maintainability](https://api.codeclimate.com/v1/badges/0e48bd9002de0f84b24e/maintainability)](https://codeclimate.com/github/getwtxt/getwtxt/maintainability) twtxt registry written in Go! @@ -9,17 +9,19 @@ Registries are designed to aggregate several users' statuses into a single locat facilitating the discovery of new users to follow and allowing the search of statuses for tags and key words. -  -\[ [Installation](#installation) \] -  \[ [Upgrading](#upgrading) \] -  \[ [Configuration](#configuration) \] -  \[ [Using the Registry](#using-the-registry) \] -  \[ [Benchmarks](#benchmarks) \] -  \[ [Other Documentation](#other-documentation) \] -  \[ [Notes](#notes) \] + + + + + + + + + + +
[Installation][Upgrading][Configuration][Using the Registry][Benchmarks][Other Documentation][Notes]
## Features - [![GitHub release](https://img.shields.io/github/release/getwtxt/getwtxt.svg)](https://github.com/getwtxt/getwtxt/releases/latest) * Easy to set up * Uses an in-memory cache to serve requests @@ -33,50 +35,32 @@ for tags and key words. * [twtxt.tilde.institute](https://twtxt.tilde.institute) * [twtxt.envs.net](https://twtxt.envs.net/) -Would you like your instance listed? Submit a PR or shoot me an email :) +Would you like your instance listed? Send a message to the [mailing list](https://lists.sr.ht/~gbmor/getwtxt)! ## Installation -I have only personally tested getwtxt on Linux, specifically: -* `Debian 9, 10/Testing, Sid` +I have tested getwtxt on the following: +* `Debian 9, 10` * `Ubuntu Server 18.04LTS, 18.10, 19.04` +* `OpenBSD 6.6` Build dependencies are minimal, and only include: -* `gnu make` +* `make` * `go >= 1.11` * `git` First, fetch the sources using `git` and jump into the directory. ``` -$ git clone git://github.com/getwtxt/getwtxt.git +$ git clone https://git.sr.ht/~gbmor/getwtxt ... $ cd getwtxt ``` Then, check out the latest release tag. -This will be the same tag listed on the badge under the [Features](#features) section heading. - -``` -$ git checkout v0.0.0 -``` - -Or, if you want to be a `git` ninja, you can use this to just check out whatever -the latest tag is: - ``` $ git checkout $(git describe --tags --abbrev=0) - -``` - -Optionally, use the `go` tool to test and benchmark the files in `svc`. - -``` -$ go test -v -bench . -benchmem ./... -... -... -PASS ``` Use `make` to initiate the build and install process. @@ -189,10 +173,10 @@ queries support the `?page=N` parameter, where `N` is a positive integer, that w The example API calls can also be found on the landing page of any getwtxt instance, assuming the admin has not customized the landing page. -* [twtxt.tilde.institute](https://twtxt.tilde.institute) ### Adding a User Both nickname and URL are required + ``` $ curl -X POST 'https://twtxt.example.com/api/plain/users?url=https://mysite.ext/twtxt.txt&nickname=FooJr' @@ -200,6 +184,7 @@ $ curl -X POST 'https://twtxt.example.com/api/plain/users?url=https://mysite.ext ``` ### Get All Tweets + ``` $ curl 'https://twtxt.example.com/api/plain/tweets' @@ -209,6 +194,7 @@ foo_barrington https://foo.bar.ext/twtxt.txt 2019-03-01T09:31:02.000Z Hey! It' ``` ### Query Tweets by Keyword + ``` $ curl 'https://twtxt.example.com/api/plain/tweets?q=getwtxt' @@ -245,6 +231,7 @@ foo_barrington https://example3.com/twtxt.txt 2019-05-01T15:59:39.000Z ### Get all tweets with mentions Mentions are placed within a status using the format `@` + ``` $ curl 'https://twtxt.tilde.institute/api/plain/mentions' @@ -254,6 +241,7 @@ foo_barrington https://example3.com/twtxt.txt 2019-02-26T11:06:44.000Z ``` ### Query tweets by mention URL + ``` $ curl 'https://twtxt.tilde.institute/api/plain/mentions?url=https://foobarrington.co.uk/twtxt.txt' @@ -261,6 +249,7 @@ foo https://example.com/twtxt.txt 2019-02-26T11:06:44.000Z @