From d312efcf1b46615f43a9350f8431e5cb3b4b03ef Mon Sep 17 00:00:00 2001 From: makeworld Date: Fri, 4 Sep 2020 21:03:07 -0400 Subject: [PATCH 01/13] =?UTF-8?q?=F0=9F=93=9D=20Windows=20Term=20UTF-8=20l?= =?UTF-8?q?ink,=20watching=20releases,=20+?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c02d3f3..fe7c46a 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Amfora aims to be the best looking [Gemini](https://gemini.circumlunar.space/) client with the most features... all in the terminal. It does not support Gopher or other non-Web protocols - check out [Bombadillo](http://bombadillo.colorfield.space/) for that. -It also aims to be completely cross platform, with full Windows support. If you're on Windows, I would not recommend using the default terminal software. Use [Windows Terminal](https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701) instead. Note that some of the application colors might not display correctly on Windows, but all functionality will still work. +It also aims to be completely cross platform, with full Windows support. If you're on Windows, I would not recommend using the default terminal software. Use [Windows Terminal](https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701) instead, and make sure it [works with UTF-8](https://akr.am/blog/posts/using-utf-8-in-the-windows-terminal). Note that some of the application colors might not display correctly on Windows, but all functionality will still work. It fully passes Sean Conman's client torture test, including the new Unicode tests. It mostly passes the Egsam test. @@ -37,6 +37,9 @@ curl -sSL https://raw.githubusercontent.com/makeworld-the-better-one/amfora/mast update-desktop-database ~/.local/share/applications ``` +Make sure to click "Watch" > "Releases only" in the top right to get notified about new releases! + + ### Arch Linux Arch Linux users can install Amfora from AUR. It has the package name `amfora`, and is maintained by @pboyd. @@ -59,7 +62,9 @@ brew upgrade amfora ### From Source This section is for programmers who want to install from source. Make sure you're using Go 1.13 at least, as earlier versions will fail to build. -The recommended way of installing Amfora fom source is using the Makefile. Note that this requires GNU Make, so use the `gmake` (not `make`) command on macOS. You may have to install it with `brew install make`. On Windows, you can install [Chocolatey](https://chocolatey.org/install) and run `choco install make`. +The recommended way of installing Amfora fom source is using the Makefile. On Windows, you need install make, which can be done with [Chocolatey](https://chocolatey.org/install): `choco install make`. + +If you have issues running the `make` command on macOS, try installing GNU Make with `brew install make` and using the `gmake` command instead. Note that the Makefile currently assumes that git is available, and that it is inside a git repository. From a22a1191f293d7846145e5162c9b0773bc9dfea3 Mon Sep 17 00:00:00 2001 From: makeworld Date: Fri, 4 Sep 2020 21:38:52 -0400 Subject: [PATCH 02/13] =?UTF-8?q?=F0=9F=94=A7=20Setup=20homebrew=20for=20n?= =?UTF-8?q?ext=20release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/goreleaser.yml | 2 +- .goreleaser.yml | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 6e0d593..05d31be 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -23,4 +23,4 @@ jobs: version: 0.x args: release --rm-dist env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_REPOS }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 5befe60..d1771cd 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -46,7 +46,6 @@ builds: archives: - format: binary - replacements: darwin: macOS 386: 32-bit @@ -57,3 +56,19 @@ milestones: changelog: skip: true + +brews: + - name: amfora + + homepage: "https://github.com/makeworld-the-better-one/amfora" + description: "A fancy terminal browser for the Gemini protocol." + + tap: + owner: makeworld-the-better-one + name: homebrew-tap + + dependencies: + - name: go + + custom_block: | + head "https://github.com/makeworld-the-better-one/amfora.git" From 298034078e7b6d10ea61bbe7c0d1407789fe4f69 Mon Sep 17 00:00:00 2001 From: Jansen Price Date: Sat, 5 Sep 2020 13:04:55 -0500 Subject: [PATCH 03/13] Add 'e' keybinding feature to edit current URL --- display/display.go | 6 ++++++ display/help.go | 1 + 2 files changed, 7 insertions(+) diff --git a/display/display.go b/display/display.go index 6a4a508..0f08676 100644 --- a/display/display.go +++ b/display/display.go @@ -295,6 +295,12 @@ func Init() { // Don't save bottom bar, so that whenever you switch tabs, it's not in that mode App.SetFocus(bottomBar) return nil + case "e": + // Letter e allows to edit current URL + bottomBar.SetLabel("[::b]Edit URL: [::-]") + bottomBar.SetText(tabs[curTab].page.URL) + App.SetFocus(bottomBar) + return nil case "R": Reload() return nil diff --git a/display/help.go b/display/help.go index 35010b9..1391a07 100644 --- a/display/help.go +++ b/display/help.go @@ -25,6 +25,7 @@ spacebar|Open bar at the bottom - type a URL, link number, search term. |Typing new:N will open link number N in a new tab |instead of the current one. Numbers|Go to links 1-10 respectively. +e|Edit current URL Enter, Tab|On a page this will start link highlighting. |Press Tab and Shift-Tab to pick different links. |Press Enter again to go to one, or Esc to stop. From 5bffefeb5a05c1ef96f6801d306bbf7aa764a5ff Mon Sep 17 00:00:00 2001 From: makeworld Date: Sat, 5 Sep 2020 15:41:58 -0400 Subject: [PATCH 04/13] =?UTF-8?q?=F0=9F=93=9D=20Add=20#87=20to=20changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 695431d..2e07554 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added - `ansi` config setting, to disable ANSI colors in pages (#79, #86) +- Edit current URL with e (#87) ### Changed - Disabling the `color` config setting also disables ANSI colors in pages (#79, #86) From 28d4108676fae1f8128e8cdec53a0c625aef8f09 Mon Sep 17 00:00:00 2001 From: makeworld Date: Sun, 6 Sep 2020 13:56:49 -0400 Subject: [PATCH 05/13] =?UTF-8?q?=F0=9F=94=A7=20Disable=20automatic=20home?= =?UTF-8?q?brew?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .goreleaser.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index d1771cd..2d5add4 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -56,19 +56,3 @@ milestones: changelog: skip: true - -brews: - - name: amfora - - homepage: "https://github.com/makeworld-the-better-one/amfora" - description: "A fancy terminal browser for the Gemini protocol." - - tap: - owner: makeworld-the-better-one - name: homebrew-tap - - dependencies: - - name: go - - custom_block: | - head "https://github.com/makeworld-the-better-one/amfora.git" From 57b9d46b7a1b58899540124e7d787bd98c6d52ce Mon Sep 17 00:00:00 2001 From: makeworld Date: Sun, 6 Sep 2020 14:00:23 -0400 Subject: [PATCH 06/13] =?UTF-8?q?=F0=9F=94=A8=20Remove=20v=20prefix=20for?= =?UTF-8?q?=20version=20in=20Makefile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 09c159f..da49899 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ GIT_EXISTS := $(shell git status > /dev/null 2>&1 ; echo $$?) ifeq ($(GIT_EXISTS), 0) ifeq ($(shell git tag --points-at HEAD),) # Not currently on a tag - VERSION := $(shell git describe --tags | sed 's/-.*/-next/') # v1.2.3-next + VERSION := $(shell git describe --tags | sed 's/^v//; s/-.*/-next/') # 1.2.3-next else # On a tag VERSION := $(shell git tag --points-at HEAD) From b2859160df135d741d37d84bcffdc382fbd30a3d Mon Sep 17 00:00:00 2001 From: makeworld Date: Mon, 7 Sep 2020 12:55:32 -0400 Subject: [PATCH 07/13] =?UTF-8?q?=F0=9F=94=A8=20Install=20.desktop=20file?= =?UTF-8?q?=20to=20local=20dir?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index da49899..51d6942 100644 --- a/Makefile +++ b/Makefile @@ -12,9 +12,9 @@ ifeq ($(GIT_EXISTS), 0) COMMIT := $(shell git rev-parse --verify HEAD) endif -INSTALL := install -o root -g 0 +ROOT_INSTALL := install -o root -g 0 INSTALL_DIR := /usr/local/bin -DESKTOP_DIR := /usr/share/applications +DESKTOP_DIR := ~/.local/share/applications/ .PHONY: all build install desktop clean uninstall fmt @@ -32,11 +32,11 @@ endif install: @echo "Installing Amfora to $(INSTALL_DIR)" - @$(INSTALL) -m 755 amfora $(INSTALL_DIR) + @$(ROOT_INSTALL) -m 755 amfora $(INSTALL_DIR) desktop: @echo "Setting up desktop file" - @$(INSTALL) -m 644 amfora.desktop $(DESKTOP_DIR) + @install -m 644 amfora.desktop $(DESKTOP_DIR) @update-desktop-database $(DESKTOP_DIR) clean: From a7078c198c0d32bc3adeee33611960e92cab9b6a Mon Sep 17 00:00:00 2001 From: makeworld Date: Mon, 7 Sep 2020 13:11:53 -0400 Subject: [PATCH 08/13] =?UTF-8?q?=F0=9F=91=B7=20Update=20golangci-lint=20C?= =?UTF-8?q?I=20to=20v1.31?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/golangci-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 4f64e86..a080e79 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -10,6 +10,6 @@ jobs: uses: golangci/golangci-lint-action@v2 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.30 + version: v1.31 # Optional: show only new issues if it's a pull request. The default value is `false`. only-new-issues: true From bf29ec2a97c3ea1c44ca93407f3348259d15ae3c Mon Sep 17 00:00:00 2001 From: makeworld Date: Sat, 12 Sep 2020 17:31:23 -0400 Subject: [PATCH 09/13] =?UTF-8?q?=F0=9F=94=A8=20New=20Makefile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contributed by Chloe Kudryavtsev on mastodon with slight modification. --- Makefile | 69 ++++++++++++++++++++------------------------------------ 1 file changed, 25 insertions(+), 44 deletions(-) diff --git a/Makefile b/Makefile index 51d6942..3adaf4c 100644 --- a/Makefile +++ b/Makefile @@ -1,54 +1,35 @@ -GIT_EXISTS := $(shell git status > /dev/null 2>&1 ; echo $$?) +GITV != git describe --tags +GITC != git rev-parse --verify HEAD +SRC != find -type f -name '*.go' ! -name '*_test.go' +TEST != find -type f -name '*_test.go' -ifeq ($(GIT_EXISTS), 0) - ifeq ($(shell git tag --points-at HEAD),) - # Not currently on a tag - VERSION := $(shell git describe --tags | sed 's/^v//; s/-.*/-next/') # 1.2.3-next - else - # On a tag - VERSION := $(shell git tag --points-at HEAD) - endif +PREFIX ?= /usr/local +VERSION ?= $(GITV) +COMMIT ?= $(GITC) +BUILDER ?= Makefile - COMMIT := $(shell git rev-parse --verify HEAD) -endif +GO := go +INSTALL := install +RM := rm -ROOT_INSTALL := install -o root -g 0 -INSTALL_DIR := /usr/local/bin -DESKTOP_DIR := ~/.local/share/applications/ - -.PHONY: all build install desktop clean uninstall fmt - -all: build - -build: -ifneq ($(GIT_EXISTS), 0) - # No Git repo - $(error No Git repo was found, which is needed to compile the commit and version) -endif - @echo "Downloading dependencies" - @go env -w GO111MODULE=on ; go mod download - @echo "Building binary" - @go env -w GO111MODULE=on CGO_ENABLED=0 ; go build -ldflags="-s -w -X main.version=$(VERSION) -X main.commit=$(COMMIT) -X main.builtBy=Makefile" - -install: - @echo "Installing Amfora to $(INSTALL_DIR)" - @$(ROOT_INSTALL) -m 755 amfora $(INSTALL_DIR) - -desktop: - @echo "Setting up desktop file" - @install -m 644 amfora.desktop $(DESKTOP_DIR) - @update-desktop-database $(DESKTOP_DIR) +amfora: go.mod go.sum $(SRC) + go env -w GO111MODULE=on CGO_ENABLED=0 ; $(GO) build -o $@ -ldflags="-s -w -X main.version=$(VERSION) -X main.commit=$(COMMIT) -X main.builtBy=$(BUILDER)" +.PHONY: clean clean: - @echo "Removing Amfora binary in local directory" - @$(RM) amfora + $(RM) -f amfora +.PHONY: install +install: amfora amfora.desktop + install -Dm 755 amfora $(PREFIX)/bin/amfora + install -Dm 644 amfora.desktop $(PREFIX)/share/applications/amfora.desktop + +.PHONY: uninstall uninstall: - @echo "Removing Amfora from $(INSTALL_DIR)" - @$(RM) $(INSTALL_DIR)/amfora - @echo "Removing desktop file" - -@$(RM) $(DESKTOP_DIR)/amfora.desktop - -@update-desktop-database $(DESKTOP_DIR) + $(RM) -f $(PREFIX)/bin/amfora + $(RM) -f $(PREFIX)/share/applications/amfora.desktop +# Development helpers +.PHONY: fmt fmt: go fmt ./... From 0eea591ff6bb3114c7060342d87f7ac169db117d Mon Sep 17 00:00:00 2001 From: makeworld Date: Sat, 12 Sep 2020 17:40:27 -0400 Subject: [PATCH 10/13] =?UTF-8?q?=F0=9F=93=9D=20Remove=20make=20desktop=20?= =?UTF-8?q?command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index fe7c46a..b82be78 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,6 @@ cd amfora # git checkout v1.2.3 # Optionally pin to a specific version instead of the latest commit make sudo make install # Not for Windows! -sudo make desktop # Optional, installs .desktop file. Not for Windows or macOS ``` Because you installed with the Makefile, running `amfora -v` will tell you exactly what commit the binary was built from. From 32e3015b277845a38efcd526857de2973fd1a78c Mon Sep 17 00:00:00 2001 From: makeworld Date: Sat, 12 Sep 2020 17:41:16 -0400 Subject: [PATCH 11/13] =?UTF-8?q?=F0=9F=93=9D=20Remove=20now-false=20Makef?= =?UTF-8?q?ile=20info?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index b82be78..9dbd275 100644 --- a/README.md +++ b/README.md @@ -64,10 +64,6 @@ This section is for programmers who want to install from source. Make sure you'r The recommended way of installing Amfora fom source is using the Makefile. On Windows, you need install make, which can be done with [Chocolatey](https://chocolatey.org/install): `choco install make`. -If you have issues running the `make` command on macOS, try installing GNU Make with `brew install make` and using the `gmake` command instead. - -Note that the Makefile currently assumes that git is available, and that it is inside a git repository. - ```shell git clone https://github.com/makeworld-the-better-one/amfora cd amfora From b2b8e3082d26c064e6761067db3f0f2fb3875bee Mon Sep 17 00:00:00 2001 From: makeworld Date: Sat, 12 Sep 2020 19:35:12 -0400 Subject: [PATCH 12/13] =?UTF-8?q?=F0=9F=94=A8=20Stop=20using=20go=20env?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit go env changes env vars globally for users, altering their existing setups --- Makefile | 2 +- README.md | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3adaf4c..b9a1a5b 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ INSTALL := install RM := rm amfora: go.mod go.sum $(SRC) - go env -w GO111MODULE=on CGO_ENABLED=0 ; $(GO) build -o $@ -ldflags="-s -w -X main.version=$(VERSION) -X main.commit=$(COMMIT) -X main.builtBy=$(BUILDER)" + GO111MODULE=on CGO_ENABLED=0 $(GO) build -o $@ -ldflags="-s -w -X main.version=$(VERSION) -X main.commit=$(COMMIT) -X main.builtBy=$(BUILDER)" .PHONY: clean clean: diff --git a/README.md b/README.md index 9dbd275..b68da3f 100644 --- a/README.md +++ b/README.md @@ -62,14 +62,16 @@ brew upgrade amfora ### From Source This section is for programmers who want to install from source. Make sure you're using Go 1.13 at least, as earlier versions will fail to build. -The recommended way of installing Amfora fom source is using the Makefile. On Windows, you need install make, which can be done with [Chocolatey](https://chocolatey.org/install): `choco install make`. +The recommended way of installing Amfora fom source is using the Makefile. + +On Windows, you need install make, which can be done with [Chocolatey](https://chocolatey.org/install): `choco install make`. Please note the Makefile does not intend to support Windows, and so there may be issues. ```shell git clone https://github.com/makeworld-the-better-one/amfora cd amfora # git checkout v1.2.3 # Optionally pin to a specific version instead of the latest commit make -sudo make install # Not for Windows! +sudo make install # If you want to install the binary for all users ``` Because you installed with the Makefile, running `amfora -v` will tell you exactly what commit the binary was built from. From fe0fd784bb47ffe885c64baa91f18e50f3a54b96 Mon Sep 17 00:00:00 2001 From: makeworld Date: Tue, 15 Sep 2020 13:54:32 -0400 Subject: [PATCH 13/13] =?UTF-8?q?=F0=9F=93=9D=20Use=20official=20tap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b68da3f..8ce0c3c 100644 --- a/README.md +++ b/README.md @@ -50,9 +50,10 @@ yay -S amfora ### Homebrew -If you use [Homebrew](https://brew.sh/), you can install the package maintained by @Jackymancs4. +If you use [Homebrew](https://brew.sh/), you can install Amfora through the official tap. ``` -brew install jackymancs4/tap/amfora +brew tap makeworld-the-better-one/tap +brew install amfora ``` You can update it with: ```