buku: update to 4.8.
This commit is contained in:
parent
d4707ac322
commit
66ec9f04c8
|
@ -1,38 +0,0 @@
|
|||
adapted from https://github.com/jarun/buku/pull/605
|
||||
--- a/buku
|
||||
+++ b/buku
|
||||
@@ -19,10 +19,10 @@
|
||||
|
||||
import argparse
|
||||
import calendar
|
||||
-import cgi
|
||||
import codecs
|
||||
import collections
|
||||
import contextlib
|
||||
+import email.message
|
||||
import json
|
||||
import locale
|
||||
import logging
|
||||
@@ -3811,15 +3811,17 @@
|
||||
if soup.meta and soup.meta.get('charset') is not None:
|
||||
charset = soup.meta.get('charset')
|
||||
elif 'content-type' in resp.headers:
|
||||
- _, params = cgi.parse_header(resp.headers['content-type'])
|
||||
- if params.get('charset') is not None:
|
||||
- charset = params.get('charset')
|
||||
+ m = email.message.Message()
|
||||
+ m['content-type'] = resp.headers['content-type']
|
||||
+ if m.get_param('charset') is not None:
|
||||
+ charset = m.get_param('charset')
|
||||
|
||||
if not charset and soup:
|
||||
meta_tag = soup.find('meta', attrs={'http-equiv': 'Content-Type'})
|
||||
if meta_tag:
|
||||
- _, params = cgi.parse_header(meta_tag.attrs['content'])
|
||||
- charset = params.get('charset', charset)
|
||||
+ m = email.message.Message()
|
||||
+ m['content'] = meta_tag.attrs['content']
|
||||
+ charset = m.get_param('charset', charset)
|
||||
|
||||
if charset:
|
||||
LOGDBG('charset: %s', charset)
|
|
@ -1,15 +1,16 @@
|
|||
# Template file for 'buku'
|
||||
pkgname=buku
|
||||
version=4.7
|
||||
revision=2
|
||||
version=4.8
|
||||
revision=1
|
||||
depends="python3-urllib3 python3-BeautifulSoup4 python3-cryptography
|
||||
python3-html5lib"
|
||||
short_desc="Cmdline bookmark management utility"
|
||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||
license="GPL-3.0-or-later"
|
||||
homepage="https://github.com/jarun/Buku"
|
||||
changelog="https://github.com/jarun/buku/raw/master/CHANGELOG"
|
||||
distfiles="https://github.com/jarun/Buku/archive/v${version}.tar.gz"
|
||||
checksum=11d0860e66e0eea6c2ce566962ae0f8e34c76dc2317d108a4ae4e5a47097d468
|
||||
checksum=a0b94210e80e9f9f359e5308323837d41781cf8dba497341099d5c59e27fa52c
|
||||
|
||||
do_install() {
|
||||
vbin buku
|
||||
|
|
Loading…
Reference in New Issue