Skip to content

Commit

Permalink
Huge cleanup of copyright headers and docstrings
Browse files Browse the repository at this point in the history
They're still super inconsistent and probably a lot are out of date, but
at least there won't be random copyright info showing up in the docs
anymore. Oh, and my domain and name are correct now, too…
  • Loading branch information
embolalia authored and fatalis committed Jan 7, 2016
1 parent c3aa24c commit 6e10c9f
Show file tree
Hide file tree
Showing 23 changed files with 87 additions and 160 deletions.
2 changes: 1 addition & 1 deletion CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Kenneth K. Sham (Kays)
Joel Friedly (jfriedly)
Samuel Clements (Ziaix)
Dimitri Molenaars (Tyrope)
Edward Powell (Embolalia)
Elsie Powell (Embolalia)
Elad Alfassa (elad661)
Lior Ramati (FireRogue)
Syfaro Warraw (Syfaro)
8 changes: 4 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

# General information about the project.
project = u'Sopel IRC Bot'
copyright = u'2012, E. Powell, et al.'
copyright = u'2012-2015, Elsie Powell, et al.'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -187,7 +187,7 @@
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'sopel.tex', u'Sopel IRC Bot Documentation',
u'E. Powell, et al.', 'manual'),
u'Elsie Powell, et al.', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -217,7 +217,7 @@
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'sopel', u'Sopel IRC Bot Documentation',
[u'E. Powell, et al.'], 1)
[u'Elsie Powell, et al.'], 1)
]

