Browse Source

Move source code and rename Go module to git.mills.io/yarnsocial/yarn

logo_rebranding
James Mills 3 months ago
parent
commit
0b5b0ed095
Signed by: prologic GPG Key ID: AC4C014F1440EBD6
  1. 2
      .chglog/config.yml
  2. 4
      .goreleaser-darwin.yml
  3. 4
      .goreleaser-linux.yml
  4. 4
      .goreleaser.yml
  5. 2
      Makefile
  6. 26
      README.md
  7. 24
      README_ZH.md
  8. 4
      client/client.go
  9. 2
      cmd/twt/login.go
  10. 2
      cmd/twt/post.go
  11. 8
      cmd/twt/root.go
  12. 4
      cmd/twt/stats.go
  13. 2
      cmd/twt/timeline.go
  14. 2
      cmd/twt/ui.go
  15. 8
      cmd/twtd/main.go
  16. 2
      docs/_config.yml
  17. 3
      go.mod
  18. 2
      go.sum
  19. 6
      internal/api.go
  20. 2
      internal/archive.go
  21. 2
      internal/auth/manager.go
  22. 2
      internal/bitcask_store.go
  23. 2
      internal/blog_handlers.go
  24. 4
      internal/cache.go
  25. 2
      internal/config.go
  26. 6
      internal/context.go
  27. 2
      internal/conversation_handler.go
  28. 2
      internal/follow_handlers.go
  29. 8
      internal/handlers.go
  30. 2
      internal/jobs.go
  31. 2
      internal/models.go
  32. 2
      internal/pages/about.md
  33. 2
      internal/pages/help.md
  34. 10
      internal/server.go
  35. 4
      internal/services.go
  36. 2
      internal/session_store.go
  37. 2
      internal/store.go
  38. 2
      internal/support_handlers.go
  39. 2
      internal/templates.go
  40. 2
      internal/templates/base.html
  41. 2
      internal/templates/page.html
  42. 2
      internal/translator.go
  43. 2
      internal/twt.go
  44. 2
      internal/twtxt_handlers.go
  45. 4
      internal/utils.go
  46. 2
      internal/whofollows_handler.go
  47. 2
      types/lextwt/ast.go
  48. 2
      types/lextwt/lextwt.go
  49. 6
      types/lextwt/lextwt_test.go
  50. 2
      types/lextwt/parser.go
  51. 2
      types/retwt/retwt.go
  52. 4
      types/retwt/retwt_test.go
  53. 6
      types/twt_test.go

2
.chglog/config.yml

@ -3,7 +3,7 @@ style: Github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/jointwt/twtxt
repository_url: https://git.mills.io/yarnsocial/yarn
options:
commits:
filters:

4
.goreleaser-darwin.yml

@ -6,8 +6,8 @@ builds:
flags: -tags "static_build"
ldflags: >-
-w
-X github.com/jointwt/twtxt.Version={{.Version}}
-X github.com/jointwt/twtxt.Commit={{.Commit}}
-X git.mills.io/yarnsocial/yarn.Version={{.Version}}
-X git.mills.io/yarnsocial/yarn.Commit={{.Commit}}
env:
- CGO_ENABLED=0
goos:

4
.goreleaser-linux.yml

@ -6,8 +6,8 @@ builds:
flags: -tags "static_build"
ldflags: >-
-w
-X github.com/jointwt/twtxt.Version={{.Version}}
-X github.com/jointwt/twtxt.Commit={{.Commit}}
-X git.mills.io/yarnsocial/yarn.Version={{.Version}}
-X git.mills.io/yarnsocial/yarn.Commit={{.Commit}}
env:
- CGO_ENABLED=0
goos:

4
.goreleaser.yml

@ -6,8 +6,8 @@ builds:
flags: -tags "static_build"
ldflags: >-
-w
-X github.com/jointwt/twtxt.Version={{.Version}}
-X github.com/jointwt/twtxt.Commit={{.Commit}}
-X git.mills.io/yarnsocial/yarn.Version={{.Version}}
-X git.mills.io/yarnsocial/yarn.Commit={{.Commit}}
env:
- CGO_ENABLED=0
goos:

2
Makefile

