Browse Source

qute

master
John ShaggyTwoDope Jenkins 6 years ago
parent
commit
bbb6c5fee6
100 changed files with 7451 additions and 0 deletions
  1. 32
    0
      qutebrowser-git/.SRCINFO
  2. 68
    0
      qutebrowser-git/PKGBUILD
  3. 12
    0
      qutebrowser-git/pkg/qutebrowser-git/.INSTALL
  4. BIN
      qutebrowser-git/pkg/qutebrowser-git/.MTREE
  5. 37
    0
      qutebrowser-git/pkg/qutebrowser-git/.PKGINFO
  6. 10
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/bin/qutebrowser
  7. 231
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser-0.1.0-py3.4.egg-info/PKG-INFO
  8. 186
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser-0.1.0-py3.4.egg-info/SOURCES.txt
  9. 1
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser-0.1.0-py3.4.egg-info/dependency_links.txt
  10. 3
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser-0.1.0-py3.4.egg-info/entry_points.txt
  11. 3
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser-0.1.0-py3.4.egg-info/requires.txt
  12. 2
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser-0.1.0-py3.4.egg-info/top_level.txt
  13. 1
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser-0.1.0-py3.4.egg-info/zip-safe
  14. 35
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/__init__.py
  15. 29
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/__main__.py
  16. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/__pycache__/__init__.cpython-34.pyc
  17. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/__pycache__/__init__.cpython-34.pyo
  18. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/__pycache__/__main__.cpython-34.pyc
  19. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/__pycache__/__main__.cpython-34.pyo
  20. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/__pycache__/app.cpython-34.pyc
  21. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/__pycache__/app.cpython-34.pyo
  22. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/__pycache__/qutebrowser.cpython-34.pyc
  23. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/__pycache__/qutebrowser.cpython-34.pyo
  24. 820
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/app.py
  25. 20
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__init__.py
  26. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/__init__.cpython-34.pyc
  27. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/__init__.cpython-34.pyo
  28. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/adblock.cpython-34.pyc
  29. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/adblock.cpython-34.pyo
  30. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/cache.cpython-34.pyc
  31. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/cache.cpython-34.pyo
  32. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/commands.cpython-34.pyc
  33. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/commands.cpython-34.pyo
  34. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/cookies.cpython-34.pyc
  35. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/cookies.cpython-34.pyo
  36. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/downloads.cpython-34.pyc
  37. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/downloads.cpython-34.pyo
  38. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/downloadview.cpython-34.pyc
  39. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/downloadview.cpython-34.pyo
  40. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/hints.cpython-34.pyc
  41. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/hints.cpython-34.pyo
  42. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/http.cpython-34.pyc
  43. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/http.cpython-34.pyo
  44. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/quickmarks.cpython-34.pyc
  45. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/quickmarks.cpython-34.pyo
  46. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/rfc6266.cpython-34.pyc
  47. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/rfc6266.cpython-34.pyo
  48. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/signalfilter.cpython-34.pyc
  49. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/signalfilter.cpython-34.pyo
  50. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/webelem.cpython-34.pyc
  51. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/webelem.cpython-34.pyo
  52. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/webpage.cpython-34.pyc
  53. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/webpage.cpython-34.pyo
  54. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/webview.cpython-34.pyc
  55. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/webview.cpython-34.pyo
  56. 225
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/adblock.py
  57. 157
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/cache.py
  58. 985
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/commands.py
  59. 98
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/cookies.py
  60. 815
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/downloads.py
  61. 141
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/downloadview.py
  62. 835
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/hints.py
  63. 85
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/http.py
  64. 3
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/network/__init__.py
  65. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/network/__pycache__/__init__.cpython-34.pyc
  66. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/network/__pycache__/__init__.cpython-34.pyo
  67. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/network/__pycache__/networkmanager.cpython-34.pyc
  68. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/network/__pycache__/networkmanager.cpython-34.pyo
  69. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/network/__pycache__/networkreply.cpython-34.pyc
  70. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/network/__pycache__/networkreply.cpython-34.pyo
  71. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/network/__pycache__/pastebin.cpython-34.pyc
  72. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/network/__pycache__/pastebin.cpython-34.pyo
  73. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/network/__pycache__/proxy.cpython-34.pyc
  74. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/network/__pycache__/proxy.cpython-34.pyo
  75. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/network/__pycache__/qutescheme.cpython-34.pyc
  76. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/network/__pycache__/qutescheme.cpython-34.pyo
  77. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/network/__pycache__/schemehandler.cpython-34.pyc
  78. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/network/__pycache__/schemehandler.cpython-34.pyo
  79. 260
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/network/networkmanager.py
  80. 128
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/network/networkreply.py
  81. 101
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/network/pastebin.py
  82. 50
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/network/proxy.py
  83. 183
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/network/qutescheme.py
  84. 51
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/network/schemehandler.py
  85. 140
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/quickmarks.py
  86. 336
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/rfc6266.py
  87. 95
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/signalfilter.py
  88. 418
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/webelem.py
  89. 344
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/webpage.py
  90. 491
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/webview.py
  91. 20
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/commands/__init__.py
  92. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/commands/__pycache__/__init__.cpython-34.pyc
  93. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/commands/__pycache__/__init__.cpython-34.pyo
  94. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/commands/__pycache__/argparser.cpython-34.pyc
  95. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/commands/__pycache__/argparser.cpython-34.pyo
  96. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/commands/__pycache__/cmdexc.cpython-34.pyc
  97. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/commands/__pycache__/cmdexc.cpython-34.pyo
  98. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/commands/__pycache__/cmdutils.cpython-34.pyc
  99. BIN
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/commands/__pycache__/cmdutils.cpython-34.pyo
  100. 0
    0
      qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/commands/__pycache__/command.cpython-34.pyc

+ 32
- 0
qutebrowser-git/.SRCINFO View File

@@ -0,0 +1,32 @@
pkgbase = qutebrowser-git
pkgdesc = A keyboard-driven, vim-like browser based on PyQt5 and QtWebKit
pkgver = r3206.3622f35
pkgrel = 3
url = http://www.qutebrowser.org/
install = qutebrowser-git.install
arch = any
license = GPL
makedepends = asciidoc
depends = python>=3.4
depends = python-setuptools
depends = python-pyqt5>=5.2
depends = qt5-base>=5.2
depends = qt5-webkit>=5.2
depends = libxkbcommon-x11
depends = python-pypeg2
depends = python-jinja
depends = python-pygments
optdepends = python-colorlog: colored logging output
optdepends = gst-libav: media playback
optdepends = gst-plugins-base: media playback
optdepends = gst-plugins-good: media playback
optdepends = gst-plugins-bad: media playback
optdepends = gst-plugins-ugly: media playback
options = !emptydirs
source = git+https://github.com/The-Compiler/qutebrowser.git
source = qutebrowser-git.install
sha256sums = SKIP
sha256sums = 3622243cf88eef2bb3381fec5e3cede59288b263a0ef6387510e0ad92e2cb690

pkgname = qutebrowser-git


+ 68
- 0
qutebrowser-git/PKGBUILD View File

@@ -0,0 +1,68 @@
# Maintainer: Florian Bruhin (The Compiler) <archlinux.org@the-compiler.org>
# vim: set ts=2 sw=2 et ft=sh:

pkgname=qutebrowser-git
pkgver=r3440.b06d8c5
pkgrel=1
pkgdesc="A keyboard-driven, vim-like browser based on PyQt5 and QtWebKit"
arch=(any)
url="http://www.qutebrowser.org/"
license=('GPL')
depends=('python>=3.4' 'python-setuptools' 'python-pyqt5>=5.2' 'qt5-base>=5.2'
'qt5-webkit>=5.2' 'libxkbcommon-x11' 'python-pypeg2' 'python-jinja'
'python-pygments')
makedepends=('asciidoc')
optdepends=(
'python-colorlog: colored logging output'
'gst-libav: media playback'
'gst-plugins-base: media playback'
'gst-plugins-good: media playback'
'gst-plugins-bad: media playback'
'gst-plugins-ugly: media playback'
)
options=(!emptydirs)
source=('git+https://github.com/The-Compiler/qutebrowser.git'
'qutebrowser-git.install')
sha256sums=('SKIP'
'3622243cf88eef2bb3381fec5e3cede59288b263a0ef6387510e0ad92e2cb690')
install=qutebrowser-git.install

pkgver() {
cd "$srcdir/qutebrowser"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
cd "$srcdir/qutebrowser"
python scripts/asciidoc2html.py
a2x -f manpage doc/qutebrowser.1.asciidoc
python setup.py build
}

