Пример #1
0
#!/usr/bin/python
import irc
""" run me once a week or more """

def showsToPax(filename):
	if not isfile(filename):
		return
	else:
		with open(filename, "r") as f: # read the list of shows
		# if they have a number after them that's the last ep you dl'd

		# write the regexified list of what you want

# fxn to update nos at end of line


con = irc.IRCConnection(network = "irc.rizon.net:6667", nick = "pussinb00ts", gui = True, folder = '/d/Downloads/Anime')
# lol ofc adding one tiny thing breaks everything, im gud
""" A list of regular expressions used to parse the iroffer bot's packlist. """
packs = irc.parse("pax")

""" Use an IRCConnection object to parse a bot's packlist and download packs. """
con.parseBot("Ginpachi-Sensei", packs, repeat = True, blocking = False)

con.gui.join() # Wait for gui to close before exiting
Пример #2
0
#!/usr/bin/python
import irc
""" irc usage example """

con = irc.IRCConnection(network = "irc.rizon.net:6667", nick = "roughnecka", gui = True, folder = '/d/Downloads/Anime')

""" A list of regular expressions used to parse the iroffer bot's packlist. """
packs = irc.parse("packs.txt")

""" Use an IRCConnection object to parse a bot's packlist and download packs. """
con.parseBot("Ginpachi-Sensei", packs, repeat = True, blocking = False)

con.gui.join() # Wait for gui to close before exiting
Пример #3
0
filename = sys.argv[1]
if filename[-3:-2] is not ".":
    print("Not a valid file.")
    sys.exit()

try:
    with open(filename, 'r') as f:
        raw_file = f.read()
except IOError:
    print(f"Unable to open {filename}.")
    sys.exit()

ext = filename[-2:]
if ext == "ir":
    out = irc.parse(raw_file)
    with open(filename[0:-2] + "bc", 'wb') as f:
        f.write(bytes(out))
elif ext == "li":
    tl = lispc.token_list(raw_file)
    print(tl)

    r = 0
    i = 0
    while r == 0:
        print("S")
        r = lispc.S(0, tl)
        print("")
    if r is 2:
        print(f"Missing ')', got {current_token()}")