Adding #glorious-success tag. - annna - Annna the nice friendly bot.
 (HTM) git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
 (DIR) README
       ---
 (DIR) commit 9c33d6d12b21344f4bd76e1eb55efe78be2c316f
 (DIR) parent 7ba2b68198b93df7ce94a87aa875ac2dbe89e03b
 (HTM) Author: Annna Robert-Houdin <annna@bitreich.org>
       Date:   Sat,  6 Feb 2021 23:25:27 +0100
       
       Adding #glorious-success tag.
       
       Diffstat:
         M annna-start-services                |      12 ++++--------
         M modules/hashtags/hashtags.txt       |       1 +
         M textsynth-complete                  |      19 ++++++++++++++-----
       
       3 files changed, 19 insertions(+), 13 deletions(-)
       ---
 (DIR) diff --git a/annna-start-services b/annna-start-services
       @@ -93,7 +93,8 @@ annna_common() {
                                        nocuri=0
                                        ;;
                                *twitter.com*)
       -                                nuri="$(printf "%s\n" "${uri}" | sed 's;\(mobile\.\)\{0,1\}twitter\.com;nitter\.net;')"
       +                                ninstance="$(nitter-instance | sed 's,\.,\\\.,g')"
       +                                nuri="$(printf "%s\n" "${uri}" | sed "s;\(mobile\.\)\{0,1\}twitter\.com;${ninstance};")"
                                        fetch-uri "${nuri}" > "${tmpf}"
                                        urititle="$(curl-grabtitle "${nuri}")"
                                        suri="$(screenshot-paste "${nuri}")"
       @@ -311,15 +312,10 @@ annna_common() {
        
                        # Do in background, because read is very slow.
                        {
       -                        dresult="$(textsynth-complete "${word}")"
       +                        dresult="$(textsynth-complete -r "${word}")"
                                if [ -n "${dresult}" ];
                                then
       -                                puri="$({
       -                                        # First the old words.
       -                                        printf "%s" "${word}";
       -                                        # then the generated text.
       -                                        printf "%s" "${dresult}";
       -                                } | /br/bin/bitreich-paste)"
       +                                puri="$(printf "%s" "${dresult}" | /br/bin/bitreich-paste)"
                                else
                                        puri="Textsynth did not answer."
                                fi
 (DIR) diff --git a/modules/hashtags/hashtags.txt b/modules/hashtags/hashtags.txt
       @@ -3075,6 +3075,7 @@
        #glhf gopher://bitreich.org/9/memecache/glhf.mp4
        #global-variable gopher://bitreich.org/I/memecache/global-variable.png
        #global-warming-hoax gopher://bitreich.org/I/memecache/global-warming-hoax.png
       +#glorious-success gopher://bitreich.org/9/memecache/glorious-success.mp4
        #glow gopher://bitreich.org/9/memecache/glow.mkv
        #glue gopher://bitreich.org/I/memecache/glue.jpg
        #gnomoffice gopher://bitreich.org/I/memecache/gnomoffice.png
 (DIR) diff --git a/textsynth-complete b/textsynth-complete
       @@ -9,31 +9,39 @@ import os
        import sys
        import getopt
        import websocket
       +import time
        
        def usage(app):
                app = os.path.basename(app)
       -        print("usage: %s [-h] [-b base] text to complete..." % (app),
       +        print("usage: %s [-hr] [-b base] text to complete..." % (app),
                        file=sys.stderr)
                sys.exit(1)
        
        def main(args):
                try:
       -                opts, largs = getopt.getopt(args[1:], "hb:")
       +                opts, largs = getopt.getopt(args[1:], "hb:r")
                except getopt.GetoptError as err:
                        print(str(err))
                        usage(args[0])
        
       +        onlyresult = False
       +
                baseuri = "wss://bellard.org/textsynth/ws"
                for o, a in opts:
                        if o == "-h":
                                usage(args[0])
       +                elif o == "-r":
       +                        onlyresult = True
                        else:
                                assert False, "unhandled option"
        
                if len(largs) < 1:
                        usage(args[0])
                txtstr = " ".join(largs)
       -        reqstr = "g,345M,40,0.9,1.0,1,%s" % (txtstr)
       +        timenow = time.time() * 1000
       +        timenowint = round(timenow)
       +        seed = (timenowint | 0) + (round(timenow / 4294967296) | 0)
       +        reqstr = "g,1558M,40,0.9,1,%d,%s" % (seed, txtstr)
        
                try:
                        ws = websocket.WebSocket()
       @@ -43,14 +51,15 @@ def main(args):
                        rstr = ""
                        while 1:
                                r = ws.recv()
       -                        print(r)
       +                        if onlyresult == False:
       +                            print(r)
                                if len(r) == 0:
                                        break
                                rstr += r
                except:
                        return 1
        
       -        print("%s\n" % (rstr))
       +        print("%s%s\n" % (txtstr, rstr))
        
                return 0