Skip to content

Commit 0338f0d

Browse files
committed
Initial release: web-recap - browser history extraction tool
0 parents  commit 0338f0d

24 files changed

Lines changed: 2627 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
name: Create Release
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up Go
19+
uses: actions/setup-go@v4
20+
with:
21+
go-version: '1.22'
22+
23+
- name: Build all platforms
24+
run: make build-all
25+
26+
- name: Create Release
27+
id: create_release
28+
uses: actions/create-release@v1
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
with:
32+
tag_name: ${{ github.ref }}
33+
release_name: Release ${{ github.ref }}
34+
draft: false
35+
prerelease: false
36+
37+
- name: Upload Linux AMD64
38+
uses: actions/upload-release-asset@v1
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
with:
42+
upload_url: ${{ steps.create_release.outputs.upload_url }}
43+
asset_path: ./dist/web-recap-linux-amd64
44+
asset_name: web-recap-linux-amd64
45+
asset_content_type: application/octet-stream
46+
47+
- name: Upload macOS AMD64
48+
uses: actions/upload-release-asset@v1
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
with:
52+
upload_url: ${{ steps.create_release.outputs.upload_url }}
53+
asset_path: ./dist/web-recap-darwin-amd64
54+
asset_name: web-recap-darwin-amd64
55+
asset_content_type: application/octet-stream
56+
57+
- name: Upload macOS ARM64
58+
uses: actions/upload-release-asset@v1
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
with:
62+
upload_url: ${{ steps.create_release.outputs.upload_url }}
63+
asset_path: ./dist/web-recap-darwin-arm64
64+
asset_name: web-recap-darwin-arm64
65+
asset_content_type: application/octet-stream
66+
67+
- name: Upload Windows AMD64
68+
uses: actions/upload-release-asset@v1
69+
env:
70+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71+
with:
72+
upload_url: ${{ steps.create_release.outputs.upload_url }}
73+
asset_path: ./dist/web-recap-windows-amd64.exe
74+
asset_name: web-recap-windows-amd64.exe
75+
asset_content_type: application/octet-stream

.github/workflows/test.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
test:
11+
name: Test on ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ ubuntu-latest, macos-latest, windows-latest ]
16+
go-version: [ '1.21', '1.22' ]
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Set up Go
22+
uses: actions/setup-go@v4
23+
with:
24+
go-version: ${{ matrix.go-version }}
25+
26+
- name: Cache Go modules
27+
uses: actions/cache@v3
28+
with:
29+
path: ~/go/pkg/mod
30+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
31+
restore-keys: |
32+
${{ runner.os }}-go-
33+
34+
- name: Download dependencies
35+
run: go mod download
36+
37+
- name: Verify dependencies
38+
run: go mod verify
39+
40+
- name: Run tests
41+
run: go test -v -race ./...
42+
43+
- name: Build for current platform
44+
run: go build ./cmd/web-recap
45+
46+
- name: Run vet
47+
run: go vet ./...
48+
49+
build:
50+
name: Build binaries
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/checkout@v4
54+
55+
- name: Set up Go
56+
uses: actions/setup-go@v4
57+
with:
58+
go-version: '1.22'
59+
60+
- name: Build all platforms
61+
run: make build-all
62+
63+
- name: List binaries
64+
run: ls -lh dist/

.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.so.*
7+
*.dylib
8+
9+
# Test binary, built with `go test -c`
10+
*.test
11+
12+
# Output of the go coverage tool
13+
*.out
14+
coverage.out
15+
16+
# Go workspace file
17+
go.work
18+
19+
# Dependency directories
20+
vendor/
21+
22+
# Build artifacts
23+
dist/
24+
web-recap
25+
web-recap.exe
26+
27+
# IDE specific files
28+
.vscode/
29+
.idea/
30+
*.swp
31+
*.swo
32+
*~
33+
.DS_Store
34+
35+
# Temporary files
36+
*.tmp
37+
*.temp
38+
39+
# Build output
40+
bin/
41+
lessons.md

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Rayan Zolkos
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
.PHONY: build build-all test clean install help
2+
3+
# Variables
4+
VERSION ?= 0.1.0
5+
BINARY_NAME := web-recap
6+
DIST_DIR := dist
7+
GO := go
8+
GOFLAGS := -ldflags="-s -w"
9+
10+
# Platform targets
11+
LINUX_AMD64 := $(DIST_DIR)/$(BINARY_NAME)-linux-amd64
12+
DARWIN_AMD64 := $(DIST_DIR)/$(BINARY_NAME)-darwin-amd64
13+
DARWIN_ARM64 := $(DIST_DIR)/$(BINARY_NAME)-darwin-arm64
14+
WINDOWS_AMD64 := $(DIST_DIR)/$(BINARY_NAME)-windows-amd64.exe
15+
16+
help:
17+
@echo "web-recap build targets:"
18+
@echo " make build - Build for current platform"
19+
@echo " make build-all - Build for all platforms (Linux, macOS, Windows)"
20+
@echo " make test - Run tests"
21+
@echo " make clean - Remove build artifacts"
22+
@echo " make install - Install binary to GOBIN"
23+
@echo " make help - Show this help message"
24+
25+
build:
26+
$(GO) build $(GOFLAGS) -o $(BINARY_NAME) ./cmd/web-recap
27+
28+
build-all: $(LINUX_AMD64) $(DARWIN_AMD64) $(DARWIN_ARM64) $(WINDOWS_AMD64)
29+
@echo "✓ Built all platforms"
30+
31+
$(LINUX_AMD64):
32+
@mkdir -p $(DIST_DIR)
33+
@echo "Building Linux AMD64..."
34+
GOOS=linux GOARCH=amd64 $(GO) build $(GOFLAGS) -o $@ ./cmd/web-recap
35+
36+
$(DARWIN_AMD64):
37+
@mkdir -p $(DIST_DIR)
38+
@echo "Building macOS Intel..."
39+
GOOS=darwin GOARCH=amd64 $(GO) build $(GOFLAGS) -o $@ ./cmd/web-recap
40+
41+
$(DARWIN_ARM64):
42+
@mkdir -p $(DIST_DIR)
43+
@echo "Building macOS ARM64..."
44+
GOOS=darwin GOARCH=arm64 $(GO) build $(GOFLAGS) -o $@ ./cmd/web-recap
45+
46+
$(WINDOWS_AMD64):
47+
@mkdir -p $(DIST_DIR)
48+
@echo "Building Windows AMD64..."
49+
GOOS=windows GOARCH=amd64 $(GO) build $(GOFLAGS) -o $@ ./cmd/web-recap
50+
51+
test:
52+
$(GO) test ./...
53+
54+
test-verbose:
55+
$(GO) test -v ./...
56+
57+
test-coverage:
58+
$(GO) test -cover ./...
59+
60+
clean:
61+
@echo "Cleaning build artifacts..."
62+
$(GO) clean
63+
rm -rf $(DIST_DIR)
64+
rm -f $(BINARY_NAME)
65+
66+
install: build
67+
@echo "Installing web-recap..."
68+
$(GO) install ./cmd/web-recap
69+
70+
deps:
71+
$(GO) mod download
72+
$(GO) mod verify
73+
74+
fmt:
75+
$(GO) fmt ./...
76+
77+
lint:
78+
golangci-lint run ./...
79+
80+
vet:
81+
$(GO) vet ./...
82+
83+
.PHONY: build build-all test test-verbose test-coverage clean install deps fmt lint vet help

0 commit comments

Comments
 (0)