Git Product home page Git Product logo

tools's Introduction

tools

Some tools/scripts I might or might not use occasionally.

  • scripts/mkscript - Bash script that creates small initial script/programming files

      ~$ mkscript python filename.py
      ~$ mkscript c filename.c
    
  • hexchat/np.py - Now Playing script for mpd (and YouTube, though only with chromium)

  • hexchat/spacko.py - Sends a random quote.

  • hexchat/nohide.py - On channels, where Join/Part messages are hidden, this script will display Join/Part messages of users, that have interacted with the channel recently.

tools's People

Contributors

andrewwang43 avatar fichtefoll avatar nitori avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tools's Issues

Flip.py Errors and Changes

The script as is outputs the following error when trying to load:

File "/.../addons/flip.py", line 11
SyntaxError: Non-ASCII character '\xc9' in file /.../addons/flip.py on line 11, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
Error loading module /.../addons/flip.py

The PEP advises putting # -*- coding: utf-8 -*- at the beginning of the code, and this resolves the error for me.

You might also consider adding return hexchat.EAT_HEXCHAT after line 97 to prevent the "unknown command" error for /PUTBACK.

Getting "unhandled *buffextras event" errors with 1.7.0

For some reason it looks like znc 1.7 has some new strings.

Here's an incomplete hack to bufextras.py which fixed a few of them:

--- buffextras-git.py	2018-06-13 13:58:12.230499284 -0700
+++ buffextras.py	2018-06-13 13:50:49.209903084 -0700
@@ -44,26 +44,32 @@
             # :nick!ident@host joined
             send("Join", nick, channel, userhost)
         elif _type == 'parted':
             if args.startswith('with message: ['):
                 # :nick!ident@host parted with message: [bla bla]
                 send("Part with Reason", nick, userhost, channel,
                      args[15:-1])
             else:
                 # :nick!ident@host parted
                 send("Part", nick, userhost, channel)
+        elif _type == 'parted:':
+            # nick!ident@host parted:
+            send("Part", nick, userhost, channel)
         elif _type == 'is':
             # :nick!ident@host is now known as new_nick
             send("Change Nick", nick, args[13:])
         elif _type == 'quit':
             # :nick!ident@host quit with message: [Quit: Leaving.]
             send("Quit", nick, args[15:-1], userhost)
+        elif _type == 'quit:':
+            # nick!ident@host quit: Remote host closed the connection
+            send("Quit", nick, args, userhost)
         elif _type == 'kicked':
             send("Kick", nick, word[5], channel,
                  word_eol[6][9:-1])
         elif _type == 'changed':
             send("Topic Change", nick, args[14:], channel)
         else:
             send("Server Error", "Unhandled *buffextras event:")
             send("Server Error",
                  "    {}".format(word_eol[3][1:]))
         return hexchat.EAT_ALL

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.