Wykres commitów

14 Commity (f93a4d12cfde01fc6405b022801976c040b2093b)

Autor SHA1 Wiadomość Data
Ananth Bhaskararaman f93a4d12cf feat: Use log/slog for logging to file or stdout
Switched to Go1.21 to use the log/slog package for strutctured logging.

TODO: Log messages that are stringifying objects can now use strutctured
output.

TODO: Customise log levels for different messages.

Fix tests
2023-12-08 19:09:08 -05:00
Thomas Buckley-Houston 8810e481db tests: Migrate to Github Actions 2022-07-16 17:18:39 -04:00
Érico Nogueira Rolim 84f5382eda
Move to Go modules (#338)
* interfacer: Move to Go modules.

* interfacer/contrib: remove dep usage.

No longer needed due to the move to Go modules.

* Move src/main.go to cmd/browsh/main.go.

Allows installation with `go install ./cmd/browsh`, no need to specify
output.

* interfacer/src/browsh/firefox: fix browsh.xpi path

* setup_linux_build_env: clean up and update.

- Remove references to dep and GOPATH
- Use code blocks for commands
- Update for new build instructions
2020-07-27 09:13:55 +02:00
Thomas Buckley-Houston d6b5951059 HTTP server: add experimental DOM-dump mode
Simply dumps the contents of the DOM
2019-06-19 09:03:20 +03:00
Thomas Buckley-Houston 27826b34e2 Various improvements to integration tests
This has been a long time coming, but it's still not perfect. Basically
I'm trying to reset the entire environment as much as possible so that
each spec runs in a clean room. Mostly in this commit Firefox is being
killed and restarted for every spec, which has made a lot of
improvements.
2019-06-11 12:21:39 +03:00
Thomas Buckley-Houston 4fa867cafd Attempted fix for HTTP server's stuck requests
My hunch is that, since the switch to using brow.sh as the default
homepage, the extra page load time has an undesirable effect on
subsequent requests for new tabs. For example, say that a new tab
is requested but the original brow.sh tab hasn't completed, but
it does complete halfway through another tab loading. Might it retake
focus and prevent DOM load events triggering in the user-requested
tab?

So for now, the quickest fix is just to increase the wait time in the
tests. The better fix, if my hunch is right, would be to detect and
wait for the original launch-time tab to finish.
2018-07-24 21:28:14 +08:00
Thomas Buckley-Houston 23702a2b4d Block user agents and domains using user config 2018-07-18 17:38:17 +08:00
Thomas Buckley-Houston 73c8bd94f3 Made all obvious variables user-configurable
There's a bit of refactoring in order for the webextension to deal with
the new order of initialisation now that config is sent by the Golang
client.

Closes #83
2018-07-18 15:55:35 +08:00
Thomas Buckley-Houston ef18913e3c First implementation of config file
Includes change of CLI args, many of been moved to the config file and
those that remain begin with `--` not `-` and may be worded differently.

Touches #37
2018-07-17 18:43:52 +08:00
Thomas Buckley-Houston b2988bfa1f Fix for incorrectly calculated char dimensions
There was a bug where raw text pages would unusually truncated. It
seemed to coincide with the char dimensions being incorrectly
calculated. My only guess was that it was because of race condition on
lightweigh sites that didn't load Browsh's webextension code in time.

So for now it just seems better to hard code the char dimensions, which
should at least be more reliable than the bugs of dynamically
calculating them .
2018-07-16 13:56:24 +08:00
Thomas Buckley-Houston 2fc0b5cde3 Formatted all Go code
Closes #97
2018-07-11 17:00:06 +08:00
Thomas Buckley-Houston 3149db4bd3 Add anchor tags to HTTP Server output
This means you can now load the raw text in a browser and the resulting
page will have basic blue links that can be clicked on that will in turn
be loaded by the HTTP service.

A significant feature, so worthy of a minor version bump to;
v1.1.0
2018-06-17 21:26:44 +08:00
Thomas Buckley-Houston c13e8d26f6 Use absolute path to webextension.go asset
Bump to version 1.0.8
2018-06-11 16:28:00 +08:00
Thomas Buckley-Houston 0fc39a51e6 HTTP Server service: fetches URL, returns raw text
Using the `-http-server` argument will now start Browsh in HTTP Server
mode. It will accept request like this:

  `curl brow.sh/http://news.ycombinator.com`

This will return a plain text version of the Hacker News front page,
with a width of 100 characters, with each line separated by a line
break.
2018-05-27 20:45:43 +08:00