From 376421f303c55cb45026507c77f2203c14b9e47a Mon Sep 17 00:00:00 2001 From: "Silas S. Brown" <ssb22@cam.ac.uk> Date: Fri, 4 Oct 2019 06:58:45 +0100 Subject: [PATCH] Update README.md, Web Adjuster, git-sync script --- README.md | 6 +++--- adjuster.py | 8 +++----- git-sync.sh | 8 ++++---- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index a0366db..a46d63e 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # adjuster -Web Adjuster + Annotator Generator from http://people.ds.cam.ac.uk/ssb22/adjuster/ +Web Adjuster + Annotator Generator from http://ssb22.user.srcf.net/adjuster/ -(also mirrored at http://ssb22.gitlab.io/adjuster as the Cambridge "DS-Web" server sometimes gets taken down for several days of maintenance) +(also mirrored at http://ssb22.gitlab.io/adjuster just in case) Web Adjuster ============ @@ -96,7 +96,7 @@ TermLayout is _not_ a Web browser: it has no facilities for navigating links. It If you are using TermLayout with an annotator generated by Annotator Generator, you might also be interested in `tmux-annotator.sh` which sets up tmux with a “hotkey†to annotate the current screen and display the result in TermLayout. -Options for Web Adjuster v0.2795 +Options for Web Adjuster v0.2796 ============ General options diff --git a/adjuster.py b/adjuster.py index b67b965..92541a0 100644 --- a/adjuster.py +++ b/adjuster.py @@ -1,6 +1,6 @@ #!/usr/bin/env python2 -program_name = "Web Adjuster v0.2795 (c) 2012-19 Silas S. Brown" +program_name = "Web Adjuster v0.2796 (c) 2012-19 Silas S. Brown" # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -3354,7 +3354,7 @@ document.write('<a href="javascript:location.reload(true)">refreshing this page< elif txt[0]=='j': return self.serve_bookmarklet_json(filterNo) elif txt[0]=='u': return self.serve_backend_post(filterNo) elif txt[0] in 'iap': - return self.doResponse2(htmlhead()+android_ios_instructions(self.request.host,self.request.headers.get("User-Agent","")),"noFilterOptions",False) + return self.doResponse2(htmlhead()+android_ios_instructions(txt[0],self.request.host,self.request.headers.get("User-Agent","")),"noFilterOptions",False) txt = zlib.decompressobj().decompress(base64.b64decode(txt),16834) # limit to 16k to avoid zip bombs (limit is also in the compress below) self.request.uri = "%s (input not logged, len=%d)" % (options.submitPath,len(txt)) else: txt = self.request.arguments.get("i",None) @@ -5760,9 +5760,7 @@ class Dynamic_DNS_updater: miniupnpc.selectigd() addr = miniupnpc.externalipaddress() except: addr = "" - if addr == self.currentIP: - IOLoop.instance().add_callback(lambda *args:self.newIP(addr)) # in case forceTime is up - IOLoop.instance().add_timeout(time.time()+options.ip_check_interval2,lambda *args:self.queryLocalIP()) + if addr == self.currentIP: IOLoop.instance().add_callback(lambda *args:(self.newIP(addr),IOLoop.instance().add_timeout(time.time()+options.ip_check_interval2,lambda *args:self.queryLocalIP()))) # (add_timeout doesn't always work when not from the IOLoop thread ??) else: IOLoop.instance().add_callback(self.queryIP) threading.Thread(target=run,args=()).start() return diff --git a/git-sync.sh b/git-sync.sh index b781565..0ce790e 100755 --- a/git-sync.sh +++ b/git-sync.sh @@ -1,9 +1,9 @@ #!/bin/bash git pull --no-edit -wget -N http://people.ds.cam.ac.uk/ssb22/adjuster/adjuster.py -wget -N http://people.ds.cam.ac.uk/ssb22/adjuster/annogen.py -wget -N http://people.ds.cam.ac.uk/ssb22/adjuster/termlayout.py -wget -N http://people.ds.cam.ac.uk/ssb22/adjuster/tmux-annotator.sh +wget -N http://ssb22.user.srcf.net/adjuster/adjuster.py +wget -N http://ssb22.user.srcf.net/adjuster/annogen.py +wget -N http://ssb22.user.srcf.net/adjuster/termlayout.py +wget -N http://ssb22.user.srcf.net/adjuster/tmux-annotator.sh ( awk -- 'BEGIN {p=1} /Options for Web Adjuster/ {p=0} // {if(p) print}' < README.md -- GitLab