# If true, show URL addresses after external links.
Expand All @@ -231,7 +231,7 @@
# dir menu entry, description, category)
texinfo_documents = [
('index', 'sopel', u'Sopel IRC Bot Documentation',
u'E. Powell, et al.', 'SopelIRCBot', 'One line description of project.',
u'Elsie Powell, et al.', 'SopelIRCBot', 'One line description of project.',
'Miscellaneous'),
]

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def read_reqs(path):
name='sopel',
version=__version__,
description='Simple and extendible IRC bot',
author='Edward Powell',
author='Elsie Powell',
author_email='[email protected]',
url='http://sopel.chat/',
long_description=(
Expand Down
14 changes: 5 additions & 9 deletions sopel/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# coding=utf-8
"""
__init__.py - Sopel Init Module
Copyright 2008, Sean B. Palmer, inamidst.com
Copyright 2012, Edward Powell, http://embolalia.net
Copyright © 2012, Elad Alfassa <[email protected]>
# Copyright 2008, Sean B. Palmer, inamidst.com
# Copyright 2012, Elsie Powell, http://embolalia.com
# Copyright © 2012, Elad Alfassa <[email protected]>
#
# Licensed under the Eiffel Forum License 2.

Licensed under the Eiffel Forum License 2.
http://sopel.chat/
"""
from __future__ import unicode_literals, absolute_import, print_function, division

from collections import namedtuple
Expand Down
14 changes: 5 additions & 9 deletions sopel/bot.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# coding=utf-8
"""
bot.py - Sopel IRC Bot
Copyright 2008, Sean B. Palmer, inamidst.com
Copyright 2012, Edward Powell, http://embolalia.net
Copyright © 2012, Elad Alfassa <[email protected]>
# Copyright 2008, Sean B. Palmer, inamidst.com
# Copyright © 2012, Elad Alfassa <[email protected]>
# Copyright 2012-2015, Elsie Powell, http://embolalia.com
#
# Licensed under the Eiffel Forum License 2.

Licensed under the Eiffel Forum License 2.
http://sopel.chat/
"""
from __future__ import unicode_literals, absolute_import, print_function, division

import collections
Expand Down
2 changes: 1 addition & 1 deletion sopel/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
definition. The ``[core]`` section is defined with ``CoreSection`` when the
object is initialized.
"""
# Copyright 2012-2015, Edward Powell, embolalia.net
# Copyright 2012-2015, Elsie Powell, embolalia.com
# Copyright © 2012, Elad Alfassa <[email protected]>
# Licensed under the Eiffel Forum License 2.

Expand Down
15 changes: 6 additions & 9 deletions sopel/coretasks.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
# coding=utf-8
"""
coretasks.py - Sopel Routine Core tasks
Copyright 2008-2011, Sean B. Palmer (inamidst.com) and Michael Yanovich
(yanovich.net)
Copyright © 2012, Elad Alfassa <[email protected]>
Copyright 2012, Edward Powell (embolalia.net)
Licensed under the Eiffel Forum License 2.
Sopel: http://sopel.chat/
"""Tasks that allow the bot to run, but aren't user-facing functionality
This is written as a module to make it easier to extend to support more
responses to standard IRC codes without having to shove them all into the
dispatch function in bot.py and making it easier to maintain.
"""
# Copyright 2008-2011, Sean B. Palmer (inamidst.com) and Michael Yanovich
# (yanovich.net)
# Copyright © 2012, Elad Alfassa <[email protected]>
# Copyright 2012-2015, Elsie Powell embolalia.com
# Licensed under the Eiffel Forum License 2.
from __future__ import unicode_literals, absolute_import, print_function, division


Expand Down
7 changes: 4 additions & 3 deletions sopel/formatting.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# coding=utf-8
"""*Availability: 4.5+*
"""The formatting module includes functions to apply IRC formatting to text.
The formatting module includes functions to apply IRC formatting to text."""
# Copyright 2014, Edward D. Powell, embolalia.net
*Availability: 4.5+*
"""
# Copyright 2014, Elsie Powell, embolalia.com
# Licensed under the Eiffel Forum License 2.
from __future__ import unicode_literals, absolute_import, print_function, division
import sys
Expand Down
22 changes: 9 additions & 13 deletions sopel/irc.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
# coding=utf-8
"""
irc.py - An Utility IRC Bot
Copyright 2008, Sean B. Palmer, inamidst.com
Copyright 2012, Edward Powell, http://embolalia.net
Copyright © 2012, Elad Alfassa <[email protected]>
Licensed under the Eiffel Forum License 2.
Sopel: http://sopel.chat/
When working on core IRC protocol related features, consult protocol
documentation at http://www.irchelp.org/irchelp/rfc/
"""
# irc.py - An Utility IRC Bot
# Copyright 2008, Sean B. Palmer, inamidst.com
# Copyright 2012, Elsie Powell, http://embolalia.com
# Copyright © 2012, Elad Alfassa <[email protected]>
#
# Licensed under the Eiffel Forum License 2.
#
# When working on core IRC protocol related features, consult protocol
# documentation at http://www.irchelp.org/irchelp/rfc/
from __future__ import unicode_literals, absolute_import, print_function, division

import sys
Expand Down
12 changes: 3 additions & 9 deletions sopel/modules/adminchannel.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
# coding=utf-8
"""
admin.py - Sopel Admin Module
Copyright 2010-2011, Michael Yanovich, Alek Rollyson, and Edward Powell
Copyright © 2012, Elad Alfassa <[email protected]>
Licensed under the Eiffel Forum License 2.
http://sopel.chat/
"""
# Copyright 2010-2011, Michael Yanovich, Alek Rollyson, and Elsie Powell
# Copyright © 2012, Elad Alfassa <[email protected]>
# Licensed under the Eiffel Forum License 2.
from __future__ import unicode_literals, absolute_import, print_function, division

import re
Expand Down
11 changes: 3 additions & 8 deletions sopel/modules/clock.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# coding=utf-8
"""
clock.py - Sopel Clock Module
Copyright 2008-9, Sean B. Palmer, inamidst.com
Copyright 2012, Edward Powell, embolalia.net
Licensed under the Eiffel Forum License 2.
http://sopel.chat
"""
# Copyright 2008-9, Sean B. Palmer, inamidst.com
# Copyright 2012, Elsie Powell, embolalia.com
# Licensed under the Eiffel Forum License 2.
from __future__ import unicode_literals, absolute_import, print_function, division

try:
Expand Down
12 changes: 4 additions & 8 deletions sopel/modules/currency.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# coding=utf-8
"""currency.py - Sopel Exchange Rate Module
Copyright 2013 Edward Powell, embolalia.com
Licensed under the Eiffel Forum License 2
http://sopel.chat
"""
# Copyright 2013 Elsie Powell, embolalia.com
# Licensed under the Eiffel Forum License 2
from __future__ import unicode_literals, absolute_import, print_function, division

import json
Expand Down Expand Up @@ -36,8 +32,8 @@ def get_rate(code):
if headers['_http_status'] == 404:
return False, False
namespaces = {
'http://www.cbwiki.net/wiki/index.php/Specification_1.1': 'cb',
'http://purl.org/rss/1.0/': None,
'http://www.cbwiki.net/wiki/index.php/Specification_1.1': 'cb',
'http://purl.org/rss/1.0/': None,
'http://www.w3.org/1999/02/22-rdf-syntax-ns#': 'rdf' }
xml = xmltodict.parse(data, process_namespaces=True, namespaces=namespaces).get('rdf:RDF')
namestring = xml.get('channel').get('title').get('#text')
Expand Down
13 changes: 5 additions & 8 deletions sopel/modules/find.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# coding=utf-8
"""
find.py - Sopel Spelling correction module
Copyright 2011, Michael Yanovich, yanovich.net
Copyright 2013, Edward Powell, embolalia.net
Licensed under the Eiffel Forum License 2.
http://sopel.chat
"""Sopel Spelling correction module
Contributions from: Matt Meinwald and Morgan Goose
This module will fix spelling errors if someone corrects them
using the sed notation (s///) commonly found in vi/vim.
"""
# Copyright 2011, Michael Yanovich, yanovich.net
# Copyright 2013, Elsie Powell, embolalia.com
# Licensed under the Eiffel Forum License 2.
# Contributions from: Matt Meinwald and Morgan Goose
from __future__ import unicode_literals, absolute_import, print_function, division

import re
Expand Down
5 changes: 2 additions & 3 deletions sopel/modules/find_updates.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# coding=utf-8
"""
find_updates.py - Update checking module for Sopel.
"""Update checking module for Sopel.
This is separated from version.py, so that it can be easily overridden by
distribution packagers, and they can check their repositories rather than the
Sopel website.
"""
# Copyright 2014, Edward D. Powell, embolalia.net
# Copyright 2014, Elsie Powell, embolalia.com
# Licensed under the Eiffel Forum License 2.
from __future__ import unicode_literals, absolute_import, print_function, division

Expand Down
9 changes: 2 additions & 7 deletions sopel/modules/isup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# coding=utf-8
"""
isup.py - Simple website status check with isup.me
Author: Edward Powell http://embolalia.net
About: http://sopel.chat
This allows users to check if a website is up through isup.me.
"""
"""Simple website status check with isup.me"""
# Author: Elsie Powell http://embolalia.com
from __future__ import unicode_literals, absolute_import, print_function, division

from sopel import web
Expand Down
9 changes: 1 addition & 8 deletions sopel/modules/reddit.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# coding=utf-8
"""
reddit-info.py - Sopel Reddit module
Author: Edward Powell, embolalia.net
About: http://sopel.chat
This module provides special tools for reddit, namely showing detailed
info about reddit posts
"""
# Author: Elsie Powell, embolalia.com
from __future__ import unicode_literals, absolute_import, print_function, division

from sopel.module import commands, rule, example, NOLIMIT, OP
Expand Down
19 changes: 7 additions & 12 deletions sopel/modules/search.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# coding=utf-8
"""
search.py - Sopel Web Search Module
Copyright 2008-9, Sean B. Palmer, inamidst.com
Copyright 2012, Edward Powell, embolalia.net
Licensed under the Eiffel Forum License 2.
http://sopel.chat
"""
# Copyright 2008-9, Sean B. Palmer, inamidst.com
# Copyright 2012, Elsie Powell, embolalia.com
# Licensed under the Eiffel Forum License 2.
from __future__ import unicode_literals, absolute_import, print_function, division

import re
Expand All @@ -19,7 +14,7 @@
from urllib import quote_plus
else:
from urllib.parse import quote_plus

def formatnumber(n):
"""Format a number with beautiful commas."""
parts = list(str(n))
Expand Down Expand Up @@ -57,11 +52,11 @@ def duck_search(query):
def duck_api(query):
if '!bang' in query.lower():
return 'https://duckduckgo.com/bang.html'

# This fixes issue #885 (https://github.com/sopel-irc/sopel/issues/885)
# It seems that duckduckgo api redirects to its Instant answer API html page
# It seems that duckduckgo api redirects to its Instant answer API html page
# if the query constains special charactares that aren't urlencoded.
# So in order to always get a JSON response back the query is urlencoded
# So in order to always get a JSON response back the query is urlencoded
query = quote_plus(query)
uri = 'http://api.duckduckgo.com/?q=%s&format=json&no_html=1&no_redirect=1' % query
results = json.loads(web.get(uri))
Expand Down
12 changes: 4 additions & 8 deletions sopel/modules/unicode_info.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
# coding=utf-8
"""
codepoints.py - Sopel Codepoints Module
Copyright 2013, Edward Powell, embolalia.net
Copyright 2008, Sean B. Palmer, inamidst.com
Licensed under the Eiffel Forum License 2.
http://sopel.chat
"""
"""Codepoints Module"""
# Copyright 2013, Elsie Powell, embolalia.com
# Copyright 2008, Sean B. Palmer, inamidst.com
# Licensed under the Eiffel Forum License 2.
from __future__ import unicode_literals, absolute_import, print_function, division
import unicodedata
import sys
Expand Down
16 changes: 6 additions & 10 deletions sopel/modules/url.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# coding=utf-8
"""
url.py - Sopel URL title module
Copyright 2010-2011, Michael Yanovich, yanovich.net, Kenneth Sham
Copyright 2012-2013 Edward Powell
Copyright 2013 Lior Ramati ([email protected])
Copyright © 2014 Elad Alfassa <[email protected]>
Licensed under the Eiffel Forum License 2.
http://sopel.chat
"""
"""URL title module"""
# Copyright 2010-2011, Michael Yanovich, yanovich.net, Kenneth Sham
# Copyright 2012-2013 Elsie Powell
# Copyright 2013 Lior Ramati ([email protected])
# Copyright © 2014 Elad Alfassa <[email protected]>
# Licensed under the Eiffel Forum License 2.
from __future__ import unicode_literals, absolute_import, print_function, division

import re
Expand Down
13 changes: 4 additions & 9 deletions sopel/modules/weather.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# coding=utf-8
"""
weather.py - Sopel Yahoo! Weather Module
Copyright 2008, Sean B. Palmer, inamidst.com
Copyright 2012, Edward Powell, embolalia.net
Licensed under the Eiffel Forum License 2.
http://sopel.chat
"""
# Copyright 2008, Sean B. Palmer, inamidst.com
# Copyright 2012, Elsie Powell, embolalia.com
# Licensed under the Eiffel Forum License 2.
from __future__ import unicode_literals, absolute_import, print_function, division

from sopel import web
Expand Down Expand Up @@ -143,7 +138,7 @@ def weather(bot, trigger):
return bot.reply("I don't know where that is.")

query = web.urlencode({'w': woeid, 'u': 'c'})
raw = web.get('http://weather.yahooapis.com/forecastrss?' + query,
raw = web.get('http://weather.yahooapis.com/forecastrss?' + query,
dont_decode=True)
parsed = xmltodict.parse(raw).get('rss')
location = parsed.get('channel').get('title')
Expand Down
Loading

0 comments on commit 6e10c9f

Please sign in to comment.