package() {
cd "$srcdir/qutebrowser"
python setup.py install --root="$pkgdir/" --optimize=1
install -Dm644 doc/qutebrowser.1 "$pkgdir/usr/share/man/man1/qutebrowser.1"
install -Dm755 qutebrowser.desktop \
"$pkgdir/usr/share/applications/qutebrowser.desktop"
install -Dm755 icons/qutebrowser-16x16.png \
"$pkgdir/usr/share/icons/hicolor/16x16/apps/qutebrowser.png"
install -Dm755 icons/qutebrowser-24x24.png \
"$pkgdir/usr/share/icons/hicolor/24x24/apps/qutebrowser.png"
install -Dm755 icons/qutebrowser-32x32.png \
"$pkgdir/usr/share/icons/hicolor/32x32/apps/qutebrowser.png"
install -Dm755 icons/qutebrowser-48x48.png \
"$pkgdir/usr/share/icons/hicolor/48x48/apps/qutebrowser.png"
install -Dm755 icons/qutebrowser-64x64.png \
"$pkgdir/usr/share/icons/hicolor/64x64/apps/qutebrowser.png"
install -Dm755 icons/qutebrowser-96x96.png \
"$pkgdir/usr/share/icons/hicolor/96x96/apps/qutebrowser.png"
install -Dm755 icons/qutebrowser-128x128.png \
"$pkgdir/usr/share/icons/hicolor/128x128/apps/qutebrowser.png"
install -Dm755 icons/qutebrowser-256x256.png \
"$pkgdir/usr/share/icons/hicolor/256x256/apps/qutebrowser.png"
install -Dm755 icons/qutebrowser-512x512.png \
"$pkgdir/usr/share/icons/hicolor/512x512/apps/qutebrowser.png"
install -Dm755 icons/qutebrowser.svg \
"$pkgdir/usr/share/icons/hicolor/scalable/apps/qutebrowser.svg"
}

+ 12
- 0
qutebrowser-git/pkg/qutebrowser-git/.INSTALL View File

@@ -0,0 +1,12 @@
post_install() {
gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
update-desktop-database -q
}

post_upgrade() {
post_install
}

post_remove() {
post_install
}

BIN
qutebrowser-git/pkg/qutebrowser-git/.MTREE View File


+ 37
- 0
qutebrowser-git/pkg/qutebrowser-git/.PKGINFO View File

@@ -0,0 +1,37 @@
# Generated by makepkg 4.1.2
# using fakeroot version 1.20.2
# Tue Dec 16 09:21:31 UTC 2014
pkgname = qutebrowser-git
pkgver = r3440.b06d8c5-1
pkgdesc = A keyboard-driven, vim-like browser based on PyQt5 and QtWebKit
url = http://www.qutebrowser.org/
builddate = 1418721691
packager = Unknown Packager
size = 4097024
arch = any
license = GPL
depend = python>=3.4
depend = python-setuptools
depend = python-pyqt5>=5.2
depend = qt5-base>=5.2
depend = qt5-webkit>=5.2
depend = libxkbcommon-x11
depend = python-pypeg2
depend = python-jinja
depend = python-pygments
optdepend = python-colorlog: colored logging output
optdepend = gst-libav: media playback
optdepend = gst-plugins-base: media playback
optdepend = gst-plugins-good: media playback
optdepend = gst-plugins-bad: media playback
optdepend = gst-plugins-ugly: media playback
makedepend = asciidoc
makepkgopt = strip
makepkgopt = docs
makepkgopt = !libtool
makepkgopt = !staticlibs
makepkgopt = !emptydirs
makepkgopt = zipman
makepkgopt = purge
makepkgopt = !upx
makepkgopt = !debug

+ 10
- 0
qutebrowser-git/pkg/qutebrowser-git/usr/bin/qutebrowser View File

@@ -0,0 +1,10 @@
#!/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'qutebrowser==0.1.0','gui_scripts','qutebrowser'
__requires__ = 'qutebrowser==0.1.0'
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
sys.exit(
load_entry_point('qutebrowser==0.1.0', 'gui_scripts', 'qutebrowser')()
)

+ 231
- 0
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser-0.1.0-py3.4.egg-info/PKG-INFO View File

@@ -0,0 +1,231 @@
Metadata-Version: 1.1
Name: qutebrowser
Version: 0.1.0
Summary: A keyboard-driven, vim-like browser based on PyQt5 and QtWebKit.
Home-page: http://www.qutebrowser.org/
Author: Florian Bruhin
Author-email: mail@qutebrowser.org
License: GPL
Description: // If you are reading this in plaintext or on PyPi:
//
// A rendered version is available at:
// https://github.com/The-Compiler/qutebrowser/blob/master/README.asciidoc
qutebrowser
===========
image:icons/qutebrowser-64x64.png[] _A keyboard-driven, vim-like browser based
on PyQt5 and QtWebKit._
qutebrowser is a keyboard-focused browser with with a minimal GUI. It's based
on Python, PyQt5 and QtWebKit and free software, licensed under the GPL.
It was inspired by other browsers/addons like dwb and Vimperator/Pentadactyl.
Screenshots
-----------
image:doc/img/main.png[width=300,link="doc/img/main.png"]
image:doc/img/downloads.png[width=300,link="doc/img/downloads.png"]
image:doc/img/completion.png[width=300,link="doc/img/completion.png"]
image:doc/img/hints.png[width=300,link="doc/img/hints.png"]
Downloads
---------
See the https://github.com/The-Compiler/qutebrowser/releases[github releases
page] for available downloads (currently a source archive, and standalone
packages as well as MSI installers for Windows).
See link:doc/INSTALL.asciidoc[INSTALL] for detailed instructions on how to get
qutebrowser running for various platforms.
Documentation
-------------
In addition to the topics mentioned in this README, the following documents are
available:
* A http://qutebrowser.org/img/cheatsheet-big.png[keybinding cheatsheet]: +
image:http://qutebrowser.org/img/cheatsheet-small.png["qutebrowser keybinding cheatsheet",link="http://qutebrowser.org/img/cheatsheet-big.png"]
* link:doc/quickstart.asciidoc[Quick start guide]
* link:doc/FAQ.asciidoc[Frequently asked questions]
* link:doc/HACKING.asciidoc[HACKING]
* link:doc/INSTALL.asciidoc[INSTALL]
* link:doc/stacktrace.asciidoc[Reporting segfaults]
Getting help
------------
You can get help in the IRC channel
irc://irc.freenode.org/#qutebrowser[`#qutebrowser`] on
http://freenode.net/[Freenode]
(https://webchat.freenode.net/?channels=#qutebrowser[webchat]), or by writing a
message to the
https://lists.schokokeks.org/mailman/listinfo.cgi/qutebrowser[mailinglist] at
mailto:qutebrowser@lists.qutebrowser.org[].
Contributions / Bugs
--------------------
You want to contribute to qutebrowser? Awesome! Please read
link:doc/HACKING.asciidoc[HACKING] for details and useful hints.
If you found a bug or have a feature request, you can report it in several
ways:
* Use the built-in `:report` command or the automatic crash dialog.
* Open an issue in the Github issue tracker.
* Write a mail to the
https://lists.schokokeks.org/mailman/listinfo.cgi/qutebrowser[mailinglist] at
mailto:qutebrowser@lists.qutebrowser.org[].
For security bugs, please contact me directly at mail@qutebrowser.org, GPG ID
http://www.the-compiler.org/pubkey.asc[0xFD55A072].
Requirements
------------
The following software and libraries are required to run qutebrowser:
* http://www.python.org/[Python] 3.4
* http://qt-project.org/[Qt] 5.2.0 or newer (5.4 recommended)
* QtWebKit
* http://www.riverbankcomputing.com/software/pyqt/intro[PyQt] 5.2.0 or newer
(5.3.2 recommended) for Python 3
* https://pypi.python.org/pypi/setuptools/[pkg_resources/setuptools]
* http://fdik.org/pyPEG/[pyPEG2]
* http://jinja.pocoo.org/[jinja2]
* http://pygments.org/[pygments]
To generate the documentation for the `:help` command, when using the git
repository (rather than a release), http://asciidoc.org/[asciidoc] is needed.
The following libraries are optional and provide colored logging in the
console:
* https://pypi.python.org/pypi/colorlog/[colorlog]
* On Windows: https://pypi.python.org/pypi/colorama/[colorama]
See link:doc/INSTALL.asciidoc[INSTALL] for directions on how to install
qutebrowser and its dependencies.
Donating
--------
Working on qutebrowser is a very rewarding hobby, but like (nearly) all hobbies
it also costs some money. Namely I have to pay for the server and domain, and
do occasional hardware upgrades footnote:[It turned out a 160 GB SSD is rather
small - the VMs and custom Qt builds I use for testing/developing qutebrowser
need about 100 GB of space].
If you want to give me a beer or a pizza back, I'm trying to make it as easy as
possible for you to do so. If some other way would be easier for you, please
get in touch!
* PayPal: me@the-compiler.org
* Bitcoin: link:bitcoin:1PMzbcetAHfpxoXww8Bj5XqquHtVvMjJtE[1PMzbcetAHfpxoXww8Bj5XqquHtVvMjJtE]
Authors
-------
Contributors, sorted by the number of commits in descending order:
// QUTE_AUTHORS_START
* Florian Bruhin
* Claude
* rikn00
* Brian Jackson
* Mathias Fussenegger
* Larry Hynes
* Johannes Altmanninger
* Peter Vilim
* Martin Zimmermann
// QUTE_AUTHORS_END
The following people have contributed graphics:
* WOFall (icon)
* regines (keybinding cheatsheet)
Thanks / Similiar projects
--------------------------
Many projects with a similar goal as qutebrowser exist:
* http://portix.bitbucket.org/dwb/[dwb] (C, GTK+ with WebKit1, currently
http://www.reddit.com/r/linux/comments/2huqbc/dwb_abandoned/[unmaintained] -
main inspiration for qutebrowser)
* https://github.com/fanglingsu/vimb[vimb] (C, GTK+ with WebKit1, active)
* http://sourceforge.net/p/vimprobable/wiki/Home/[vimprobable] (C, GTK+ with
WebKit1, active)
* http://surf.suckless.org/[surf] (C, GTK+ with WebKit1, active)
* https://mason-larobina.github.io/luakit/[luakit] (C/Lua, GTK+ with
WebKit1, not very active)
* http://pwmt.org/projects/jumanji/[jumanji] (C, GTK+ with WebKit1, not very
active)
* http://www.uzbl.org/[uzbl] (C, GTK+ with WebKit1/WebKit2, active)
* http://conkeror.org/[conkeror] (Javascript, Emacs-like, XULRunner/Gecko,
active)
* https://github.com/AeroNotix/lispkit[lispkit] (quite new, lisp, GTK+ with
WebKit, active)
* http://www.vimperator.org/[Vimperator] (Firefox addon)
* http://5digits.org/pentadactyl/[Pentadactyl] (Firefox addon)
* https://github.com/akhodakivskiy/VimFx[VimFx] (Firefox addon)
* http://vimium.github.io/[vimium] (Chrome/Chromium addon)
Most of them were inspirations for qutebrowser in some way, thanks for that!
Thanks as well to the following projects and people for helping me with
problems and helpful hints:
* http://eric-ide.python-projects.org/[eric5] / Detlev Offenbach
* https://code.google.com/p/devicenzo/[devicenzo]
* portix
* seir
* nitroxleecher
Also, thanks to:
* Everyone who had the patience to test qutebrowser before v0.1.
* Everyone triaging/fixing my bugs in the
https://bugreports.qt-project.org/secure/Dashboard.jspa[Qt bugtracker]
* Everyone answering my questions on http://stackoverflow.com/[Stack Overflow]
and in IRC.
* All the projects which were a great help while developing qutebrowser.
License
-------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Keywords: pyqt browser web qt webkit
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: X11 Applications :: Qt
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Natural Language :: English
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: Microsoft :: Windows :: Windows XP
Classifier: Operating System :: Microsoft :: Windows :: Windows 7
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Topic :: Internet
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
Requires: pypeg2
Requires: jinja2
Requires: pygments

