Commit graph

14 commits

Author SHA1 Message Date
Chris Mayo
73b099ad4c Exit if FILENAME does not exist or is not readable 2023-11-13 19:22:12 +00:00
Chris Mayo
82a38e6bd0 Check cookie file exists 2023-11-13 19:22:12 +00:00
Chris Mayo
db30833511 Fix setting config["cookiefile"] regardless of check
config["cookiefile"] is set correctly later on in setup_config().

Not working since check added in:
7b34be590 ("Introduce check plugins, use Python requests for http/s
connections, and some code cleanups and improvements.", 2014-03-01)
2023-11-13 19:22:12 +00:00
Chris Down
85ce9841eb Allow FIFOs to be used as config files
There are some config options which have no equivalent command line
option. Some may want to set these options dynamically or on a one-off
basis where a static config file is not ideal, and one very easy way to
do that is using process substitution:

    linkchecker --config <(printf '%s\n' '[filtering]' 'ignorewarnings=http-redirected') ...

This, however, does not work in the current code because these are
typically implemented as FIFOs, which don't pass the `os.path.isfile`
check:

    WARNING linkcheck.cmdline 2023-10-31 00:12:09,678 MainThread Unreadable config file: '/dev/fd/63'

Allow reading FIFOs as config input so that this is possible.
`fileutil.is_readable` also now doesn't check if the path leads to a
regular file: this is only used as part of cookie and config file input,
and in both cases that's not really relevant.
2023-10-31 00:31:28 +00:00
Chris Mayo
16621d475b
Merge pull request #754 from cjmayo/docs
Minor documentation updates
2023-09-04 19:23:56 +01:00
Chris Mayo
384048d303 Improve application logging configuration comment 2023-08-28 19:32:28 +01:00
Chris Mayo
b3429c4759 Remove support for nntp and telnet
Python is dropping nntplib and telnetlib.
2023-08-28 19:24:57 +01:00
Chris Mayo
23823779ee Fix --password option being ignored
--password should set options.password to True. store_true also creates
a default value of False.
2023-05-03 19:24:53 +01:00
Chris Mayo
1341ee92bc Fix errors found by Pylint
Remove code for old-style classes:
better_exchook2.py:238:62: E1101: Module 'types' has no 'InstanceType' member (no-member)

Command-line equivalent of 9a33c2a65 ("Make requesting login form password work on Python 3", 2020-04-14):
command/setup_config.py:167:36: E1101: Module 'linkcheck.director.console' has no 'encode' member (no-member)

Add missing argument:
plugins/parseword.py:141:31: E1120: No value for argument 'wrange' in function call (no-value-for-parameter)
2023-05-03 19:24:53 +01:00
Chris Mayo
b6bc366af0 Run pyupgrade --py37-plus x 2 2022-11-08 19:21:29 +00:00
Chris Mayo
10f3d33041 Finish documenting the use of XDG_CONFIG_HOME and XDG_DATA_HOME
Introduced by:
a03e2e4a ("use xdg dirs for config & data", 2017-10-17)
2022-08-23 19:21:53 +01:00
Chris Mayo
141a811ba6 Enable creating a binary with PyOxidizer
With PyOxidizer 0.18.0 AppName in setup.py has to be changed to the
all lower case "linkchecker".

Application translations do not work.

better_exchook2.fallback_findfile() may still need converting, first
needs a test.
2021-12-30 19:27:04 +00:00
Chris Mayo
8bc3b39b41 One more proxy documentation update
a2e379a5 ("Remove built-in GNOME and KDE proxy support", 2021-12-13)
2021-12-21 19:23:00 +00:00
Chris Mayo
5fef9a3b60 Generate linkchecker command using an entry point
drop_privileges() is only used by the linkchecker command.
Move installing SIGUSR1 handler to the linkchecker command only - fixes
intermittent test failures.
2021-12-20 19:34:58 +00:00