Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Reflector.py2
-rw-r--r--man.md/reflector.1.md47
-rw-r--r--setup.py2
3 files changed, 49 insertions, 2 deletions
diff --git a/Reflector.py b/Reflector.py
index 54e98e0..5263316 100644
--- a/Reflector.py
+++ b/Reflector.py
@@ -128,7 +128,7 @@ def get_mirrorstatus(
return obj, mtime
except (IOError, urllib.error.URLError, socket.timeout) as err:
- raise MirrorStatusError(str(err))
+ raise MirrorStatusError(f'failed to retrieve mirrorstatus data: {err.__class__.__name__}: {err}')
# ------------------------------ Miscellaneous ------------------------------- #
diff --git a/man.md/reflector.1.md b/man.md/reflector.1.md
new file mode 100644
index 0000000..ef107ce
--- /dev/null
+++ b/man.md/reflector.1.md
@@ -0,0 +1,47 @@
+# Name
+
+reflector - retrieve and filter the latest Pacman mirrorlist
+
+# Synopsis
+
+`reflector [arguments]`
+
+
+# Description
+
+reflector is a Python script and associated Python module that can retrieve up-to-date Arch Linux mirror data from the [Mirror Status](https://www.archlinux.org/mirrors/status/) web interface.
+
+
+# Arguments
+
+See `reflector --help`.
+
+# Examples
+
+Print the latest mirrorlist to STDOUT:
+
+~~~{.sh}
+reflector
+~~~
+
+Sort the five most recently synchronized mirrors by download speed and overwrite the local mirrorlist:
+
+~~~{.sh}
+reflector --latest 5 --sort rate --save /etc/pacman.d/mirrorlist
+~~~
+
+Select the 200 most recently synchronized HTTP or HTTPS mirrors, sort them by download speed, and overwrite the file /etc/pacman.d/mirrorlist:
+
+~~~{.sh}
+reflector --latest 200 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist
+~~~
+
+Select the HTTPS mirrors synchronized within the last 12 hours and located in either France or Germany, sort them by download speed, and overwrite the file `/etc/pacman.d/mirrorlist` with the results:
+
+~~~{.sh}
+reflector --country France --country Germany --age 12 --protocol https --sort rate --save /etc/pacman.d/mirrorlist
+~~~
+
+# See Also
+
+`pacman(8)`
diff --git a/setup.py b/setup.py
index 6957e7e..362d2e7 100644
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@ import time
setup(
name='''Reflector''',
- version=time.strftime('%Y.%m.%d.%H.%M.%S', time.gmtime(1584536584)),
+ version=time.strftime('%Y.%m.%d.%H.%M.%S', time.gmtime(1584789765)),
description='''A Python 3 module and script to retrieve and filter the latest Pacman mirror list.''',
author='''Xyne''',
author_email='''ac xunilhcra enyx, backwards''',