@ -64,7 +64,7 @@ test:
@$(GOCMD) test -v -cover -race ./...
bench: bench-twtxt.txt
go test -race -benchtime=1x -cpu 16 -benchmem -bench "^(Benchmark)" github.com/jointwt/twtxt/types
go test -race -benchtime=1x -cpu 16 -benchmem -bench "^(Benchmark)" git.mills.io/yarnsocial/yarn/types
bench-twtxt.txt:
curl -s https://twtxt.net/user/prologic/twtxt.txt > $@

26
README.md

@ -5,15 +5,15 @@
![Docker Pulls](https://img.shields.io/docker/pulls/prologic/twtxt)
![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/prologic/twtxt)
![](https://github.com/jointwt/twtxt/workflows/Coverage/badge.svg)
![](https://github.com/jointwt/twtxt/workflows/Docker/badge.svg)
![](https://github.com/jointwt/twtxt/workflows/Go/badge.svg)
![](https://github.com/jointwt/twtxt/workflows/ReviewDog/badge.svg)
![](https://git.mills.io/yarnsocial/yarn/workflows/Coverage/badge.svg)
![](https://git.mills.io/yarnsocial/yarn/workflows/Docker/badge.svg)
![](https://git.mills.io/yarnsocial/yarn/workflows/Go/badge.svg)
![](https://git.mills.io/yarnsocial/yarn/workflows/ReviewDog/badge.svg)
[![Go Report Card](https://goreportcard.com/badge/jointwt/twtxt)](https://goreportcard.com/report/jointwt/twtxt)
[![codebeat badge](https://codebeat.co/badges/15fba8a5-3044-4f40-936f-9e0f5d5d1fd9)](https://codebeat.co/projects/github-com-prologic-twtxt-master)
[![GoDoc](https://godoc.org/github.com/jointwt/twtxt?status.svg)](https://godoc.org/github.com/jointwt/twtxt)
[![GitHub license](https://img.shields.io/github/license/jointwt/twtxt.svg)](https://github.com/jointwt/twtxt)
[![GoDoc](https://godoc.org/git.mills.io/yarnsocial/yarn?status.svg)](https://godoc.org/git.mills.io/yarnsocial/yarn)
[![GitHub license](https://img.shields.io/github/license/jointwt/twtxt.svg)](https://git.mills.io/yarnsocial/yarn)
📕 twtxt is a Self-Hosted, Twitter™-like Decentralised micro-Blogging platform. No ads, no tracking, your content, your data!
@ -53,18 +53,18 @@ This project offers fully-managed, 1-click instances of this platform we call [T
Please visit [Twt.social](https://twt.social) to get your pod today!
> __NOTE:__ As of 15th Aug 2020 ([comment](https://github.com/jointwt/twtxt/issues/87#issuecomment-674101304) [announcement](https://twtxt.net/twt/zauzpsrkzra) [blog](https://www.prologic.blog/2020/08/15/ann-twtsocial-is.html)), this is completely _FREE_ and we invite anyone to contact us for an invite code to be one of the first few pod owners!
> __NOTE:__ As of 15th Aug 2020 ([comment](https://git.mills.io/yarnsocial/yarn/issues/87#issuecomment-674101304) [announcement](https://twtxt.net/twt/zauzpsrkzra) [blog](https://www.prologic.blog/2020/08/15/ann-twtsocial-is.html)), this is completely _FREE_ and we invite anyone to contact us for an invite code to be one of the first few pod owners!
## Installation
### Pre-built Binaries
__NOTE:__ Please don't use the pre-built binaries until [Issue #250](https://github.com/jointwt/twtxt/issues/250) is resolved.
__NOTE:__ Please don't use the pre-built binaries until [Issue #250](https://git.mills.io/yarnsocial/yarn/issues/250) is resolved.
Please build from source or use the [Docker Images](https://hub.docker.com/jointwt).
Thank you. 🙇‍♂️
As a first point, please try to use one of the pre-built binaries that are
available on the [Releases](https://github.com/jointwt/twtxt/releases) page.
available on the [Releases](https://git.mills.io/yarnsocial/yarn/releases) page.
### Using Homebrew
@ -95,7 +95,7 @@ This is an option if you are familiar with [Go](https://golang.org) development.
1. Clone this repository (_this is important_)
```console
git clone https://github.com/jointwt/twtxt.git
git clone https://git.mills.io/yarnsocial/yarn.git
```
2. Install required dependencies (_this is important_)
@ -284,14 +284,14 @@ Support the ongoing development of twtxt!
**Sponsor**
- Become a [Sponsor](https://www.patreon.com/prologic)
- Contribute! See [Issues](https://github.com/jointwt/twtxt/issues)
- Contribute! See [Issues](https://git.mills.io/yarnsocial/yarn/issues)
## Contributing
Interested in contributing to this project? You are welcome! Here are some ways
you can contribute:
- [File an Issue](https://github.com/jointwt/twtxt/issues/new) -- For a bug,
- [File an Issue](https://git.mills.io/yarnsocial/yarn/issues/new) -- For a bug,
or interesting idea you have for a new feature or just general questions.
- Submit a Pull-Request or two! We welcome all PR(s) that improve the project!
@ -307,7 +307,7 @@ Please see the [Contributing Guidelines](/CONTRIBUTING.md) and checkout the
Thank you to all those that have contributed to this project, battle-tested it, used it in their own projects or products, fixed bugs, improved performance and even fix tiny typos in documentation! Thank you and keep contributing!
You can find an [AUTHORS](/AUTHORS) file where we keep a list of contributors to the project. If you contribute a PR please consider adding your name there. There is also Github's own [Contributors](https://github.com/jointwt/twtxt/graphs/contributors) statistics.
You can find an [AUTHORS](/AUTHORS) file where we keep a list of contributors to the project. If you contribute a PR please consider adding your name there. There is also Github's own [Contributors](https://git.mills.io/yarnsocial/yarn/graphs/contributors) statistics.
[![](https://sourcerer.io/fame/prologic/jointwt/twtxt/images/0)](https://sourcerer.io/fame/prologic/jointwt/twtxt/links/0)
[![](https://sourcerer.io/fame/prologic/jointwt/twtxt/images/1)](https://sourcerer.io/fame/prologic/jointwt/twtxt/links/1)

24
README_ZH.md

@ -5,15 +5,15 @@
![Docker Pulls](https://img.shields.io/docker/pulls/prologic/twtxt)
![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/prologic/twtxt)
![](https://github.com/jointwt/twtxt/workflows/Coverage/badge.svg)
![](https://github.com/jointwt/twtxt/workflows/Docker/badge.svg)
![](https://github.com/jointwt/twtxt/workflows/Go/badge.svg)
![](https://github.com/jointwt/twtxt/workflows/ReviewDog/badge.svg)
![](https://git.mills.io/yarnsocial/yarn/workflows/Coverage/badge.svg)
![](https://git.mills.io/yarnsocial/yarn/workflows/Docker/badge.svg)
![](https://git.mills.io/yarnsocial/yarn/workflows/Go/badge.svg)
![](https://git.mills.io/yarnsocial/yarn/workflows/ReviewDog/badge.svg)
[![Go Report Card](https://goreportcard.com/badge/jointwt/twtxt)](https://goreportcard.com/report/jointwt/twtxt)
[![codebeat badge](https://codebeat.co/badges/15fba8a5-3044-4f40-936f-9e0f5d5d1fd9)](https://codebeat.co/projects/github-com-prologic-twtxt-master)
[![GoDoc](https://godoc.org/github.com/jointwt/twtxt?status.svg)](https://godoc.org/github.com/jointwt/twtxt)
[![GitHub license](https://img.shields.io/github/license/jointwt/twtxt.svg)](https://github.com/jointwt/twtxt)
[![GoDoc](https://godoc.org/git.mills.io/yarnsocial/yarn?status.svg)](https://godoc.org/git.mills.io/yarnsocial/yarn)
[![GitHub license](https://img.shields.io/github/license/jointwt/twtxt.svg)](https://git.mills.io/yarnsocial/yarn)
📕 twtxt是一个类似Twitter™的自托管式分散式微博客平台。没有广告,没有跟踪(针对您的内容和数据)!
@ -56,10 +56,10 @@ Goryon for Twt可在App Store和Play商店中使用。
### 预编译二进制包
注意:在解决[问题#250](https://github.com/jointwt/twtxt/issues/250)之前,请不要使用预构建的二进制文件。请从源代码构建或使用[Docker 镜像](https://hub.docker.com/jointwt)。谢谢你。♂‍♂️
注意:在解决[问题#250](https://git.mills.io/yarnsocial/yarn/issues/250)之前,请不要使用预构建的二进制文件。请从源代码构建或使用[Docker 镜像](https://hub.docker.com/jointwt)。谢谢你。♂‍♂️
首先,请尝试使用[Releases](https://github.com/jointwt/twtxt/releases)页面上可用的预构建二进制包。
首先,请尝试使用[Releases](https://git.mills.io/yarnsocial/yarn/releases)页面上可用的预构建二进制包。
### 使用 Homebrew
@ -89,7 +89,7 @@ twt
1. 克隆仓库 (_重要的_)
```console
git clone https://github.com/jointwt/twtxt.git
git clone https://git.mills.io/yarnsocial/yarn.git
```
2. 安装依赖项 (_重要的_)
@ -271,13 +271,13 @@ docker stack deploy -c twtxt.yml
**赞助**
- 成为赞助商 [赞助商](https://www.patreon.com/prologic)
- Contribute! See [Issues](https://github.com/jointwt/twtxt/issues)
- Contribute! See [Issues](https://git.mills.io/yarnsocial/yarn/issues)
## 贡献
如果您对这个项目有兴趣, 我们很欢迎您通过以下几种方式做出贡献:
- [提交问题](https://github.com/jointwt/twtxt/issues/new) -- 对于任何错误或想法,新功能或常规问题
- [提交问题](https://git.mills.io/yarnsocial/yarn/issues/new) -- 对于任何错误或想法,新功能或常规问题
- 提交一两个PR, 以改进完善项目!
请阅读 [贡献准则](/CONTRIBUTING.md) 和 [开发文档](https://dev.twtxt.net) 或在 [/docs](/docs) 查看更多内容.
@ -290,7 +290,7 @@ docker stack deploy -c twtxt.yml
感谢所有为该项目做出贡献,进行了实战测试,在自己的项目或产品中使用过它,修复了错误,提高了性能甚至修复了文档中的小错字的人!谢谢您,继续为我们贡献力量!
您可以找到一个[AUTHORS](/AUTHORS)文件,其中保存了该项目的贡献者列表。如果您提供公关,请考虑在其中添加您的名字。还有Github自己的贡献者[统计数据](https://github.com/jointwt/twtxt/graphs/contributors)。
您可以找到一个[AUTHORS](/AUTHORS)文件,其中保存了该项目的贡献者列表。如果您提供公关,请考虑在其中添加您的名字。还有Github自己的贡献者[统计数据](https://git.mills.io/yarnsocial/yarn/graphs/contributors)。
[![](https://sourcerer.io/fame/prologic/jointwt/twtxt/images/0)](https://sourcerer.io/fame/prologic/jointwt/twtxt/links/0)
[![](https://sourcerer.io/fame/prologic/jointwt/twtxt/images/1)](https://sourcerer.io/fame/prologic/jointwt/twtxt/links/1)

4
client/client.go

@ -10,8 +10,8 @@ import (
"net/url"
"strings"
"github.com/jointwt/twtxt"
"github.com/jointwt/twtxt/types"
"git.mills.io/yarnsocial/yarn"
"git.mills.io/yarnsocial/yarn/types"
)
var (

2
cmd/twt/login.go

@ -13,7 +13,7 @@ import (
"github.com/spf13/viper"
"golang.org/x/crypto/ssh/terminal"
"github.com/jointwt/twtxt/client"
"git.mills.io/yarnsocial/yarn/client"
)
// loginCmd represents the pub command

2
cmd/twt/post.go

@ -9,7 +9,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/jointwt/twtxt/client"
"git.mills.io/yarnsocial/yarn/client"
)
// postCmd represents the pub command

8
cmd/twt/root.go

@ -10,10 +10,10 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/jointwt/twtxt"
"github.com/jointwt/twtxt/client"
"github.com/jointwt/twtxt/types/lextwt"
"github.com/jointwt/twtxt/types/retwt"
"git.mills.io/yarnsocial/yarn"
"git.mills.io/yarnsocial/yarn/client"
"git.mills.io/yarnsocial/yarn/types/lextwt"
"git.mills.io/yarnsocial/yarn/types/retwt"
)
var configFile string

4
cmd/twt/stats.go

@ -13,8 +13,8 @@ import (
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/jointwt/twtxt/types"
"github.com/jointwt/twtxt/types/lextwt"
"git.mills.io/yarnsocial/yarn/types"
"git.mills.io/yarnsocial/yarn/types/lextwt"
)
// statsCmd represents the stats command

2
cmd/twt/timeline.go

@ -10,7 +10,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/jointwt/twtxt/client"
"git.mills.io/yarnsocial/yarn/client"
)
// timelineCmd represents the pub command

2
cmd/twt/ui.go

@ -5,7 +5,7 @@ import (
"time"
"github.com/dustin/go-humanize"
"github.com/jointwt/twtxt/types"
"git.mills.io/yarnsocial/yarn/types"
)
func red(s string) string {

8
cmd/twtd/main.go

@ -14,10 +14,10 @@ import (
flag "github.com/spf13/pflag"
profiler "github.com/wblakecaldwell/profiler"
"github.com/jointwt/twtxt"
"github.com/jointwt/twtxt/internal"
"github.com/jointwt/twtxt/types/lextwt"
"github.com/jointwt/twtxt/types/retwt"
"git.mills.io/yarnsocial/yarn"
"git.mills.io/yarnsocial/yarn/internal"
"git.mills.io/yarnsocial/yarn/types/lextwt"
"git.mills.io/yarnsocial/yarn/types/retwt"
)
var (

2
docs/_config.yml

@ -16,7 +16,7 @@ google_analytics_id: ''
navigation: 1
# URL to source code, used in _includes/footer.html
codeurl: 'https://github.com/jointwt/twtxt'
codeurl: 'https://git.mills.io/yarnsocial/yarn'
# Default categories (in order) to appear in the navigation
sections: [

3
go.mod

@ -1,4 +1,4 @@
module github.com/jointwt/twtxt
module git.mills.io/yarnsocial/yarn
go 1.16
@ -78,7 +78,6 @@ require (
github.com/steambap/captcha v1.3.1
github.com/stretchr/objx v0.3.0 // indirect
github.com/stretchr/testify v1.6.1
github.com/tdewolff/test v1.0.6
github.com/tebeka/selenium v0.9.9
github.com/theplant-retired/timezones v0.0.0-20150304063004-f9bd3c0ef9db
github.com/unrolled/logger v0.0.0-20201216141554-31a3694fe979

2
go.sum

@ -564,8 +564,6 @@ github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/tdewolff/test v1.0.6 h1:76mzYJQ83Op284kMT+63iCNCI7NEERsIN8dLM+RiKr4=
github.com/tdewolff/test v1.0.6/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE=
github.com/tebeka/selenium v0.9.9 h1:cNziB+etNgyH/7KlNI7RMC1ua5aH1+5wUlFQyzeMh+w=
github.com/tebeka/selenium v0.9.9/go.mod h1:5Fr8+pUvU6B1OiPfkdCKdXZyr5znvVkxuPd0NOdZCQc=
github.com/theplant-retired/timezones v0.0.0-20150304063004-f9bd3c0ef9db h1:GR7pnc5jsfbipCXU7n1ABMO6Hm3sYvylfSE+fMuNsBk=

6
internal/api.go

@ -19,9 +19,9 @@ import (
"github.com/vcraescu/go-paginator"
"github.com/vcraescu/go-paginator/adapter"
"github.com/jointwt/twtxt"
"github.com/jointwt/twtxt/internal/passwords"
"github.com/jointwt/twtxt/types"
"git.mills.io/yarnsocial/yarn"
"git.mills.io/yarnsocial/yarn/internal/passwords"
"git.mills.io/yarnsocial/yarn/types"
)
// ContextKey ...

2
internal/archive.go

@ -12,7 +12,7 @@ import (
log "github.com/sirupsen/logrus"
"github.com/jointwt/twtxt/types"
"git.mills.io/yarnsocial/yarn/types"
)
const (

2
internal/auth/manager.go

@ -5,7 +5,7 @@ import (
"github.com/julienschmidt/httprouter"
"github.com/jointwt/twtxt/internal/session"
"git.mills.io/yarnsocial/yarn/internal/session"
)
// Options ...

2
internal/bitcask_store.go

@ -7,7 +7,7 @@ import (
"github.com/prologic/bitcask"
log "github.com/sirupsen/logrus"
"github.com/jointwt/twtxt/internal/session"
"git.mills.io/yarnsocial/yarn/internal/session"
)
const (

2
internal/blog_handlers.go

@ -11,7 +11,7 @@ import (
"github.com/gomarkdown/markdown"
"github.com/gomarkdown/markdown/html"
"github.com/gomarkdown/markdown/parser"
"github.com/jointwt/twtxt/types"
"git.mills.io/yarnsocial/yarn/types"
"github.com/julienschmidt/httprouter"
"github.com/securisec/go-keywords"
log "github.com/sirupsen/logrus"

4
internal/cache.go

@ -16,8 +16,8 @@ import (
"github.com/dustin/go-humanize"
log "github.com/sirupsen/logrus"
"github.com/jointwt/twtxt"
"github.com/jointwt/twtxt/types"
"git.mills.io/yarnsocial/yarn"
"git.mills.io/yarnsocial/yarn/types"
)
const (

2
internal/config.go

@ -13,7 +13,7 @@ import (
"github.com/gabstv/merger"
"github.com/goccy/go-yaml"
"github.com/jointwt/twtxt/types"
"git.mills.io/yarnsocial/yarn/types"
log "github.com/sirupsen/logrus"
)

6
internal/context.go

@ -10,9 +10,9 @@ import (
log "github.com/sirupsen/logrus"
"github.com/vcraescu/go-paginator"
"github.com/jointwt/twtxt"
"github.com/jointwt/twtxt/internal/session"
"github.com/jointwt/twtxt/types"
"git.mills.io/yarnsocial/yarn"
"git.mills.io/yarnsocial/yarn/internal/session"
"git.mills.io/yarnsocial/yarn/types"
"github.com/justinas/nosurf"
"github.com/theplant-retired/timezones"
)

2
internal/conversation_handler.go

@ -13,7 +13,7 @@ import (
"github.com/vcraescu/go-paginator"
"github.com/vcraescu/go-paginator/adapter"
"github.com/jointwt/twtxt/types"
"git.mills.io/yarnsocial/yarn/types"
)
// ConversationHandler ...

2
internal/follow_handlers.go

@ -8,7 +8,7 @@ import (
"regexp"
"strings"
"github.com/jointwt/twtxt"
"git.mills.io/yarnsocial/yarn"
"github.com/julienschmidt/httprouter"
log "github.com/sirupsen/logrus"
)

8
internal/handlers.go

@ -32,8 +32,8 @@ import (
"github.com/vcraescu/go-paginator/adapter"
"gopkg.in/yaml.v2"
"github.com/jointwt/twtxt/internal/session"
"github.com/jointwt/twtxt/types"
"git.mills.io/yarnsocial/yarn/internal/session"
"git.mills.io/yarnsocial/yarn/types"
)
const (
@ -475,7 +475,7 @@ func (s *Server) AvatarHandler() httprouter.Handle {
// Apple iOS 14.x is lying. It claims it can support WebP and sends
// an Accept: image/webp,... however it doesn't render the WebP
// correctly at all.
// XXX: https://github.com/jointwt/twtxt/issues/337 for details
// XXX: https://git.mills.io/yarnsocial/yarn/issues/337 for details
if preferredContentType == "image/webp" && strings.Contains(r.UserAgent(), "iPhone OS 14") {
preferredContentType = "image/png"
}
@ -1638,7 +1638,7 @@ func (s *Server) ExternalAvatarHandler() httprouter.Handle {
// Apple iOS 14.x is lying. It claims it can support WebP and sends
// an Accept: image/webp,... however it doesn't render the WebP
// correctly at all.
// XXX: https://github.com/jointwt/twtxt/issues/337 for details
// XXX: https://git.mills.io/yarnsocial/yarn/issues/337 for details
if preferredContentType == "image/webp" && strings.Contains(r.UserAgent(), "iPhone OS 14") {
preferredContentType = "image/png"
}

2
internal/jobs.go

@ -3,7 +3,7 @@ package internal
import (
"fmt"
"github.com/jointwt/twtxt/types"
"git.mills.io/yarnsocial/yarn/types"
"github.com/robfig/cron"
log "github.com/sirupsen/logrus"
)

2
internal/models.go

@ -12,7 +12,7 @@ import (
"time"
"github.com/creasty/defaults"
"github.com/jointwt/twtxt/types"
"git.mills.io/yarnsocial/yarn/types"
log "github.com/sirupsen/logrus"
)

2
internal/pages/about.md

@ -33,7 +33,7 @@ that are provided:
- Supports [wee-are-twtxt](https://github.com/jointwt/we-are-twtxt) feed sources format for discovering external feeds
- Supports [IndieWeb[(https://indieweb.org/) formats and [WebMention(https://www.w3.org/TR/webmention/)
For a list of upcoming features please follow the [Project Page](https://github.com/jointwt/twtxt) on Github.
For a list of upcoming features please follow the [Project Page](https://git.mills.io/yarnsocial/yarn) on Github.
For additional help on how to use twtxt and this instance {{ .InstanceName }}
please see the [/help](/help) page or contact [/support](/support) for help.

2
internal/pages/help.md

@ -47,7 +47,7 @@ title: Help on how to use Twtxt.net
<details>
<summary>How do I format my posts?</summary>
The software that powers this pod {{ .InstanceName }} ([jointwt/twtxt](https://github.com/jointwt/twtxt))
The software that powers this pod {{ .InstanceName }} ([jointwt/twtxt](https://git.mills.io/yarnsocial/yarn))
supports what's called [Markdown](https://en.wikipedia.org/wiki/Markdown).
(_It actually support the full syntax of Markdown really but it is not recommended as twtxt posts are limited to single lines and length_)

10
internal/server.go

@ -25,11 +25,11 @@ import (
log "github.com/sirupsen/logrus"
"github.com/unrolled/logger"
"github.com/jointwt/twtxt"
"github.com/jointwt/twtxt/internal/auth"
"github.com/jointwt/twtxt/internal/passwords"
"github.com/jointwt/twtxt/internal/session"
"github.com/jointwt/twtxt/internal/webmention"
"git.mills.io/yarnsocial/yarn"
"git.mills.io/yarnsocial/yarn/internal/auth"
"git.mills.io/yarnsocial/yarn/internal/passwords"
"git.mills.io/yarnsocial/yarn/internal/session"
"git.mills.io/yarnsocial/yarn/internal/webmention"
)
var (

4
internal/services.go

@ -16,13 +16,13 @@ import (
"time"
"github.com/emersion/go-message"
"github.com/jointwt/twtxt/internal/passwords"
"git.mills.io/yarnsocial/yarn/internal/passwords"
"github.com/marcinwyszynski/popart"
"github.com/prologic/smtpd"
log "github.com/sirupsen/logrus"
"golang.org/x/crypto/bcrypt"
"github.com/jointwt/twtxt"
"git.mills.io/yarnsocial/yarn"
)
func parseAddresses(addrs []string) ([]*mail.Address, error) {

2
internal/session_store.go

@ -6,7 +6,7 @@ import (
"github.com/patrickmn/go-cache"
log "github.com/sirupsen/logrus"
"github.com/jointwt/twtxt/internal/session"
"git.mills.io/yarnsocial/yarn/internal/session"
)
// SessionStore ...

2
internal/store.go

@ -4,7 +4,7 @@ import (
"errors"
"fmt"
"github.com/jointwt/twtxt/internal/session"
"git.mills.io/yarnsocial/yarn/internal/session"
)
var (

2
internal/support_handlers.go

@ -5,7 +5,7 @@ import (
"net/http"
"strings"
"github.com/jointwt/twtxt/internal/session"
"git.mills.io/yarnsocial/yarn/internal/session"
"github.com/julienschmidt/httprouter"
log "github.com/sirupsen/logrus"
"github.com/steambap/captcha"

2
internal/templates.go

@ -14,7 +14,7 @@ import (
"github.com/Masterminds/sprig"
humanize "github.com/dustin/go-humanize"
"github.com/jointwt/twtxt/types"
"git.mills.io/yarnsocial/yarn/types"
log "github.com/sirupsen/logrus"
)

2
internal/templates/base.html

@ -141,7 +141,7 @@
{{template "content" . }}
</main>
<footer class="container">
<div class="footer-copyright"><a href="https://github.com/jointwt/twtxt" target="_blank">twtxt v{{ .SoftwareVersion }}</a>
<div class="footer-copyright"><a href="https://git.mills.io/yarnsocial/yarn" target="_blank">twtxt v{{ .SoftwareVersion }}</a>
·
{{(tr . "CopyrightCreator")|html}}
·

2
internal/templates/page.html

@ -7,7 +7,7 @@
This is a <a href="https://twt.social">Twt.Social</a> pod.
If you would like your own pod, please contact <a href="https://twt.social/support">support</a>.
::
<a href="https://github.com/jointwt/twtxt/edit/master/internal/pages/{{ .Page }}.md">Edit on github</a>
<a href="https://git.mills.io/yarnsocial/yarn/edit/master/internal/pages/{{ .Page }}.md">Edit on github</a>
</footer>
</div>
</article>

2
internal/translator.go

@ -8,7 +8,7 @@ import (
"github.com/nicksnyder/go-i18n/v2/i18n"
"golang.org/x/text/language"
"github.com/jointwt/twtxt/internal/langs"
"git.mills.io/yarnsocial/yarn/internal/langs"
)
type Translator struct {

2
internal/twt.go

@ -13,7 +13,7 @@ import (
read_file_last_line "github.com/prologic/read-file-last-line"
log "github.com/sirupsen/logrus"
"github.com/jointwt/twtxt/types"
"git.mills.io/yarnsocial/yarn/types"
)
const (

2
internal/twtxt_handlers.go

@ -10,7 +10,7 @@ import (
"strings"
securejoin "github.com/cyphar/filepath-securejoin"
"github.com/jointwt/twtxt/types"
"git.mills.io/yarnsocial/yarn/types"
"github.com/julienschmidt/httprouter"
log "github.com/sirupsen/logrus"
)

4
internal/utils.go

@ -43,8 +43,8 @@ import (
"github.com/gomarkdown/markdown/parser"
"github.com/goware/urlx"
"github.com/h2non/filetype"
"github.com/jointwt/twtxt"
"github.com/jointwt/twtxt/types"
"git.mills.io/yarnsocial/yarn"
"git.mills.io/yarnsocial/yarn/types"
shortuuid "github.com/lithammer/shortuuid/v3"
"github.com/microcosm-cc/bluemonday"
"github.com/nullrocks/identicon"

2
internal/whofollows_handler.go

@ -6,7 +6,7 @@ import (
"net/http"
"github.com/julienschmidt/httprouter"
"github.com/jointwt/twtxt/types"
"git.mills.io/yarnsocial/yarn/types"
log "github.com/sirupsen/logrus"
)

2
types/lextwt/ast.go

@ -10,7 +10,7 @@ import (
"strings"
"time"
"github.com/jointwt/twtxt/types"
"git.mills.io/yarnsocial/yarn/types"
"golang.org/x/crypto/blake2b"
)

2
types/lextwt/lextwt.go

@ -6,7 +6,7 @@ import (
"strings"
"time"
"github.com/jointwt/twtxt/types"
"git.mills.io/yarnsocial/yarn/types"
log "github.com/sirupsen/logrus"
)

6
types/lextwt/lextwt_test.go

@ -9,9 +9,9 @@ import (
"testing"
"time"
"github.com/jointwt/twtxt/types"
"github.com/jointwt/twtxt/types/lextwt"
"github.com/jointwt/twtxt/types/retwt"
"git.mills.io/yarnsocial/yarn/types"
"git.mills.io/yarnsocial/yarn/types/lextwt"
"git.mills.io/yarnsocial/yarn/types/retwt"
"github.com/matryer/is"
)

2
types/lextwt/parser.go

@ -8,7 +8,7 @@ import (
"time"
"unicode"
"github.com/jointwt/twtxt/types"
"git.mills.io/yarnsocial/yarn/types"
)
// Parser

2
types/retwt/retwt.go

@ -12,7 +12,7 @@ import (
"strings"
"time"
"github.com/jointwt/twtxt/types"
"git.mills.io/yarnsocial/yarn/types"
log "github.com/sirupsen/logrus"
"golang.org/x/crypto/blake2b"
)

4
types/retwt/retwt_test.go

@ -5,8 +5,8 @@ import (
"testing"
"time"
"github.com/jointwt/twtxt/types"
"github.com/jointwt/twtxt/types/retwt"
"git.mills.io/yarnsocial/yarn/types"
"git.mills.io/yarnsocial/yarn/types/retwt"
"github.com/stretchr/testify/assert"
)

6
types/twt_test.go

@ -9,9 +9,9 @@ import (
"strings"
"testing"
"github.com/jointwt/twtxt/types"
"github.com/jointwt/twtxt/types/lextwt"
"github.com/jointwt/twtxt/types/retwt"
"git.mills.io/yarnsocial/yarn/types"
"git.mills.io/yarnsocial/yarn/types/lextwt"
"git.mills.io/yarnsocial/yarn/types/retwt"
"github.com/matryer/is"
)

Loading…
Cancel
Save