+ 186
- 0
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser-0.1.0-py3.4.egg-info/SOURCES.txt View File

@@ -0,0 +1,186 @@
COPYING
MANIFEST.in
README.asciidoc
qutebrowser.desktop
setup.py
doc/FAQ.asciidoc
doc/HACKING.asciidoc
doc/INSTALL.asciidoc
doc/quickstart.asciidoc
doc/qutebrowser.1
doc/qutebrowser.1.asciidoc
doc/stacktrace.asciidoc
icons/qutebrowser-128x128.png
icons/qutebrowser-16x16.png
icons/qutebrowser-24x24.png
icons/qutebrowser-256x256.png
icons/qutebrowser-32x32.png
icons/qutebrowser-48x48.png
icons/qutebrowser-512x512.png
icons/qutebrowser-64x64.png
icons/qutebrowser-96x96.png
icons/qutebrowser.ico
icons/qutebrowser.svg
qutebrowser/__init__.py
qutebrowser/__main__.py
qutebrowser/app.py
qutebrowser/git-commit-id
qutebrowser/qutebrowser.py
qutebrowser.egg-info/PKG-INFO
qutebrowser.egg-info/SOURCES.txt
qutebrowser.egg-info/dependency_links.txt
qutebrowser.egg-info/entry_points.txt
qutebrowser.egg-info/requires.txt
qutebrowser.egg-info/top_level.txt
qutebrowser.egg-info/zip-safe
qutebrowser/browser/__init__.py
qutebrowser/browser/adblock.py
qutebrowser/browser/cache.py
qutebrowser/browser/commands.py
qutebrowser/browser/cookies.py
qutebrowser/browser/downloads.py
qutebrowser/browser/downloadview.py
qutebrowser/browser/hints.py
qutebrowser/browser/http.py
qutebrowser/browser/quickmarks.py
qutebrowser/browser/rfc6266.py
qutebrowser/browser/signalfilter.py
qutebrowser/browser/webelem.py
qutebrowser/browser/webpage.py
qutebrowser/browser/webview.py
qutebrowser/browser/network/__init__.py
qutebrowser/browser/network/networkmanager.py
qutebrowser/browser/network/networkreply.py
qutebrowser/browser/network/pastebin.py
qutebrowser/browser/network/proxy.py
qutebrowser/browser/network/qutescheme.py
qutebrowser/browser/network/schemehandler.py
qutebrowser/commands/__init__.py
qutebrowser/commands/argparser.py
qutebrowser/commands/cmdexc.py
qutebrowser/commands/cmdutils.py
qutebrowser/commands/command.py
qutebrowser/commands/runners.py
qutebrowser/commands/userscripts.py
qutebrowser/completion/__init__.py
qutebrowser/completion/completer.py
qutebrowser/completion/completiondelegate.py
qutebrowser/completion/completionwidget.py
qutebrowser/completion/models/__init__.py
qutebrowser/completion/models/base.py
qutebrowser/completion/models/completion.py
qutebrowser/completion/models/sortfilter.py
qutebrowser/config/__init__.py
qutebrowser/config/config.py
qutebrowser/config/configdata.py
qutebrowser/config/configtypes.py
qutebrowser/config/sections.py
qutebrowser/config/style.py
qutebrowser/config/textwrapper.py
qutebrowser/config/value.py
qutebrowser/config/websettings.py
qutebrowser/config/parsers/__init__.py
qutebrowser/config/parsers/ini.py
qutebrowser/config/parsers/keyconf.py
qutebrowser/config/parsers/line.py
qutebrowser/html/COPYING.html
qutebrowser/html/base.html
qutebrowser/html/error.html
qutebrowser/html/log.html
qutebrowser/html/pre.html
qutebrowser/html/settings.html
qutebrowser/html/version.html
qutebrowser/html/doc/FAQ.html
qutebrowser/html/doc/commands.html
qutebrowser/html/doc/index.html
qutebrowser/html/doc/quickstart.html
qutebrowser/html/doc/settings.html
qutebrowser/keyinput/__init__.py
qutebrowser/keyinput/basekeyparser.py
qutebrowser/keyinput/keyparser.py
qutebrowser/keyinput/modeman.py
qutebrowser/keyinput/modeparsers.py
qutebrowser/mainwindow/__init__.py
qutebrowser/mainwindow/mainwindow.py
qutebrowser/mainwindow/tabbedbrowser.py
qutebrowser/mainwindow/tabwidget.py
qutebrowser/mainwindow/statusbar/__init__.py
qutebrowser/mainwindow/statusbar/bar.py
qutebrowser/mainwindow/statusbar/command.py
qutebrowser/mainwindow/statusbar/keystring.py
qutebrowser/mainwindow/statusbar/percentage.py
qutebrowser/mainwindow/statusbar/progress.py
qutebrowser/mainwindow/statusbar/prompt.py
qutebrowser/mainwindow/statusbar/prompter.py
qutebrowser/mainwindow/statusbar/text.py
qutebrowser/mainwindow/statusbar/textbase.py
qutebrowser/mainwindow/statusbar/url.py
qutebrowser/misc/__init__.py
qutebrowser/misc/checkpyver.py
qutebrowser/misc/cmdhistory.py
qutebrowser/misc/consolewidget.py
qutebrowser/misc/crashdialog.py
qutebrowser/misc/earlyinit.py
qutebrowser/misc/editor.py
qutebrowser/misc/ipc.py
qutebrowser/misc/miscwidgets.py
qutebrowser/misc/readline.py
qutebrowser/misc/split.py
qutebrowser/misc/utilcmds.py
qutebrowser/test/__init__.py
qutebrowser/test/helpers.py
qutebrowser/test/stubs.py
qutebrowser/test/test_helpers.py
qutebrowser/test/testfile
qutebrowser/test/browser/test_webelem.py
qutebrowser/test/browser/http/__init__.py
qutebrowser/test/browser/http/test_content_disposition.py
qutebrowser/test/browser/http/test_http.py
qutebrowser/test/config/__init__.py
qutebrowser/test/config/test_config.py
qutebrowser/test/config/test_configtypes.py
qutebrowser/test/keyinput/__init__.py
qutebrowser/test/keyinput/test_basekeyparser.py
qutebrowser/test/misc/test_editor.py
qutebrowser/test/misc/test_readline.py
qutebrowser/test/misc/test_split.py
qutebrowser/test/utils/__init__.py
qutebrowser/test/utils/test_debug.py
qutebrowser/test/utils/test_jinja.py
qutebrowser/test/utils/test_log.py
qutebrowser/test/utils/test_qtutils.py
qutebrowser/test/utils/test_standarddir.py
qutebrowser/test/utils/test_urlutils.py
qutebrowser/test/utils/test_utils.py
qutebrowser/test/utils/usertypes/__init__.py
qutebrowser/test/utils/usertypes/test_enum.py
qutebrowser/test/utils/usertypes/test_neighborlist.py
qutebrowser/utils/__init__.py
qutebrowser/utils/debug.py
qutebrowser/utils/docutils.py
qutebrowser/utils/jinja.py
qutebrowser/utils/log.py
qutebrowser/utils/message.py
qutebrowser/utils/objreg.py
qutebrowser/utils/qtutils.py
qutebrowser/utils/standarddir.py
qutebrowser/utils/urlutils.py
qutebrowser/utils/usertypes.py
qutebrowser/utils/utils.py
qutebrowser/utils/version.py
scripts/__init__.py
scripts/asciidoc2html.py
scripts/freeze.py
scripts/hostblock_blame.py
scripts/importer.py
scripts/init_venv.py
scripts/segfault_test.py
scripts/setupcommon.py
scripts/src2asciidoc.py
scripts/utils.py
scripts/pylint_checkers/__init__.py
scripts/pylint_checkers/config.py
scripts/pylint_checkers/crlf.py
scripts/pylint_checkers/modeline.py
scripts/pylint_checkers/openencoding.py
scripts/pylint_checkers/settrace.py

