Compare commits
2 Commits
19752a0c89
...
608a083861
| Author | SHA1 | Date | |
|---|---|---|---|
| 608a083861 | |||
| 50a45b6a82 |
22
examples/archive/archive/facts/seals/seals.txt
Normal file
22
examples/archive/archive/facts/seals/seals.txt
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
Pinnipeds [2] are the seals and their relatives, a group of semi-aquatic marine
|
||||||
|
mammals. The Pinnipedia is in the Order Carnivora. There are three seal
|
||||||
|
families: Odobenidae (walruses), Otariidae (eared seals, including sea lions
|
||||||
|
and fur seals), and Phocidae (true seals).[3]
|
||||||
|
|
||||||
|
Seals are sleek-bodied and barrel-shaped. Their bodies are well adapted to the
|
||||||
|
aquatic habitat where they spend most of their lives. Pinnipeds have flippers
|
||||||
|
for hands, big bulky bodies, doggish faces, and big eyes. Unlike cetaceans,
|
||||||
|
pinnipeds have their noses on their faces, and each nostril of the nose closes
|
||||||
|
when the pinniped goes underwater. Like cetaceans, pinnipeds have a thick layer
|
||||||
|
of blubber (fat) just under their skin: this blubber keeps them warm in cold
|
||||||
|
waters and keeps them fed during times when food is not easily found. When they
|
||||||
|
cannot find food, they live off the fat in the blubber.
|
||||||
|
|
||||||
|
Pinnipeds are carnivorous. This means they eat only meat (such as fish or
|
||||||
|
squid) and not plants. However, almost all pinnipeds can be eaten by polar
|
||||||
|
bears, sharks and killer whales.
|
||||||
|
|
||||||
|
Seals are often trained in zoos or aquariums to put on shows. However, in
|
||||||
|
Sweden, it is illegal to train a seal to balance a ball on its nose.[4]
|
||||||
|
|
||||||
|
From [Pinniped Wikipedia](https://simple.wikipedia.org/wiki/Pinniped)
|
||||||
@@ -286,23 +286,25 @@ func generateArchiveIndex(fsPath string, urlPath string) (string, error) {
|
|||||||
urlPath = basePath(strings.TrimPrefix(urlPath, "/archive"))
|
urlPath = basePath(strings.TrimPrefix(urlPath, "/archive"))
|
||||||
|
|
||||||
var b strings.Builder
|
var b strings.Builder
|
||||||
|
|
||||||
b.WriteString("<html>\n<head><title>Index of ")
|
b.WriteString("<html>\n<head><title>Index of ")
|
||||||
b.WriteString(template.HTMLEscapeString(urlPath))
|
b.WriteString(template.HTMLEscapeString(urlPath))
|
||||||
b.WriteString("</title></head>\n<body>\n<h1>Index of ")
|
b.WriteString("</title></head>\n<body>\n<h1>Index of ")
|
||||||
b.WriteString(template.HTMLEscapeString(urlPath))
|
b.WriteString(template.HTMLEscapeString(urlPath))
|
||||||
b.WriteString("</h1><hr><pre>")
|
b.WriteString("</h1><hr><pre>")
|
||||||
if urlPath != "/archive" && urlPath != "/archive/" {
|
|
||||||
up := path.Dir(urlPath)
|
if urlPath != "/" {
|
||||||
if up == "." {
|
b.WriteString(
|
||||||
up = "/archive"
|
`<a href="/archive` +
|
||||||
}
|
template.HTMLEscapeString(path.Dir(strings.TrimSuffix(urlPath, "/"))) +
|
||||||
if !strings.HasSuffix(up, "/") {
|
`">../</a>` + "\n",
|
||||||
up = "/archive" + filepath.Dir(up) + "/"
|
)
|
||||||
}
|
|
||||||
b.WriteString(`<a href="` + template.HTMLEscapeString(up) + `">../</a>` + "\n")
|
|
||||||
} else {
|
} else {
|
||||||
b.WriteString(`<a href="../">../</a>` + "\n")
|
b.WriteString(
|
||||||
|
`<a href="/">../</a>` + "\n",
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
nameCol := 50
|
nameCol := 50
|
||||||
for _, ei := range list {
|
for _, ei := range list {
|
||||||
escapedName := template.HTMLEscapeString(ei.name)
|
escapedName := template.HTMLEscapeString(ei.name)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ var gitCommit string = "devel"
|
|||||||
|
|
||||||
const PROGRAM_NAME string = "fes"
|
const PROGRAM_NAME string = "fes"
|
||||||
const PROGRAM_NAME_LONG string = "fes/fSD"
|
const PROGRAM_NAME_LONG string = "fes/fSD"
|
||||||
const VERSION string = "0.2.0"
|
const VERSION string = "0.2.1"
|
||||||
|
|
||||||
func Version() {
|
func Version() {
|
||||||
fmt.Printf("%s version %s\n", PROGRAM_NAME_LONG, VERSION)
|
fmt.Printf("%s version %s\n", PROGRAM_NAME_LONG, VERSION)
|
||||||
|
|||||||
Reference in New Issue
Block a user