Skip to content

Commit 97854ff

Browse files
committed
feat: add files
1 parent 1fa2814 commit 97854ff

File tree

11 files changed

+2172
-0
lines changed

11 files changed

+2172
-0
lines changed

examples/Makefile

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Makefile for ScrapeGraphAI Go Examples
2+
3+
.PHONY: all basic smartscraper searchscraper markdownify crawl generateschema utilities advanced clean help
4+
5+
# Default target
6+
all: help
7+
8+
# Run basic usage example
9+
basic:
10+
@echo "Running basic usage example..."
11+
cd basic_usage && go run main.go
12+
13+
# Run smartscraper examples
14+
smartscraper:
15+
@echo "Running smartscraper examples..."
16+
cd smartscraper && go run main.go
17+
18+
# Run searchscraper examples
19+
searchscraper:
20+
@echo "Running searchscraper examples..."
21+
cd searchscraper && go run main.go
22+
23+
# Run markdownify examples
24+
markdownify:
25+
@echo "Running markdownify examples..."
26+
cd markdownify && go run main.go
27+
28+
# Run crawl examples
29+
crawl:
30+
@echo "Running crawl examples..."
31+
cd crawl && go run main.go
32+
33+
# Run generateschema examples
34+
generateschema:
35+
@echo "Running generateschema examples..."
36+
cd generateschema && go run main.go
37+
38+
# Run utilities examples
39+
utilities:
40+
@echo "Running utilities examples..."
41+
cd utilities && go run main.go
42+
43+
# Run advanced examples
44+
advanced:
45+
@echo "Running advanced examples..."
46+
cd advanced && go run main.go
47+
48+
# Clean build artifacts
49+
clean:
50+
@echo "Cleaning build artifacts..."
51+
find . -name "*.exe" -delete
52+
find . -name "*.test" -delete
53+
go clean -cache
54+
55+
# Initialize go modules for examples
56+
init:
57+
@echo "Initializing Go modules..."
58+
go mod tidy
59+
60+
# Format all Go files
61+
fmt:
62+
@echo "Formatting Go files..."
63+
go fmt ./...
64+
65+
# Vet all Go files
66+
vet:
67+
@echo "Vetting Go files..."
68+
go vet ./...
69+
70+
# Run tests if any
71+
test:
72+
@echo "Running tests..."
73+
go test ./...
74+
75+
# Show help
76+
help:
77+
@echo "ScrapeGraphAI Go Examples"
78+
@echo ""
79+
@echo "Available commands:"
80+
@echo " make basic - Run basic usage example"
81+
@echo " make smartscraper - Run smartscraper examples"
82+
@echo " make searchscraper - Run searchscraper examples"
83+
@echo " make markdownify - Run markdownify examples"
84+
@echo " make crawl - Run crawl examples"
85+
@echo " make generateschema- Run generateschema examples"
86+
@echo " make utilities - Run utilities examples"
87+
@echo " make advanced - Run advanced examples"
88+
@echo ""
89+
@echo "Development commands:"
90+
@echo " make init - Initialize Go modules"
91+
@echo " make fmt - Format all Go files"
92+
@echo " make vet - Vet all Go files"
93+
@echo " make test - Run tests"
94+
@echo " make clean - Clean build artifacts"
95+
@echo " make help - Show this help message"
96+
@echo ""
97+
@echo "Prerequisites:"
98+
@echo " - Set SCRAPEGRAPHAI_API_KEY environment variable"
99+
@echo " - Go 1.18+ installed"
100+
@echo ""
101+
@echo "Example usage:"
102+
@echo " export SCRAPEGRAPHAI_API_KEY='your-api-key-here'"
103+
@echo " make basic"

0 commit comments

Comments
 (0)