+ 1
- 0
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser-0.1.0-py3.4.egg-info/dependency_links.txt View File

@@ -0,0 +1 @@


+ 3
- 0
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser-0.1.0-py3.4.egg-info/entry_points.txt View File

@@ -0,0 +1,3 @@
[gui_scripts]
qutebrowser = qutebrowser.qutebrowser:main


+ 3
- 0
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser-0.1.0-py3.4.egg-info/requires.txt View File

@@ -0,0 +1,3 @@
pypeg2
jinja2
pygments

+ 2
- 0
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser-0.1.0-py3.4.egg-info/top_level.txt View File

@@ -0,0 +1,2 @@
qutebrowser
scripts

+ 1
- 0
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser-0.1.0-py3.4.egg-info/zip-safe View File

@@ -0,0 +1 @@


+ 35
- 0
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/__init__.py View File

@@ -0,0 +1,35 @@
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:

# Copyright 2014 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# qutebrowser is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.

# pylint: disable=line-too-long

"""A keyboard-driven, vim-like browser based on PyQt5 and QtWebKit."""

import os.path

__author__ = "Florian Bruhin"
__copyright__ = "Copyright 2014 Florian Bruhin (The Compiler)"
__license__ = "GPL"
__maintainer__ = __author__
__email__ = "mail@qutebrowser.org"
__version_info__ = (0, 1, 0)
__version__ = '.'.join(map(str, __version_info__))
__description__ = "A keyboard-driven, vim-like browser based on PyQt5 and QtWebKit."

basedir = os.path.dirname(os.path.realpath(__file__))

+ 29
- 0
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/__main__.py View File

@@ -0,0 +1,29 @@
#!/usr/bin/env python3
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:

# Copyright 2014 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# qutebrowser is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.

"""Entry point for qutebrowser. Simply execute qutebrowser."""

import sys

import qutebrowser.qutebrowser


if __name__ == '__main__':
sys.exit(qutebrowser.qutebrowser.main())

BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/__pycache__/__init__.cpython-34.pyc View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/__pycache__/__init__.cpython-34.pyo View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/__pycache__/__main__.cpython-34.pyc View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/__pycache__/__main__.cpython-34.pyo View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/__pycache__/app.cpython-34.pyc View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/__pycache__/app.cpython-34.pyo View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/__pycache__/qutebrowser.cpython-34.pyc View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/__pycache__/qutebrowser.cpython-34.pyo View File


+ 820
- 0
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/app.py View File

@@ -0,0 +1,820 @@
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:

# Copyright 2014 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# qutebrowser is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.

"""Initialization of qutebrowser and application-wide things."""

import os
import sys
import subprocess
import configparser
import signal
import warnings
import bdb
import base64
import functools
import traceback
import faulthandler

from PyQt5.QtWidgets import QApplication, QDialog, QMessageBox
from PyQt5.QtGui import QDesktopServices
from PyQt5.QtCore import (pyqtSlot, qInstallMessageHandler, QTimer, QUrl,
QStandardPaths, QObject, Qt)

import qutebrowser
from qutebrowser.commands import cmdutils, runners
from qutebrowser.config import style, config, websettings
from qutebrowser.browser import quickmarks, cookies, cache, adblock
from qutebrowser.browser.network import qutescheme, proxy
from qutebrowser.mainwindow import mainwindow
from qutebrowser.misc import crashdialog, readline, ipc, earlyinit
from qutebrowser.misc import utilcmds # pylint: disable=unused-import
from qutebrowser.keyinput import modeman
from qutebrowser.utils import (log, version, message, utils, qtutils, urlutils,
debug, objreg, usertypes, standarddir)
# We import utilcmds to run the cmdutils.register decorators.


class Application(QApplication):

"""Main application instance.

Attributes:
_args: ArgumentParser instance.
_shutting_down: True if we're currently shutting down.
_quit_status: The current quitting status.
_crashdlg: The crash dialog currently open.
_crashlogfile: A file handler to the fatal crash logfile.
_event_filter: The EventFilter for the application.
geometry: The geometry of the last closed main window.
"""

def __init__(self, args):
"""Constructor.

Args:
Argument namespace from argparse.
"""
# pylint: disable=too-many-statements
self._quit_status = {
'crash': True,
'tabs': False,
'main': False,
}
self.geometry = None
self._shutting_down = False
self._crashdlg = None
self._crashlogfile = None

if args.debug:
# We don't enable this earlier because some imports trigger
# warnings (which are not our fault).
warnings.simplefilter('default')

qt_args = qtutils.get_args(args)
log.init.debug("Qt arguments: {}, based on {}".format(qt_args, args))
super().__init__(qt_args)
sys.excepthook = self._exception_hook

self._args = args
objreg.register('args', args)

objreg.register('app', self)

if self._args.version:
print(version.version())
print()
print()
print(qutebrowser.__copyright__)
print()
print(version.GPL_BOILERPLATE.strip())
sys.exit(0)

sent = ipc.send_to_running_instance(self._args.command)
if sent:
sys.exit(0)

log.init.debug("Starting init...")
self.setQuitOnLastWindowClosed(False)
self.setOrganizationName("qutebrowser")
self.setApplicationName("qutebrowser")
self.setApplicationVersion(qutebrowser.__version__)
utils.actute_warning()
try:
self._init_modules()
except OSError as e:
msgbox = QMessageBox(
QMessageBox.Critical, "Error while initializing!",
"Error while initializing: {}".format(e))
msgbox.exec_()
sys.exit(1)
QTimer.singleShot(0, self._open_pages)

