diff --git a/.pyup.yml b/.pyup.yml index 18ec25a64..3fbe456dc 100644 --- a/.pyup.yml +++ b/.pyup.yml @@ -1 +1 @@ -schedule: "every week" +schedule: "every week on monday" diff --git a/CONTRIBUTING.asciidoc b/CONTRIBUTING.asciidoc index 7d42cad28..9567b26a3 100644 --- a/CONTRIBUTING.asciidoc +++ b/CONTRIBUTING.asciidoc @@ -479,7 +479,8 @@ The following arguments are supported for `@cmdutils.argument`: - `win_id=True`: Mark the argument as special window ID argument - `count=True`: Mark the argument as special count argument - `hide=True`: Hide the argument from the documentation -- `completion`: A `usertypes.Completion` member to use as completion. +- `completion`: A completion function (see `qutebrowser.completions.models.*`) + to use when completing arguments for the given command. - `choices`: The allowed string choices for the argument. The name of an argument will always be the parameter name, with any trailing diff --git a/INSTALL.asciidoc b/INSTALL.asciidoc index d53c33fa3..e8ce36c48 100644 --- a/INSTALL.asciidoc +++ b/INSTALL.asciidoc @@ -85,7 +85,7 @@ qutebrowser is available in the official repositories for Fedora 22 and newer. # dnf install qutebrowser ---- -It's also recommended to install `qt5-qtwebengine` and start with `--backend +It's also recommended to install `python3-qt5-webengine` and start with `--backend webengine` to use the new backend. On Archlinux @@ -175,6 +175,12 @@ If video or sound don't seem to work, try installing the gstreamer plugins: # emerge -av gst-plugins-{base,good,bad,ugly,libav} ---- +To be able to play videos with proprietary codecs with QtWebEngine, you will +need to turn off the `bindist` flag for `dev-qt/qtwebengine`. + +See the https://wiki.gentoo.org/wiki/Qutebrowser#USE_flags[Gentoo Wiki] for +more information. + On Void Linux ------------- diff --git a/misc/requirements/requirements-codecov.txt b/misc/requirements/requirements-codecov.txt index 98979c4d8..c971e2306 100644 --- a/misc/requirements/requirements-codecov.txt +++ b/misc/requirements/requirements-codecov.txt @@ -5,5 +5,5 @@ chardet==3.0.4 codecov==2.0.9 coverage==4.4.1 idna==2.6 -requests==2.18.3 +requests==2.18.4 urllib3==1.22 diff --git a/misc/requirements/requirements-pylint-master.txt b/misc/requirements/requirements-pylint-master.txt index ec4693abf..cf2c98f5a 100644 --- a/misc/requirements/requirements-pylint-master.txt +++ b/misc/requirements/requirements-pylint-master.txt @@ -10,7 +10,7 @@ lazy-object-proxy==1.3.1 mccabe==0.6.1 -e git+https://github.com/PyCQA/pylint.git#egg=pylint ./scripts/dev/pylint_checkers -requests==2.18.3 +requests==2.18.4 six==1.10.0 uritemplate==3.0.0 uritemplate.py==3.0.2 diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index dde7a5ad1..1146932c3 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -10,7 +10,7 @@ lazy-object-proxy==1.3.1 mccabe==0.6.1 pylint==1.7.2 ./scripts/dev/pylint_checkers -requests==2.18.3 +requests==2.18.4 six==1.10.0 uritemplate==3.0.0 uritemplate.py==3.0.2 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index 12a291c42..e59a553b9 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -9,10 +9,10 @@ decorator==4.1.2 EasyProcess==0.2.3 fields==5.0.0 Flask==0.12.2 -glob2==0.5 +glob2==0.6 httpbin==0.5.0 hunter==1.4.1 -hypothesis==3.18.0 +hypothesis==3.19.1 itsdangerous==0.24 # Jinja2==2.9.6 Mako==1.0.7 @@ -30,10 +30,10 @@ pytest-instafail==0.3.0 pytest-mock==1.6.2 pytest-qt==2.1.2 pytest-repeat==0.4.1 -pytest-rerunfailures==2.2 +pytest-rerunfailures==3.0 pytest-travis-fold==1.2.0 pytest-xvfb==1.0.0 PyVirtualDisplay==0.2.1 six==1.10.0 -vulture==0.24 +vulture==0.25 Werkzeug==0.12.2 diff --git a/misc/requirements/requirements-vulture.txt b/misc/requirements/requirements-vulture.txt index 5c26fc57c..fe2228c5f 100644 --- a/misc/requirements/requirements-vulture.txt +++ b/misc/requirements/requirements-vulture.txt @@ -1,3 +1,3 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py -vulture==0.24 +vulture==0.25 diff --git a/misc/userscripts/format_json b/misc/userscripts/format_json new file mode 100755 index 000000000..f756850f1 --- /dev/null +++ b/misc/userscripts/format_json @@ -0,0 +1,47 @@ +#!/bin/sh +# +# Behavior: +# Userscript for qutebrowser which will take the raw JSON text of the current +# page, format it using `jq`, will add syntax highlighting using `pygments`, +# and open the syntax highlighted pretty printed html in a new tab. If the file +# is larger than 10MB then this script will only indent the json and will forego +# syntax highlighting using pygments. +# +# In order to use this script, just start it using `spawn --userscript` from +# qutebrowser. I recommend using an alias, e.g. put this in the +# [alias]-section of qutebrowser.conf: +# +# json = spawn --userscript /path/to/json_format +# +# Note that the color style defaults to monokai, but a different pygments style +# can be passed as the first parameter to the script. A full list of the pygments +# styles can be found at: https://help.farbox.com/pygments.html +# +# Bryan Gilbert, 2017 + +# default style to monokai if none is provided +STYLE=${1:-monokai} +# format json using jq +FORMATTED_JSON="$(cat "$QUTE_TEXT" | jq '.')" + +# if jq command failed or formatted json is empty, assume failure and terminate +if [ $? -ne 0 ] || [ -z "$FORMATTED_JSON" ]; then + echo "Invalid json, aborting..." + exit 1 +fi + +# calculate the filesize of the json document +FILE_SIZE=$(ls -s --block-size=1048576 "$QUTE_TEXT" | cut -d' ' -f1) + +# use pygments to pretty-up the json (syntax highlight) if file is less than 10MB +if [ "$FILE_SIZE" -lt "10" ]; then + FORMATTED_JSON="$(echo "$FORMATTED_JSON" | pygmentize -l json -f html -O full,style=$STYLE)" +fi + +# create a temp file and write the formatted json to that file +TEMP_FILE="$(mktemp --suffix '.html')" +echo "$FORMATTED_JSON" > $TEMP_FILE + + +# send the command to qutebrowser to open the new file containing the formatted json +echo "open -t file://$TEMP_FILE" >> "$QUTE_FIFO" diff --git a/misc/userscripts/password_fill b/misc/userscripts/password_fill index 327a55690..00dd55e63 100755 --- a/misc/userscripts/password_fill +++ b/misc/userscripts/password_fill @@ -327,6 +327,17 @@ open_entry "$file" js() { cat < 0 && elem.offsetHeight > 0; + }; function hasPasswordField(form) { var inputs = form.getElementsByTagName("input"); for (var j = 0; j < inputs.length; j++) { @@ -341,7 +352,7 @@ cat <