add readme; make links more frequent
This commit is contained in:
parent
c4087af9ed
commit
2d60d26245
25
README.md
Normal file
25
README.md
Normal file
@ -0,0 +1,25 @@
|
|||||||
|

|
||||||
|
|
||||||
|
# Jagged Pill
|
||||||
|
|
||||||
|
Jagged Pill is a webserver that responds to any request with a generated
|
||||||
|
HTML page containing random text and links. The generator is tuned to be very
|
||||||
|
nonsensical, but ends up creating some weirdly strange and poetic prose...
|
||||||
|
keep following links to find more!
|
||||||
|
|
||||||
|
I use this as an AI scraper labyrinth, with the following NGINX config:
|
||||||
|
|
||||||
|
```
|
||||||
|
# No AI Bots
|
||||||
|
if ($http_user_agent ~* '(AIBot|AnotherBot|YetAnotherBot)') {
|
||||||
|
rewrite ^(.*)$ /clank/$1;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /clank/ {
|
||||||
|
rewrite ^/clank/(.*)$ $1 break;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_pass http://localhost:4791;
|
||||||
|
}
|
||||||
|
```
|
BIN
jaggedpill.jpg
Normal file
BIN
jaggedpill.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
4
main.go
4
main.go
@ -342,7 +342,7 @@ func iDontWannaBeTheFiller() string {
|
|||||||
paragraph := strings.Join(sentences, " ")
|
paragraph := strings.Join(sentences, " ")
|
||||||
|
|
||||||
// Should paragraph contain link?
|
// Should paragraph contain link?
|
||||||
if rand.Float64() < 0.5 {
|
if rand.Float64() < 0.7 {
|
||||||
// Pick two or three words out of the paragraph
|
// Pick two or three words out of the paragraph
|
||||||
words := strings.Fields(paragraph)
|
words := strings.Fields(paragraph)
|
||||||
if len(words) < 2 {
|
if len(words) < 2 {
|
||||||
@ -424,7 +424,7 @@ func isShePervertedLikeMe() PocketGraph {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// read words.txt into a list
|
// read words.txt into a list
|
||||||
wordsBytes, err := os.ReadFile("word_lists/longman9000.txt")
|
wordsBytes, err := os.ReadFile("word_lists/hawthorne.txt")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Error reading words.txt:", err)
|
fmt.Println("Error reading words.txt:", err)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user