log.init.debug("Initializing eventfilter...")
self._event_filter = modeman.EventFilter(self)
self.installEventFilter(self._event_filter)

log.init.debug("Connecting signals...")
self._connect_signals()

log.init.debug("Applying python hacks...")
self._python_hacks()

log.init.debug("Starting IPC server...")
ipc.init()

QDesktopServices.setUrlHandler('http', self.open_desktopservices_url)
QDesktopServices.setUrlHandler('https', self.open_desktopservices_url)
QDesktopServices.setUrlHandler('qute', self.open_desktopservices_url)

log.init.debug("Init done!")

if self._crashdlg is not None:
self._crashdlg.raise_()

def __repr__(self):
return utils.get_repr(self)

def _init_modules(self):
"""Initialize all 'modules' which need to be initialized."""
log.init.debug("Initializing readline-bridge...")
readline_bridge = readline.ReadlineBridge()
objreg.register('readline-bridge', readline_bridge)

log.init.debug("Initializing directories...")
standarddir.init()
log.init.debug("Initializing config...")
config.init(self._args)
log.init.debug("Initializing crashlog...")
self._handle_segfault()
log.init.debug("Initializing js-bridge...")
js_bridge = qutescheme.JSBridge(self)
objreg.register('js-bridge', js_bridge)
log.init.debug("Initializing websettings...")
websettings.init()
log.init.debug("Initializing adblock...")
host_blocker = adblock.HostBlocker()
host_blocker.read_hosts()
objreg.register('host-blocker', host_blocker)
log.init.debug("Initializing quickmarks...")
quickmark_manager = quickmarks.QuickmarkManager()
objreg.register('quickmark-manager', quickmark_manager)
log.init.debug("Initializing proxy...")
proxy.init()
log.init.debug("Initializing cookies...")
cookie_jar = cookies.CookieJar(self)
objreg.register('cookie-jar', cookie_jar)
log.init.debug("Initializing cache...")
diskcache = cache.DiskCache(self)
objreg.register('cache', diskcache)
log.init.debug("Initializing main window...")
win_id = mainwindow.MainWindow.spawn(
False if self._args.nowindow else True)
main_window = objreg.get('main-window', scope='window', window=win_id)
self.setActiveWindow(main_window)

def _handle_segfault(self):
"""Handle a segfault from a previous run."""
path = standarddir.get(QStandardPaths.DataLocation)
logname = os.path.join(path, 'crash.log')
try:
# First check if an old logfile exists.
if os.path.exists(logname):
with open(logname, 'r', encoding='ascii') as f:
data = f.read()
os.remove(logname)
self._init_crashlogfile()
if data:
# Crashlog exists and has data in it, so something crashed
# previously.
self._crashdlg = crashdialog.FatalCrashDialog(
self._args.debug, data)
self._crashdlg.show()
else:
# There's no log file, so we can use this to display crashes to
# the user on the next start.
self._init_crashlogfile()
except OSError:
log.init.exception("Error while handling crash log file!")
self._init_crashlogfile()

def _init_crashlogfile(self):
"""Start a new logfile and redirect faulthandler to it."""
path = standarddir.get(QStandardPaths.DataLocation)
logname = os.path.join(path, 'crash.log')
try:
self._crashlogfile = open(logname, 'w', encoding='ascii')
except OSError:
log.init.exception("Error while opening crash log file!")
else:
earlyinit.init_faulthandler(self._crashlogfile)

def _open_pages(self):
"""Open startpage etc. and process commandline args."""
self.process_args(self._args.command)
self._open_startpage()
self._open_quickstart()

def _get_window(self, via_ipc, force_window=False, force_tab=False):
"""Helper function for process_args to get a window id.

Args:
via_ipc: Whether the request was made via IPC.
force_window: Whether to force opening in a window.
force_tab: Whether to force opening in a tab.
"""
if force_window and force_tab:
raise ValueError("force_window and force_tab are mutually "
"exclusive!")
if not via_ipc:
# Initial main window
return 0
window_to_raise = None
open_target = config.get('general', 'new-instance-open-target')
if (open_target == 'window' or force_window) and not force_tab:
win_id = mainwindow.MainWindow.spawn()
window = objreg.get('main-window', scope='window', window=win_id)
window_to_raise = window
else:
try:
window = objreg.last_window()
except objreg.NoWindow:
# There is no window left, so we open a new one
win_id = mainwindow.MainWindow.spawn()
window = objreg.get('main-window', scope='window',
window=win_id)
window_to_raise = window
win_id = window.win_id
if open_target != 'tab-silent':
window_to_raise = window
if window_to_raise is not None:
window_to_raise.setWindowState(window.windowState() &
~Qt.WindowMinimized |
Qt.WindowActive)
window_to_raise.raise_()
window_to_raise.activateWindow()
self.alert(window_to_raise)
return win_id

def process_args(self, args, via_ipc=False, cwd=None):
"""Process commandline args.

URLs to open have no prefix, commands to execute begin with a colon.

Args:
args: A list of arguments to process.
via_ipc: Whether the arguments were transmitted over IPC.
cwd: The cwd to use for fuzzy_url.
"""
if ipc and not args:
win_id = self._get_window(via_ipc, force_window=True)
self._open_startpage(win_id)
return
win_id = None
for cmd in args:
if cmd.startswith(':'):
if win_id is None:
win_id = self._get_window(via_ipc, force_tab=True)
log.init.debug("Startup cmd {}".format(cmd))
commandrunner = runners.CommandRunner(win_id)
commandrunner.run_safely_init(cmd.lstrip(':'))
elif not cmd:
log.init.debug("Empty argument")
win_id = self._get_window(via_ipc, force_window=True)
else:
win_id = self._get_window(via_ipc)
tabbed_browser = objreg.get('tabbed-browser', scope='window',
window=win_id)
log.init.debug("Startup URL {}".format(cmd))
try:
url = urlutils.fuzzy_url(cmd, cwd)
except urlutils.FuzzyUrlError as e:
message.error(0, "Error in startup argument '{}': "
"{}".format(cmd, e))
else:
tabbed_browser.tabopen(url)

def _open_startpage(self, win_id=None):
"""Open startpage.

The startpage is never opened if the given windows are not empty.

Args:
win_id: If None, open startpage in all empty windows.
If set, open the startpage in the given window.
"""
if win_id is not None:
window_ids = [win_id]
else:
window_ids = objreg.window_registry
for cur_win_id in window_ids:
tabbed_browser = objreg.get('tabbed-browser', scope='window',
window=cur_win_id)
if tabbed_browser.count() == 0:
log.init.debug("Opening startpage")
for urlstr in config.get('general', 'startpage'):
try:
url = urlutils.fuzzy_url(urlstr)
except urlutils.FuzzyUrlError as e:
message.error(0, "Error when opening startpage: "
"{}".format(e))
tabbed_browser.tabopen(QUrl('about:blank'))
else:
tabbed_browser.tabopen(url)

def _open_quickstart(self):
"""Open quickstart if it's the first start."""
state_config = objreg.get('state-config')
try:
quickstart_done = state_config['general']['quickstart-done'] == '1'
except KeyError:
quickstart_done = False
if not quickstart_done:
tabbed_browser = objreg.get('tabbed-browser', scope='window',
window='last-focused')
tabbed_browser.tabopen(
QUrl('http://www.qutebrowser.org/quickstart.html'))
try:
state_config.add_section('general')
except configparser.DuplicateSectionError:
pass
state_config['general']['quickstart-done'] = '1'

def _python_hacks(self):
"""Get around some PyQt-oddities by evil hacks.

This sets up the uncaught exception hook, quits with an appropriate
exit status, and handles Ctrl+C properly by passing control to the
Python interpreter once all 500ms.
"""
signal.signal(signal.SIGINT, self.interrupt)
signal.signal(signal.SIGTERM, self.interrupt)
timer = usertypes.Timer(self, 'python_hacks')
timer.start(500)
timer.timeout.connect(lambda: None)
objreg.register('python-hack-timer', timer)

def _connect_signals(self):
"""Connect all signals to their slots."""
config_obj = objreg.get('config')
self.lastWindowClosed.connect(self.shutdown)
config_obj.style_changed.connect(style.get_stylesheet.cache_clear)
self.focusChanged.connect(self.on_focus_changed)

def _get_widgets(self):
"""Get a string list of all widgets."""
widgets = self.allWidgets()
widgets.sort(key=lambda e: repr(e))
return [repr(w) for w in widgets]

