2b4162be5b
Fix a crash by casting HTML content a string (for whatever reason, it is sometimes
...
seen as bytes)
2023-02-15 15:54:11 +01:00
d8771cb267
Revert ""set cache" now allows to set a custom cache folder."
...
This reverts commit 2582e00cab
.
2023-02-15 15:22:09 +01:00
2582e00cab
"set cache" now allows to set a custom cache folder.
...
The implementation is bad as it uses a global variable.
Also, there’s currently no way to revert to the default without restarting offpunk.
2023-01-26 15:20:48 +01:00
39b5abeeac
unionising env and os.environ should give precedence to env
2023-01-13 22:38:27 +01:00
6fd1bd4341
Improve compatibility with python 3.7 by replacing a dict union
2023-01-13 09:56:29 +01:00
3438a94155
This should fix #7
...
Starting now, we don’t assume a valid GeminiItem and thus a valid cache_path.
More crashes might be uncovered.
2023-01-12 17:11:54 +01:00
99e3fc1772
fix error handling assuming that requests is installed
2022-12-29 14:44:09 +01:00
Maeve Sproule - code at sprock.dev
5b432112d0
Fix support for UTF-8 domains in Gemini ( fixes #5 )
...
Previously, offpunk would send the UTF-8 host in the Gemini request.
This changes it to first IDNA-encode the hostname in the URL before
making the request. This bug only existed for Gemini requests, since the
host is already being encoded for Spartan requests and `requests`
handles this for HTTP URLs.
Additionally, the code now treats both UTF-8 hosts and their IDNA
equivalents as the same host for the purposes of identifying
cross-domain redirects.
2022-12-22 12:13:47 +01:00
7e363f740b
better feedback of streaming urls
2022-12-18 20:09:48 +01:00
5a5ff15f90
blocking doubleclick.net by default
2022-12-16 21:03:44 +01:00
Sotiris Papatheodorou - sotiris at papatheodorou.xyz
39669df9ec
Handle .. as an alias to the up command
...
* It allows passing an argument as in the up command.
* Prevents some weird errors when passing an argument.
2022-12-16 12:40:36 +01:00
250f3ebe66
added a comment about a function because it took me 15 minutes to understand why it was there
2022-12-14 16:26:03 +01:00
d1cbe0acf0
Default handlers have been removed.
...
Not everyone use zathura and feh so they are not removed by default.
To restore previous behaviour, add the following lines to your offpunkrc:
handler image/* feh -. %s
handler application/pdf zathura %s
2022-12-12 15:57:28 +01:00
194e9ed62d
fix crash when susbcribing without GI
2022-12-12 15:30:49 +01:00
Ben Winston - ben at benwinston.us
1667952153
bugfix: don't crash when there's no links to index
2022-12-11 00:51:42 +01:00
45a689a5b8
RELEASE 1.8
2022-12-10 22:46:23 +01:00
Ben Winston - ben at benwinston.us
95d48fb38d
bugfix: readline needs ANSI codes escaped
...
In order for `readline` to handle up/down arrow presses with ANSI
escape codes in the prompt, all non-printable characters must be
prefaced with \001 and suffixed with \002. Otherwise, long lines
do not get entirely cleared when scrolling up/down.
2022-12-10 22:22:18 +01:00
Ben Winston - ben at benwinston.us
8875a0068c
Detecting "New" Chafa
2022-12-09 22:51:34 +01:00
7d57fd9919
adding a space after autocompleting a list
2022-12-07 23:23:31 +01:00
b773243623
misplaced check for mode was breaking elif
2022-12-02 13:11:26 +01:00
7bcd0e2af5
fixing a crash with data:image svg
2022-12-02 12:49:37 +01:00
af65662f0f
Fix images not being downloaded for "full" mode
...
(the mode was not preserved for each call. We now default to the gi.last_mode if
no mode is explicitely set during the _go_to_gi call)
2022-12-01 17:39:04 +01:00
Maeve Sproule - code at sprock.dev
1f516b6733
Avoid passing improperly escaped paths to shell
...
This should fix https://notabug.org/ploum/offpunk/issues/9 . This
involves a few closely-related changes to subprogram execution:
- If a path, url or file contents were being passed using `cat` or
`echo`, the code was changed to pass the file/string on stdin. This
also makes several pipelines into single programs and should allow for
the removal of `shell=True` in the future.
- For `file`, `xdg-open` and `less`, which either can't accept their
input on stdin or otherwise use the path, the paths are now being
escaped with `shlex.quote()`.
- Finally, the environment variable $LESSHISTFILE is now being set in
python code, where escaping is not necessary.
Notably, the argument to `grep` in `less_cmd()` is not quoted in this
commit, since I was unsure of how it was meant to be used. If the
argument is not already quoted, this should probably be passed through
`shlex.quote()`.
This does not do the following, which may be desired:
- This does not disable `shell=True` anywhere, since `subprocess.run()`
requires the command to be already split into a list of strings. I
think this would just require a `shlex.split()` in `run()` when this
is disabled, but it may require more thought.
- Some of the invoked programs (with the notable exception of `echo` and
`xdg-open`) support the use of "--" to prevent any following arguments
from being treated as program flags if they start with "-". I don't
believe there are any paths that start with "-", but it may make sense
to include this where possible.
I have briefly tested this commit, but it touches quite a few code
paths, so there might be bugs that I missed.
2022-12-01 17:07:44 +01:00
e76b2a13e0
accept_bad_ssl_certificates with --assume-yes
2022-11-30 21:02:17 +01:00
c15d452d34
deprecating restricted mode
2022-11-30 20:57:23 +01:00
1c9380835c
removing dependency on cgi and implementing our own mime parser
2022-11-30 00:11:44 +01:00
75b20e4982
deep bug in handling display modes that became apparent by breaking cp raw
2022-11-27 01:15:37 +01:00
464fcf3773
highly experimental : trying to access gemini://océane.fr and it still fails
2022-11-24 16:26:36 +01:00
Sotiris Papatheodorou - sotiris at papatheodorou.xyz
c02eba5e3e
add support for the finger protocol
2022-11-24 12:36:55 +01:00
afa89097b2
better feedback when streaming
2022-11-24 10:48:38 +01:00
Marty Oehme - marty.oehme at gmail.com
0af34aa7e1
fix crash on missing index when listing contents
...
Fixes a crash when trying to look up the contents of the current index
using `ls` command whenever there is no current page loaded by making a
current item a requirement.
2022-11-21 00:05:25 +01:00
c1f6119e80
accepting_bad_ssl_certificates requires python-requests
2022-11-17 10:30:12 +01:00
2e566f7220
accept localhost as a valid url
2022-11-16 21:45:51 +01:00
ff04177d53
set accept_bad_ssl_certificates
2022-11-16 14:44:47 +01:00
06b2a56ed3
certdir variable was not initialised without HAS_CRYPTOGRAPHY (see bug #2 )
2022-11-16 10:06:35 +01:00
7baccbb15f
v 1.7.1
2022-11-15 17:01:13 +01:00
041146e3f1
offpunk 1.7
2022-11-15 13:55:39 +01:00
Sotiris Papatheodorou - sotiris at papatheodorou.xyz
fb550a19bc
fix typo in package name
2022-11-15 13:36:07 +01:00
539b287901
new search and wikipedia commands
2022-11-14 21:33:40 +01:00
39ad7ee7b7
comment for debugging stuck requests
2022-11-14 19:17:20 +01:00
f9b8ccaf9b
hidden links in gopher/gemini
2022-11-10 23:50:16 +01:00
dd02476ae2
fixing list creation with fetch-later
2022-11-09 23:30:54 +01:00
01b1bd56c4
automatically create system lists when needed
2022-11-05 23:14:41 +01:00
a60cbd9297
solving crash when adding wrong url to tour
2022-11-03 12:59:15 +01:00
c1538f2f9b
autocompletion now working as expected
2022-11-02 15:47:57 +01:00
8bd68ca02b
introducing autocompletion for list/add/move
2022-11-02 00:58:41 +01:00
fbdff91f01
trying to not use shell=True (Wip)
2022-11-01 17:34:04 +01:00
f3bb6cd7f0
avoid a crash related to bug #9
2022-11-01 17:04:30 +01:00
bee6fd9e40
computing size of http body out of the if condition seems to help being stuck in some strange cases
2022-10-25 01:15:57 +02:00
c6d52b3c19
investigating sync perf
2022-10-20 22:53:33 +02:00
68b278fe13
solve a crash when loading html pages with empty links
2022-10-15 18:25:15 +02:00
f388be39d6
releasing offpunk 1.6
2022-10-12 11:29:37 +02:00
1ff77e796d
consider .xml as feeds to avoid false detection as SVG by file
2022-10-10 11:00:58 +02:00
addab31f49
yet another try at fixing timg bugs
2022-10-08 23:20:30 +02:00
8d242ef06e
workaround old timg bug
2022-10-08 00:42:46 +02:00
15d76dd05d
redirect reddit to teddit ( fix #12 )
2022-10-08 00:16:28 +02:00
230c359aff
handling the case where gi is none
2022-10-07 16:07:03 +02:00
0b06c360da
base64 support seems to work. More testing needed
2022-10-07 15:51:26 +02:00
f7f78564a2
refactoring: replacing the self.lookup table with calls to gi.get_links for consistency
2022-10-07 14:45:44 +02:00
93c666458a
refactoring base64 support
2022-10-07 13:56:55 +02:00
9ae464f154
initial support for base64 images in html. Still a bug with link counting.
2022-10-07 11:19:23 +02:00
0a3024f765
automatically download the rss feed of a webpage during sync ( fix #14 )
2022-10-06 22:30:09 +02:00
268d864cdb
Close #15 , redirects are now working also in --sync mode (thanks kelbot)
2022-10-06 18:22:34 +02:00
d93db54f55
only use timg > 1.3.2 (thanks Valvin for the bug report)
2022-10-06 11:59:03 +02:00
54dcec340a
removing libreddit redirection
2022-10-03 20:35:19 +02:00
e7ebff8d34
touring a list in one command
2022-09-25 23:33:36 +02:00
2e5b4bff5c
add link to mailing list
2022-08-08 22:29:36 +02:00
1663c1bc01
offpunk 1.5
2022-08-04 12:07:41 +02:00
cc7f92222d
solving a bug with base64 images and blocking facebook by default
2022-07-24 10:17:33 +02:00
d7c1492150
refactor redirections and add blocking
2022-07-21 17:02:36 +02:00
052d9fdb83
typo fixed thanks to shawn nock
2022-07-18 14:53:49 +02:00
329a1ad58a
introducing --features for #3
2022-07-03 15:38:29 +02:00
a74229f1fd
not creating config file when running --version, close #2
2022-07-03 15:31:33 +02:00
39c26fa59f
removing an old commented out line
2022-05-07 17:45:56 +02:00
cdd040f19a
open url
2022-04-29 10:41:08 +02:00
947183e0a7
removing commented-out code
2022-04-28 23:06:36 +02:00
3e76ca2368
removed optional dependency to ripgrep
2022-04-26 13:15:20 +02:00
63ebb8067d
release 1.4
2022-04-25 16:01:00 +02:00
43bb41a37a
slight improvement to handle transparency with chafa
2022-04-18 21:24:26 +02:00
51f5b35a1e
stupid bug in previous commit
2022-04-12 15:03:26 +02:00
ab2271e6bf
archiving regardless of the view used
2022-04-10 23:45:34 +02:00
10ab7323bd
do not try to render non-image files with chafa to avoid errors
2022-04-09 17:15:56 +02:00
ac80f537e2
removing next and previous
2022-04-06 12:14:57 +02:00
2e9e236dc8
not stripping html from left CR
2022-04-06 11:41:56 +02:00
f0e151b40c
python readability is now optional
2022-04-02 18:25:40 +02:00
2cff973f3f
try to not crash on empty pages
2022-04-02 17:55:45 +02:00
66454dc2e7
releasing 1.3
2022-04-02 16:56:03 +02:00
3ddb782c7a
cleaning some old comments
2022-04-01 00:20:34 +02:00
fcd279db16
escaping by default each time we call a shell command
2022-03-31 11:41:37 +02:00
9adfb955d7
automatically create bookmarks list
2022-03-31 11:00:55 +02:00
97f31c0762
Refactor every call to subprocess to improve compatibility with python 3.6
2022-03-30 19:23:44 +02:00
b71dd77f7d
replacing subproccess.call with subprocess.run
2022-03-30 17:42:48 +02:00
6e5760f27d
Introducting redirections for twitter,medium, youtube and reddit
2022-03-30 15:46:25 +02:00
026ce534ac
displaying animated gifs (but only one loop)
2022-03-30 14:35:37 +02:00
3e560d21de
downloading images only if support for them is enabled, of course
2022-03-30 12:09:08 +02:00
9528d3d5f6
downloading images first to display them
2022-03-30 12:04:07 +02:00
6dbeaa828e
It seems a bunch of ssl validation code was dropped, I don’t know how. Got it back from AV-98
2022-03-29 22:30:57 +02:00
5207164d3c
removed dependency to python-magic
2022-03-29 22:08:30 +02:00
bbaa1dbbcb
improved dependencies clarity
2022-03-29 13:28:20 +02:00
5f16b89e95
removing dependency to python-editor
2022-03-29 13:12:49 +02:00