Compare commits
No commits in common. "master" and "master" have entirely different histories.
2
Makefile
2
Makefile
|
@ -22,7 +22,7 @@ install: install-bin install-man install-desktop clean
|
||||||
|
|
||||||
.PHONY: install-man
|
.PHONY: install-man
|
||||||
install-man: bombadillo.1
|
install-man: bombadillo.1
|
||||||
gzip -c ./bombadillo.1 > ./bombadillo.1.gz
|
gzip -k ./bombadillo.1
|
||||||
install -d ${DESTDIR}${MAN1DIR}
|
install -d ${DESTDIR}${MAN1DIR}
|
||||||
install -m 0644 ./bombadillo.1.gz ${DESTDIR}${MAN1DIR}
|
install -m 0644 ./bombadillo.1.gz ${DESTDIR}${MAN1DIR}
|
||||||
|
|
||||||
|
|
|
@ -111,10 +111,6 @@ Reload the current page (does not destroy forward history).
|
||||||
Quick navigation to the first 10 links on a page. The 0 key will navigate to the link numbered '10', all other numbers navigate to their matching link number.
|
Quick navigation to the first 10 links on a page. The 0 key will navigate to the link numbered '10', all other numbers navigate to their matching link number.
|
||||||
.TP
|
.TP
|
||||||
.B
|
.B
|
||||||
U
|
|
||||||
Move up a level in the current url path. \fI/mydir/mysubdir/myfile.txt\fP would become \fI/mydir/mysubdir/\fP, and so on.
|
|
||||||
.TP
|
|
||||||
.B
|
|
||||||
u
|
u
|
||||||
Scroll up an amount corresponding to 75% of your terminal window height in the current document.
|
Scroll up an amount corresponding to 75% of your terminal window height in the current document.
|
||||||
.TP
|
.TP
|
||||||
|
@ -257,10 +253,6 @@ homeurl
|
||||||
The url that \fBbombadillo\fP navigates to when the program loads or when the \fIhome\fP or \fIh\fP LINE COMMAND is issued. This should be a valid url. If a scheme/protocol is not included, gopher will be assumed.
|
The url that \fBbombadillo\fP navigates to when the program loads or when the \fIhome\fP or \fIh\fP LINE COMMAND is issued. This should be a valid url. If a scheme/protocol is not included, gopher will be assumed.
|
||||||
.TP
|
.TP
|
||||||
.B
|
.B
|
||||||
maxwidth
|
|
||||||
The number of characters at which lines should be wrapped. If this is bigger than the available terminal width, the full width of the terminal will be used. If a non-integer or an integer less than 10 is given, a default value will be used.
|
|
||||||
.TP
|
|
||||||
.B
|
|
||||||
savelocation
|
savelocation
|
||||||
The path to the directory that \fBbombadillo\fP should write files to. This must be a valid filepath for the system, must be a directory, and must already exist.
|
The path to the directory that \fBbombadillo\fP should write files to. This must be a valid filepath for the system, must be a directory, and must already exist.
|
||||||
.TP
|
.TP
|
||||||
|
|
15
bookmarks.go
15
bookmarks.go
|
@ -1,18 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
45
client.go
45
client.go
|
@ -1,18 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -161,47 +146,42 @@ func (c *client) TakeControlInput() {
|
||||||
|
|
||||||
switch input {
|
switch input {
|
||||||
case '1', '2', '3', '4', '5', '6', '7', '8', '9', '0':
|
case '1', '2', '3', '4', '5', '6', '7', '8', '9', '0':
|
||||||
// Quick link
|
|
||||||
if input == '0' {
|
if input == '0' {
|
||||||
c.goToLink("10")
|
c.goToLink("10")
|
||||||
} else {
|
} else {
|
||||||
c.goToLink(string(input))
|
c.goToLink(string(input))
|
||||||
}
|
}
|
||||||
case 'j':
|
case 'j':
|
||||||
// Scroll down one line
|
// scroll down one line
|
||||||
c.ClearMessage()
|
c.ClearMessage()
|
||||||
c.Scroll(1)
|
c.Scroll(1)
|
||||||
case 'k':
|
case 'k':
|
||||||
// Scroll up one line
|
// scroll up one line
|
||||||
c.ClearMessage()
|
c.ClearMessage()
|
||||||
c.Scroll(-1)
|
c.Scroll(-1)
|
||||||
case 'q':
|
case 'q':
|
||||||
// Quit
|
// quit bombadillo
|
||||||
cui.Exit(0, "")
|
cui.Exit(0, "")
|
||||||
case 'g':
|
case 'g':
|
||||||
// Scroll to top
|
// scroll to top
|
||||||
c.ClearMessage()
|
c.ClearMessage()
|
||||||
c.Scroll(-len(c.PageState.History[c.PageState.Position].WrappedContent))
|
c.Scroll(-len(c.PageState.History[c.PageState.Position].WrappedContent))
|
||||||
case 'G':
|
case 'G':
|
||||||
// Scroll to bottom
|
// scroll to bottom
|
||||||
c.ClearMessage()
|
c.ClearMessage()
|
||||||
c.Scroll(len(c.PageState.History[c.PageState.Position].WrappedContent))
|
c.Scroll(len(c.PageState.History[c.PageState.Position].WrappedContent))
|
||||||
case 'd':
|
case 'd':
|
||||||
// Scroll down 75%
|
// scroll down 75%
|
||||||
c.ClearMessage()
|
c.ClearMessage()
|
||||||
distance := c.Height - c.Height/4
|
distance := c.Height - c.Height/4
|
||||||
c.Scroll(distance)
|
c.Scroll(distance)
|
||||||
case 'u':
|
case 'u':
|
||||||
// Scroll up 75%
|
// scroll up 75%
|
||||||
c.ClearMessage()
|
c.ClearMessage()
|
||||||
distance := c.Height - c.Height/4
|
distance := c.Height - c.Height/4
|
||||||
c.Scroll(-distance)
|
c.Scroll(-distance)
|
||||||
case 'U':
|
|
||||||
// Move up a directory for the current host
|
|
||||||
url := c.PageState.History[c.PageState.Position].Location.Full
|
|
||||||
c.Visit(UpOneDir(url))
|
|
||||||
case 'b', 'h':
|
case 'b', 'h':
|
||||||
// Go back
|
// go back
|
||||||
c.ClearMessage()
|
c.ClearMessage()
|
||||||
err := c.PageState.NavigateHistory(-1)
|
err := c.PageState.NavigateHistory(-1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -213,7 +193,6 @@ func (c *client) TakeControlInput() {
|
||||||
c.Draw()
|
c.Draw()
|
||||||
}
|
}
|
||||||
case 'R':
|
case 'R':
|
||||||
// Refresh the current page
|
|
||||||
c.ClearMessage()
|
c.ClearMessage()
|
||||||
err := c.ReloadPage()
|
err := c.ReloadPage()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -223,11 +202,11 @@ func (c *client) TakeControlInput() {
|
||||||
c.Draw()
|
c.Draw()
|
||||||
}
|
}
|
||||||
case 'B':
|
case 'B':
|
||||||
// Toggle the bookmark browser
|
// open the bookmarks browser
|
||||||
c.BookMarks.ToggleOpen()
|
c.BookMarks.ToggleOpen()
|
||||||
c.Draw()
|
c.Draw()
|
||||||
case 'f', 'l':
|
case 'f', 'l':
|
||||||
// Go forward
|
// go forward
|
||||||
c.ClearMessage()
|
c.ClearMessage()
|
||||||
err := c.PageState.NavigateHistory(1)
|
err := c.PageState.NavigateHistory(1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -239,7 +218,7 @@ func (c *client) TakeControlInput() {
|
||||||
c.Draw()
|
c.Draw()
|
||||||
}
|
}
|
||||||
case '\t':
|
case '\t':
|
||||||
// Toggle bookmark browser focus
|
// Toggle bookmark browser focus on/off
|
||||||
c.BookMarks.ToggleFocused()
|
c.BookMarks.ToggleFocused()
|
||||||
c.Draw()
|
c.Draw()
|
||||||
case 'n':
|
case 'n':
|
||||||
|
@ -1291,4 +1270,4 @@ func getMaxWidth(options map[string]string) int {
|
||||||
out = 10
|
out = 10
|
||||||
}
|
}
|
||||||
return out
|
return out
|
||||||
}
|
}
|
|
@ -1,18 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package cmdparse
|
package cmdparse
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,19 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package cmdparse
|
package cmdparse
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,18 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,18 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
15
cui/cui.go
15
cui/cui.go
|
@ -1,18 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package cui
|
package cui
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
15
defaults.go
15
defaults.go
|
@ -1,18 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,18 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package finger
|
package finger
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
15
footbar.go
15
footbar.go
|
@ -1,18 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,18 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package gemini
|
package gemini
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,19 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Contains the building blocks of a gopher client: history, url, and view.
|
// Contains the building blocks of a gopher client: history, url, and view.
|
||||||
// History handles the browsing session and view represents individual
|
// History handles the browsing session and view represents individual
|
||||||
// text based resources, the url represents a parsed url.
|
// text based resources, the url represents a parsed url.
|
||||||
|
|
15
headbar.go
15
headbar.go
|
@ -1,18 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
15
help.go
15
help.go
|
@ -1,18 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
// ERRS maps commands to their syntax error message
|
// ERRS maps commands to their syntax error message
|
||||||
|
|
|
@ -1,18 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package http
|
package http
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,19 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// This will build for osx without a build tag based on the filename
|
// This will build for osx without a build tag based on the filename
|
||||||
|
|
||||||
package http
|
package http
|
||||||
|
|
|
@ -1,21 +1,5 @@
|
||||||
// +build !darwin,!windows
|
// +build !darwin,!windows
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package http
|
package http
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,19 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// This will only build for windows based on the filename
|
// This will only build for windows based on the filename
|
||||||
// no build tag required
|
// no build tag required
|
||||||
package http
|
package http
|
||||||
|
|
|
@ -1,18 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package local
|
package local
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
30
main.go
30
main.go
|
@ -3,21 +3,21 @@ package main
|
||||||
// Bombadillo is an internet client for the terminal of unix or
|
// Bombadillo is an internet client for the terminal of unix or
|
||||||
// unix-like systems.
|
// unix-like systems.
|
||||||
//
|
//
|
||||||
/*
|
// Copyright (C) 2019 Brian Evans
|
||||||
* Copyright (C) 2022 Brian Evans
|
//
|
||||||
*
|
// This program is free software: you can redistribute it and/or modify
|
||||||
* This program is free software: you can redistribute it and/or modify
|
// it under the terms of the GNU General Public License as published by
|
||||||
* it under the terms of the GNU General Public License as published by
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
* the Free Software Foundation, version 3 of the License.
|
// (at your option) any later version.
|
||||||
*
|
//
|
||||||
* This program is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
*
|
//
|
||||||
* You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
15
page.go
15
page.go
|
@ -1,18 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
15
page_test.go
15
page_test.go
|
@ -1,18 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
15
pages.go
15
pages.go
|
@ -1,18 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
15
tdiv/tdiv.go
15
tdiv/tdiv.go
|
@ -1,18 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package tdiv
|
package tdiv
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,19 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Package telnet provides a function that starts a telnet session in a subprocess.
|
// Package telnet provides a function that starts a telnet session in a subprocess.
|
||||||
package telnet
|
package telnet
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,5 @@
|
||||||
// +build linux
|
// +build linux
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package termios
|
package termios
|
||||||
|
|
||||||
import "syscall"
|
import "syscall"
|
||||||
|
|
|
@ -1,21 +1,5 @@
|
||||||
// +build !linux
|
// +build !linux
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package termios
|
package termios
|
||||||
|
|
||||||
import "syscall"
|
import "syscall"
|
||||||
|
|
|
@ -1,18 +1,3 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package termios
|
package termios
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
34
url.go
34
url.go
|
@ -1,24 +1,8 @@
|
||||||
/*
|
|
||||||
* Copyright (C) 2022 Brian Evans
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, version 3 of the License.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os/user"
|
"os/user"
|
||||||
"path"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -161,24 +145,6 @@ func MakeUrl(u string) (Url, error) {
|
||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func UpOneDir(u string) string {
|
|
||||||
url, err := MakeUrl(u)
|
|
||||||
if len(url.Resource) < 1 || err != nil {
|
|
||||||
return u
|
|
||||||
}
|
|
||||||
if strings.HasSuffix(url.Resource, "/") {
|
|
||||||
url.Resource = url.Resource[:len(url.Resource)-1]
|
|
||||||
}
|
|
||||||
url.Resource, _ = path.Split(url.Resource)
|
|
||||||
if url.Scheme == "gopher" {
|
|
||||||
url.Mime = "1"
|
|
||||||
}
|
|
||||||
|
|
||||||
url.Full = url.Scheme + "://" + url.Host + ":" + url.Port + "/" + url.Mime + url.Resource
|
|
||||||
|
|
||||||
return url.Full
|
|
||||||
}
|
|
||||||
|
|
||||||
func parseFinger(u string) (Url, error) {
|
func parseFinger(u string) (Url, error) {
|
||||||
var out Url
|
var out Url
|
||||||
out.Scheme = "finger"
|
out.Scheme = "finger"
|
||||||
|
|
Loading…
Reference in New Issue