def _get_pyqt_objects(self, lines, obj, depth=0):
"""Recursive method for get_all_objects to get Qt objects."""
for kid in obj.findChildren(QObject):
lines.append(' ' * depth + repr(kid))
self._get_pyqt_objects(lines, kid, depth + 1)

def get_all_objects(self):
"""Get all children of an object recursively as a string."""
output = ['']
widget_lines = self._get_widgets()
widget_lines = [' ' + e for e in widget_lines]
widget_lines.insert(0, "Qt widgets - {} objects".format(
len(widget_lines)))
output += widget_lines
pyqt_lines = []
self._get_pyqt_objects(pyqt_lines, self)
pyqt_lines = [' ' + e for e in pyqt_lines]
pyqt_lines.insert(0, 'Qt objects - {} objects:'.format(
len(pyqt_lines)))
output += pyqt_lines
output += ['']
output += objreg.dump_objects()
return '\n'.join(output)

def _recover_pages(self, forgiving=False):
"""Try to recover all open pages.

Called from _exception_hook, so as forgiving as possible.

Args:
forgiving: Whether to ignore exceptions.

Return:
A list containing a list for each window, which in turn contain the
opened URLs.
"""
pages = []
for win_id in objreg.window_registry:
win_pages = []
tabbed_browser = objreg.get('tabbed-browser', scope='window',
window=win_id)
for tab in tabbed_browser.widgets():
try:
urlstr = tab.cur_url.toString(
QUrl.RemovePassword | QUrl.FullyEncoded)
if urlstr:
win_pages.append(urlstr)
except Exception: # pylint: disable=broad-except
if forgiving:
log.destroy.exception("Error while recovering tab")
else:
raise
pages.append(win_pages)
return pages

def _save_geometry(self):
"""Save the window geometry to the state config."""
if self.geometry is not None:
state_config = objreg.get('state-config')
geom = base64.b64encode(self.geometry).decode('ASCII')
try:
state_config.add_section('geometry')
except configparser.DuplicateSectionError:
pass
state_config['geometry']['mainwindow'] = geom

def _destroy_crashlogfile(self):
"""Clean up the crash log file and delete it."""
if self._crashlogfile is None:
return
# We use sys.__stderr__ instead of sys.stderr here so this will still
# work when sys.stderr got replaced, e.g. by "Python Tools for Visual
# Studio".
if sys.__stderr__ is not None:
faulthandler.enable(sys.__stderr__)
else:
faulthandler.disable()
try:
self._crashlogfile.close()
os.remove(self._crashlogfile.name)
except OSError:
log.destroy.exception("Could not remove crash log!")

def _exception_hook(self, exctype, excvalue, tb):
"""Handle uncaught python exceptions.

It'll try very hard to write all open tabs to a file, and then exit
gracefully.
"""
# pylint: disable=broad-except

exc = (exctype, excvalue, tb)

if not self._quit_status['crash']:
log.misc.error("ARGH, there was an exception while the crash "
"dialog is already shown:", exc_info=exc)
return

log.misc.error("Uncaught exception", exc_info=exc)

is_ignored_exception = (exctype is bdb.BdbQuit or
not issubclass(exctype, Exception))

if is_ignored_exception or self._args.no_crash_dialog:
# pdb exit, KeyboardInterrupt, ...
status = 0 if is_ignored_exception else 2
try:
self.shutdown(status)
return
except Exception:
log.init.exception("Error while shutting down")
self.quit()
return

self._quit_status['crash'] = False

try:
pages = self._recover_pages(forgiving=True)
except Exception:
log.destroy.exception("Error while recovering pages")
pages = []

try:
history = objreg.get('command-history')[-5:]
except Exception:
log.destroy.exception("Error while getting history: {}")
history = []

try:
objects = self.get_all_objects()
except Exception:
log.destroy.exception("Error while getting objects")
objects = ""

try:
objreg.get('ipc-server').ignored = True
except Exception:
log.destroy.exception("Error while ignoring ipc")

try:
self.lastWindowClosed.disconnect(self.shutdown)
except TypeError:
log.destroy.exception("Error while preventing shutdown")
QApplication.closeAllWindows()
self._crashdlg = crashdialog.ExceptionCrashDialog(
self._args.debug, pages, history, exc, objects)
ret = self._crashdlg.exec_()
if ret == QDialog.Accepted: # restore
self.restart(shutdown=False, pages=pages)
# We might risk a segfault here, but that's better than continuing to
# run in some undefined state, so we only do the most needed shutdown
# here.
qInstallMessageHandler(None)
self._destroy_crashlogfile()
sys.exit(1)

@cmdutils.register(instance='app', name=['quit', 'q'])
def quit(self):
"""Quit qutebrowser."""
QApplication.closeAllWindows()

def _get_restart_args(self, pages):
"""Get the current working directory and args to relaunch qutebrowser.

Args:
pages: The pages to re-open.

Return:
An (args, cwd) tuple.
args: The commandline as a list of strings.
cwd: The current working directory as a string.
"""
if os.path.basename(sys.argv[0]) == 'qutebrowser':
# Launched via launcher script
args = [sys.argv[0]]
cwd = None
elif hasattr(sys, 'frozen'):
args = [sys.executable]
cwd = os.path.abspath(os.path.dirname(sys.executable))
else:
args = [sys.executable, '-m', 'qutebrowser']
cwd = os.path.join(os.path.abspath(os.path.dirname(
qutebrowser.__file__)), '..')
for arg in sys.argv[1:]:
if arg.startswith('-'):
# We only want to preserve options on a restart.
args.append(arg)
# Add all open pages so they get reopened.
page_args = []
for win in pages:
page_args.extend(win)
page_args.append('')
if page_args:
args.extend(page_args[:-1])
log.destroy.debug("args: {}".format(args))
log.destroy.debug("cwd: {}".format(cwd))
return args, cwd

@cmdutils.register(instance='app', ignore_args=True)
def restart(self, shutdown=True, pages=None):
"""Restart qutebrowser while keeping existing tabs open."""
if pages is None:
pages = self._recover_pages()
log.destroy.debug("sys.executable: {}".format(sys.executable))
log.destroy.debug("sys.path: {}".format(sys.path))
log.destroy.debug("sys.argv: {}".format(sys.argv))
log.destroy.debug("frozen: {}".format(hasattr(sys, 'frozen')))
args, cwd = self._get_restart_args(pages)
# Open a new process and immediately shutdown the existing one
try:
if cwd is None:
subprocess.Popen(args)
else:
subprocess.Popen(args, cwd=cwd)
except OSError as e:
log.destroy.error("Failed to restart: {}".format(e))
else:
if shutdown:
self.shutdown()

@cmdutils.register(instance='app', maxsplit=0, debug=True)
def debug_pyeval(self, s):
"""Evaluate a python string and display the results as a webpage.

//

We have this here rather in utils.debug so the context of eval makes
more sense and because we don't want to import much stuff in the utils.

Args:
s: The string to evaluate.
"""
try:
r = eval(s) # pylint: disable=eval-used
out = repr(r)
except Exception: # pylint: disable=broad-except
out = traceback.format_exc()
qutescheme.pyeval_output = out
tabbed_browser = objreg.get('tabbed-browser', scope='window',
window='last-focused')
tabbed_browser.openurl(QUrl('qute:pyeval'), newtab=True)

@cmdutils.register(instance='app')
def report(self):
"""Report a bug in qutebrowser."""
pages = self._recover_pages()
history = objreg.get('command-history')[-5:]
objects = self.get_all_objects()
self._crashdlg = crashdialog.ReportDialog(pages, history, objects)
self._crashdlg.show()

def interrupt(self, signum, _frame):
"""Handler for signals to gracefully shutdown (SIGINT/SIGTERM).

This calls self.shutdown and remaps the signal to call
self.interrupt_forcefully the next time.
"""
log.destroy.info("SIGINT/SIGTERM received, shutting down!")
log.destroy.info("Do the same again to forcefully quit.")
signal.signal(signal.SIGINT, self.interrupt_forcefully)
signal.signal(signal.SIGTERM, self.interrupt_forcefully)
# If we call shutdown directly here, we get a segfault.
QTimer.singleShot(0, functools.partial(self.shutdown, 128 + signum))

def interrupt_forcefully(self, signum, _frame):
"""Interrupt forcefully on the second SIGINT/SIGTERM request.

This skips our shutdown routine and calls QApplication:exit instead.
It then remaps the signals to call self.interrupt_really_forcefully the
next time.
"""
log.destroy.info("Forceful quit requested, goodbye cruel world!")
log.destroy.info("Do the same again to quit with even more force.")
signal.signal(signal.SIGINT, self.interrupt_really_forcefully)
signal.signal(signal.SIGTERM, self.interrupt_really_forcefully)
# This *should* work without a QTimer, but because of the trouble in
# self.interrupt we're better safe than sorry.
QTimer.singleShot(0, functools.partial(self.exit, 128 + signum))

def interrupt_really_forcefully(self, signum, _frame):
"""Interrupt with even more force on the third SIGINT/SIGTERM request.

This doesn't run *any* Qt cleanup and simply exits via Python.
It will most likely lead to a segfault.
"""
log.destroy.info("WHY ARE YOU DOING THIS TO ME? :(")
sys.exit(128 + signum)

@pyqtSlot()
def shutdown(self, status=0):
"""Try to shutdown everything cleanly.

For some reason lastWindowClosing sometimes seem to get emitted twice,
so we make sure we only run once here.

Args:
status: The status code to exit with.
"""
if self._shutting_down:
return
self._shutting_down = True
log.destroy.debug("Shutting down with status {}...".format(status))
deferrer = False
for win_id in objreg.window_registry:
prompter = objreg.get('prompter', None, scope='window',
window=win_id)
if prompter is not None and prompter.shutdown():
deferrer = True
if deferrer:
# If shutdown was called while we were asking a question, we're in
# a still sub-eventloop (which gets quitted now) and not in the
# main one.
# This means we need to defer the real shutdown to when we're back
# in the real main event loop, or we'll get a segfault.
log.destroy.debug("Deferring real shutdown because question was "
"active.")
QTimer.singleShot(0, functools.partial(self._shutdown, status))
else:
# If we have no questions to shut down, we are already in the real
# event loop, so we can shut down immediately.
self._shutdown(status)

def _shutdown(self, status): # noqa
"""Second stage of shutdown."""
# pylint: disable=too-many-branches, too-many-statements
# FIXME refactor this
# https://github.com/The-Compiler/qutebrowser/issues/113
log.destroy.debug("Stage 2 of shutting down...")
# Remove eventfilter
try:
log.destroy.debug("Removing eventfilter...")
self.removeEventFilter(self._event_filter)
except AttributeError:
pass
# Close all windows
QApplication.closeAllWindows()
# Shut down IPC
try:
objreg.get('ipc-server').shutdown()
except KeyError:
pass
# Save everything
try:
config_obj = objreg.get('config')
except KeyError:
log.destroy.debug("Config not initialized yet, so not saving "
"anything.")
else:
to_save = []
if config.get('general', 'auto-save-config'):
to_save.append(("config", config_obj.save))
try:
key_config = objreg.get('key-config')
except KeyError:
pass
else:
to_save.append(("keyconfig", key_config.save))
to_save += [("window geometry", self._save_geometry)]
try:
command_history = objreg.get('command-history')
except KeyError:
pass
else:
to_save.append(("command history", command_history.save))
try:
quickmark_manager = objreg.get('quickmark-manager')
except KeyError:
pass
else:
to_save.append(("command history", quickmark_manager.save))
try:
state_config = objreg.get('state-config')
except KeyError:
pass
else:
to_save.append(("window geometry", state_config.save))
try:
cookie_jar = objreg.get('cookie-jar')
except KeyError:
pass
else:
to_save.append(("cookies", cookie_jar.save))
for what, handler in to_save:
log.destroy.debug("Saving {} (handler: {})".format(
what, utils.qualname(handler)))
try:
handler()
except OSError as e:
msgbox = QMessageBox(
QMessageBox.Critical, "Error while saving!",
"Error while saving {}: {}".format(what, e))
msgbox.exec_()
except AttributeError as e:
log.destroy.warning("Could not save {}.".format(what))
log.destroy.debug(e)
# Re-enable faulthandler to stdout, then remove crash log
log.destroy.debug("Deactiving crash log...")
self._destroy_crashlogfile()
# If we don't kill our custom handler here we might get segfaults
log.destroy.debug("Deactiving message handler...")
qInstallMessageHandler(None)
# Now we can hopefully quit without segfaults
log.destroy.debug("Deferring QApplication::exit...")
# We use a singleshot timer to exit here to minimize the likelyhood of
# segfaults.
QTimer.singleShot(0, functools.partial(self.exit, status))

def on_focus_changed(self, _old, new):
"""Register currently focused main window in the object registry."""
if new is None:
window = None
else:
window = new.window()
if window is None or not isinstance(window, mainwindow.MainWindow):
try:
objreg.delete('last-focused-main-window')
except KeyError:
pass
else:
objreg.register('last-focused-main-window', window, update=True)

@pyqtSlot(QUrl)
def open_desktopservices_url(self, url):
"""Handler to open an URL via QDesktopServices."""
win_id = self._get_window(via_ipc=True, force_window=False)
tabbed_browser = objreg.get('tabbed-browser', scope='window',
window=win_id)
tabbed_browser.tabopen(url)

def exit(self, status):
"""Extend QApplication::exit to log the event."""
log.destroy.debug("Now calling QApplication::exit.")
if self._args.debug_exit:
print("Now logging late shutdown.", file=sys.stderr)
debug.trace_lines(True)
super().exit(status)

+ 20
- 0
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__init__.py View File

@@ -0,0 +1,20 @@
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:

# Copyright 2014 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# qutebrowser is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.

"""Classes related to the browser widgets."""

BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/__init__.cpython-34.pyc View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/__init__.cpython-34.pyo View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/adblock.cpython-34.pyc View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/adblock.cpython-34.pyo View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/cache.cpython-34.pyc View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/cache.cpython-34.pyo View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/commands.cpython-34.pyc View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/commands.cpython-34.pyo View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/cookies.cpython-34.pyc View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/cookies.cpython-34.pyo View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/downloads.cpython-34.pyc View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/downloads.cpython-34.pyo View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/downloadview.cpython-34.pyc View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/downloadview.cpython-34.pyo View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/hints.cpython-34.pyc View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/hints.cpython-34.pyo View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/http.cpython-34.pyc View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/http.cpython-34.pyo View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/quickmarks.cpython-34.pyc View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/quickmarks.cpython-34.pyo View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/rfc6266.cpython-34.pyc View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/rfc6266.cpython-34.pyo View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/signalfilter.cpython-34.pyc View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/signalfilter.cpython-34.pyo View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/webelem.cpython-34.pyc View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/webelem.cpython-34.pyo View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/webpage.cpython-34.pyc View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/webpage.cpython-34.pyo View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/webview.cpython-34.pyc View File


BIN
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/__pycache__/webview.cpython-34.pyo View File


+ 225
- 0
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/adblock.py View File

@@ -0,0 +1,225 @@
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:

# Copyright 2014 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# qutebrowser is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.

"""Functions related to adblocking."""

import io
import os.path
import functools
import posixpath
import zipfile

from PyQt5.QtCore import QStandardPaths

from qutebrowser.config import config
from qutebrowser.utils import objreg, standarddir, log, message
from qutebrowser.commands import cmdutils


def guess_zip_filename(zf):
"""Guess which file to use inside a zip file.

Args:
zf: A ZipFile instance.
"""
files = zf.namelist()
if len(files) == 1:
return files[0]
else:
for e in files:
if posixpath.splitext(e)[0].lower() == 'hosts':
return e
raise FileNotFoundError("No hosts file found in zip")


def get_fileobj(byte_io):
"""Get an usable file object to read the hosts file from."""
byte_io.seek(0) # rewind downloaded file
if zipfile.is_zipfile(byte_io):
byte_io.seek(0) # rewind what zipfile.is_zipfile did
zf = zipfile.ZipFile(byte_io)
filename = guess_zip_filename(zf)
byte_io = zf.open(filename, mode='r')
else:
byte_io.seek(0) # rewind what zipfile.is_zipfile did
return io.TextIOWrapper(byte_io, encoding='utf-8')


class FakeDownload:

"""A download stub to use on_download_finished with local files."""

def __init__(self, fileobj):
self.basename = os.path.basename(fileobj.name)
self.fileobj = fileobj
self.successful = True


class HostBlocker:

"""Manage blocked hosts based from /etc/hosts-like files.

Attributes:
blocked_hosts: A set of blocked hosts.
_in_progress: The DownloadItems which are currently downloading.
_done_count: How many files have been read successfully.
_hosts_file: The path to the blocked-hosts file.

Class attributes:
WHITELISTED: Hosts which never should be blocked.
"""

WHITELISTED = ('localhost', 'localhost.localdomain', 'broadcasthost',
'local')

def __init__(self):
self.blocked_hosts = set()
self._in_progress = []
self._done_count = 0
data_dir = standarddir.get(QStandardPaths.DataLocation)
self._hosts_file = os.path.join(data_dir, 'blocked-hosts')
objreg.get('config').changed.connect(self.on_config_changed)

def read_hosts(self):
"""Read hosts from the existing blocked-hosts file."""
self.blocked_hosts = set()
if os.path.exists(self._hosts_file):
try:
with open(self._hosts_file, 'r', encoding='utf-8') as f:
for line in f:
self.blocked_hosts.add(line.strip())
except OSError:
log.misc.exception("Failed to read host blocklist!")
else:
if config.get('content', 'host-block-lists') is not None:
message.info('last-focused',
"Run :adblock-update to get adblock lists.")

@cmdutils.register(instance='host-blocker')
def adblock_update(self):
"""Update the adblock block lists."""
self.blocked_hosts = set()
self._done_count = 0
urls = config.get('content', 'host-block-lists')
download_manager = objreg.get('download-manager', scope='window',
window='last-focused')
if urls is None:
return
for url in urls:
if url.scheme() == 'file':
try:
fileobj = open(url.path(), 'rb')
except OSError:
log.misc.exception("Failed to open block list!")
download = FakeDownload(fileobj)
self._in_progress.append(download)
self.on_download_finished(download)
else:
fobj = io.BytesIO()
fobj.name = 'adblock: ' + url.host()
download = download_manager.get(url, fileobj=fobj)
self._in_progress.append(download)
download.finished.connect(
functools.partial(self.on_download_finished, download))

def _merge_file(self, byte_io):
"""Read and merge host files.

Args:
byte_io: The BytesIO object of the completed download.

Return:
A set of the merged hosts.
"""
error_count = 0
line_count = 0
try:
f = get_fileobj(byte_io)
except (OSError, UnicodeDecodeError, zipfile.BadZipFile,
zipfile.LargeZipFile) as e:
message.error('last-focused', "adblock: Error while reading {}: "
"{} - {}".format(
byte_io.name, e.__class__.__name__, e))
return
for line in f:
line_count += 1
# Remove comments
try:
hash_idx = line.index('#')
line = line[:hash_idx]
except ValueError:
pass
line = line.strip()
# Skip empty lines
if not line:
continue
parts = line.split()
if len(parts) == 1:
# "one host per line" format
host = parts[0]
elif len(parts) == 2:
# /etc/hosts format
host = parts[1]
else:
error_count += 1
continue
if host not in self.WHITELISTED:
self.blocked_hosts.add(host)
log.misc.debug("{}: read {} lines".format(byte_io.name, line_count))
if error_count > 0:
message.error('last-focused', "adblock: {} read errors for "
"{}".format(error_count, byte_io.name))

def on_lists_downloaded(self):
"""Install block lists after files have been downloaded."""
with open(self._hosts_file, 'w', encoding='utf-8') as f:
for host in sorted(self.blocked_hosts):
f.write(host + '\n')
message.info('last-focused', "adblock: Read {} hosts from {} "
"sources.".format(len(self.blocked_hosts),
self._done_count))

@config.change_filter('content', 'host-block-lists')
def on_config_changed(self):
"""Update files when the config changed."""
urls = config.get('content', 'host-block-lists')
if urls is None:
try:
os.remove(self._hosts_file)
except OSError:
log.misc.exception("Failed to delete hosts file.")

def on_download_finished(self, download):
"""Check if all downloads are finished and if so, trigger reading.

Arguments:
download: The finished DownloadItem.
"""
self._in_progress.remove(download)
if download.successful:
self._done_count += 1
try:
self._merge_file(download.fileobj)
finally:
download.fileobj.close()
if not self._in_progress:
try:
self.on_lists_downloaded()
except OSError:
log.misc.exception("Failed to write host block list!")

+ 157
- 0
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/cache.py View File

@@ -0,0 +1,157 @@
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:

# Copyright 2014 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# qutebrowser is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.

"""HTTP network cache."""

import os.path

from PyQt5.QtCore import QStandardPaths
from PyQt5.QtNetwork import QNetworkDiskCache, QNetworkCacheMetaData

from qutebrowser.config import config
from qutebrowser.utils import utils, standarddir, objreg


class DiskCache(QNetworkDiskCache):

"""Disk cache which sets correct cache dir and size."""

def __init__(self, parent=None):
super().__init__(parent)
cache_dir = standarddir.get(QStandardPaths.CacheLocation)
self.setCacheDirectory(os.path.join(cache_dir, 'http'))
self.setMaximumCacheSize(config.get('storage', 'cache-size'))
objreg.get('config').changed.connect(self.cache_size_changed)

def __repr__(self):
return utils.get_repr(self, size=self.cacheSize(),
maxsize=self.maximumCacheSize(),
path=self.cacheDirectory())

@config.change_filter('storage', 'cache-size')
def cache_size_changed(self):
"""Update cache size if the config was changed."""
self.setMaximumCacheSize(config.get('storage', 'cache-size'))

def cacheSize(self):
"""Return the current size taken up by the cache.

Return:
An int.
"""
if objreg.get('general', 'private-browsing'):
return 0
else:
return super().cacheSize()

def fileMetaData(self, filename):
"""Returns the QNetworkCacheMetaData for the cache file filename.

Args:
filename: The file name as a string.

Return:
A QNetworkCacheMetaData object.
"""
if objreg.get('general', 'private-browsing'):
return QNetworkCacheMetaData()
else:
return super().fileMetaData(filename)

def data(self, url):
"""Return the data associated with url.

Args:
url: A QUrl.

return:
A QIODevice or None.
"""
if objreg.get('general', 'private-browsing'):
return None
else:
return super().data(url)

def insert(self, device):
"""Insert the data in device and the prepared meta data into the cache.

Args:
device: A QIODevice.
"""
if objreg.get('general', 'private-browsing'):
return
else:
super().insert(device)

def metaData(self, url):
"""Return the meta data for the url url.

Args:
url: A QUrl.

Return:
A QNetworkCacheMetaData object.
"""
if objreg.get('general', 'private-browsing'):
return QNetworkCacheMetaData()
else:
return super().metaData(url)

def prepare(self, meta_data):
"""Return the device that should be populated with the data.

Args:
meta_data: A QNetworkCacheMetaData object.

Return:
A QIODevice or None.
"""
if objreg.get('general', 'private-browsing'):
return None
else:
return super().prepare(meta_data)

def remove(self, url):
"""Remove the cache entry for url.

Return:
True on success, False otherwise.
"""
if objreg.get('general', 'private-browsing'):
return False
else:
return super().remove(url)

def updateMetaData(self, meta_data):
"""Updates the cache meta date for the meta_data's url to meta_data.

Args:
meta_data: A QNetworkCacheMetaData object.
"""
if objreg.get('general', 'private-browsing'):
return
else:
super().updateMetaData(meta_data)

def clear(self):
"""Removes all items from the cache."""
if objreg.get('general', 'private-browsing'):
return
else:
super().clear()

+ 985
- 0
qutebrowser-git/pkg/qutebrowser-git/usr/lib/python3.4/site-packages/qutebrowser/browser/commands.py View File

@@ -0,0 +1,985 @@
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:

# Copyright 2014 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# qutebrowser is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.

"""Command dispatcher for TabbedBrowser."""

import re
import os
import subprocess
import posixpath
import functools

from PyQt5.QtWidgets import QApplication, QTabBar
from PyQt5.QtCore import Qt, QUrl
from PyQt5.QtGui import QClipboard
from PyQt5.QtPrintSupport import QPrintDialog, QPrintPreviewDialog
from PyQt5.QtWebKitWidgets import QWebInspector
import pygments
import pygments.lexers
import pygments.formatters

from qutebrowser.commands import userscripts, cmdexc, cmdutils
from qutebrowser.config import config
from qutebrowser.browser import webelem
from qutebrowser.utils import (message, usertypes, log, qtutils, urlutils,
objreg, utils)
from qutebrowser.misc import editor


class CommandDispatcher:

"""Command dispatcher for TabbedBrowser.

Contains all commands which are related to the current tab.

We can't simply add these commands to BrowserTab directly and use
currentWidget() for TabbedBrowser.cmd because at the time
cmdutils.register() decorators are run, currentWidget() will return None.

Attributes:
_editor: The ExternalEditor object.
_win_id: The window ID the CommandDispatcher is associated with.
"""

def __init__(self, win_id):
self._editor = None
self._win_id = win_id