diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index 3369402..0000000 --- a/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -DevSuite -build -dist -log4j.properties -mobibot.properties -fetcher.properties -*.ser -logs \ No newline at end of file diff --git a/ChangeLog.txt b/ChangeLog.txt deleted file mode 100644 index 744bba7..0000000 --- a/ChangeLog.txt +++ /dev/null @@ -1,294 +0,0 @@ -2005-11-08 14:58 erik - - * buildnum.properties, mobibot.iml, mobibot.ipr, mobibot.iws, - lib/delicious-1.6.jar, lib/delicious-1.7.jar, - lib/delicious-1.9.jar, src/net/thauvin/erik/mobibot/Mobibot.java, - src/net/thauvin/erik/mobibot/ReleaseInfo.java: Added ability to - set the port. Added NickServ registartion. Updated to delicious - 1.9 API. Update URL to mobitopia.org. - -2005-08-08 21:53 erik - - * lib/delicious-1.7.jar: Updated to delicious 1.7 - -2005-05-11 02:05 erik - - * buildnum.properties, mobibot.iml, mobibot.ipr, mobibot.iws, - lib/commons-httpclient-3.0-rc1.jar, - lib/commons-httpclient-3.0-rc2.jar, lib/delicious-1.5.jar, - lib/delicious-1.6.jar, - src/net/thauvin/erik/mobibot/ReleaseInfo.java: Updated to - commons-httpclient 3.0rc2 Updated to delicious 1.6 - -2005-05-10 22:47 erik - - * mobibot.iml, mobibot.iws, lib/commons-net-1.2.2.jar, - lib/commons-net-1.4.0.jar: Updated to commons-net 1.4.0 - -2005-05-05 12:47 erik - - * properties/mobibot.properties, - src/net/thauvin/erik/mobibot/CurrencyConverter.java, - src/net/thauvin/erik/mobibot/DeliciousPoster.java, - src/net/thauvin/erik/mobibot/EntryLink.java, - src/net/thauvin/erik/mobibot/Mobibot.java, buildnum.properties, - mobibot.fb, mobibot.ipr, mobibot.iws, - src/net/thauvin/erik/mobibot/ReleaseInfo.java, - src/net/thauvin/erik/mobibot/StockQuote.java: Updated locations. - -2005-03-06 13:04 erik - - * mobibot.iws, lib/delicious-1.4.jar: Update to delcious-java 1.5. - -2005-03-06 13:04 erik - - * lib/delicious-1.5.jar, buildnum.properties, mobibot.iml, - mobibot.iws, src/net/thauvin/erik/mobibot/ReleaseInfo.java: - Update to delicious-java 1.5. - -2005-03-06 08:30 erik - - * ChangeLog.txt: Updated ChangeLog. - -2005-03-06 08:28 erik - - * buildnum.properties, mobibot.iws, - src/net/thauvin/erik/mobibot/DeliciousPoster.java, - src/net/thauvin/erik/mobibot/Mobibot.java, - src/net/thauvin/erik/mobibot/ReleaseInfo.java, - src/net/thauvin/erik/mobibot/SwingWorker.java: Added threading - while posting to del.icio.us. - -2005-03-05 13:52 erik - - * ChangeLog.txt, mobibot.iws, licenses/delicious-java License.txt, - website/index.html: Added delicious-java license. Updated - ChangeLog. - -2005-03-05 13:40 erik - - * lib/commons-codec-1.3.jar, lib/commons-httpclient-2.0.1.jar, - lib/commons-httpclient-3.0-rc1.jar, lib/delicious-1.4.jar, - properties/mobibot.properties, build.properties, - buildnum.properties, mobibot.iml, mobibot.ipr, mobibot.iws, - src/net/thauvin/erik/mobibot/DeliciousPoster.java, - src/net/thauvin/erik/mobibot/EntryLink.java, - src/net/thauvin/erik/mobibot/Mobibot.java, - src/net/thauvin/erik/mobibot/ReleaseInfo.java, - website/index.html: Added support for del.icio.us - -2004-11-16 07:46 erik - - * buildnum.properties, mobibot.iws, - src/net/thauvin/erik/mobibot/Mobibot.java, - src/net/thauvin/erik/mobibot/ReleaseInfo.java, - website/index.html: Added the ability to ignore nicknames. - -2004-10-30 13:37 erik - - * buildnum.properties, mobibot.iws, - src/net/thauvin/erik/mobibot/Mobibot.java, - src/net/thauvin/erik/mobibot/ReleaseInfo.java, - website/index.html: Added the ability to ignore links from - specified nicknames. - -2004-10-04 07:22 erik - - * build.properties, buildnum.properties, mobibot.iws, - src/net/thauvin/erik/mobibot/Mobibot.java, - src/net/thauvin/erik/mobibot/ReleaseInfo.java: Added - action(channel, action) method. Added input validation to - action/send methods. - -2004-09-28 02:15 erik - - * lib/MathEvaluator.jar: Fixed a problem with the MathEvaluator - library where "atan(), asin(), acos()" never worked right. - -2004-09-27 18:36 erik - - * .cvsignore, build.properties, build.xml, buildnum.properties, - mobibot.iml, mobibot.ipr, mobibot.iws, - ant/jreleaseinfo-1.2.0.jar, lib/EXML.jar, lib/fetchrss.jar, - lib/jdom-1.0.jar, lib/jdom.jar, lib/pircbot.jar, - lib/rome-0.4.jar, lib/rome-fetcher-0.4.jar, lib/rsslibj.jar, - licenses/EXML-license.txt, licenses/ROME License.txt, - licenses/RSSJLib License.txt, licenses/fetchrss License.txt, - properties/fetcher.properties, - src/net/thauvin/erik/mobibot/CurrencyConverter.java, - src/net/thauvin/erik/mobibot/EntryLink.java, - src/net/thauvin/erik/mobibot/FeedReader.java, - src/net/thauvin/erik/mobibot/GoogleSearch.java, - src/net/thauvin/erik/mobibot/Mobibot.java, - src/net/thauvin/erik/mobibot/ReleaseInfo.java, - src/net/thauvin/erik/mobibot/StockQuote.java, - src/net/thauvin/erik/mobibot/Weather.java, website/index.html: - Rome is now used to create and read the various feed. - -2004-08-03 01:07 erik - - * lib/commons-httpclient-2.0-final.jar, build.xml, mobibot.iml, - mobibot.ipr, mobibot.iws, lib/commons-httpclient-2.0.1.jar, - src/net/thauvin/erik/mobibot/Mobibot.java: Commons HTTPClinet - 2.0.1 update. Added automated backup for the data file. - -2004-07-07 07:10 erik - - * lib/commons-logging.jar: Commons Logging 1.0.4 update. - -2004-07-07 07:10 erik - - * lib/pircbot.jar: PircBot 1.4.0 update. - -2004-07-07 07:10 erik - - * lib/: commons-net-1.2.0.jar, commons-net-1.2.2.jar: Commons Net - 1.2.2 update. - -2004-07-05 19:03 erik - - * lib/: jweather-0.2.4.jar, jweather-0.2.5.jar: jweather 0.2.5 - upgrade - -2004-05-03 10:53 erik - - * lib/: commons-net-1.1.0.jar, commons-net-1.2.0.jar, - jweather-0.2.3.jar, jweather-0.2.4.jar: commons-net 1.1.0 and - jweather 0.2.4 - -2004-03-10 09:05 erik - - * .cvsignore: Ignore all serial files. - -2004-03-10 09:04 erik - - * src/net/thauvin/erik/mobibot/Mobibot.java: Removed angled - brackets around URLs as it was breaking Trillian. Added pong - command. - -2004-03-10 09:03 erik - - * src/net/thauvin/erik/mobibot/Weather.java: Added invalid station - ID message. - -2004-03-10 09:03 erik - - * src/net/thauvin/erik/mobibot/: FeedReader.java, - GoogleSearch.java: Removed angled brackets around URLs as it was - breaking Trillian. - -2004-03-02 05:53 erik - - * mobibot.iws, src/net/thauvin/erik/mobibot/Mobibot.java: Now uses - setAutoNickChange() - -2004-03-02 05:52 erik - - * lib/pircbot.jar: PircBot 1.3.0 - -2004-02-25 17:21 erik - - * ChangeLog.txt: Initial import. - -2004-02-25 16:27 erik - - * mobibot.iws, src/net/thauvin/erik/mobibot/Mobibot.java: Added - random ping response. - -2004-02-25 04:12 erik - - * src/net/thauvin/erik/mobibot/: CurrencyConverter.java, - GoogleSearch.java, Mobibot.java, Weather.java: Added -serial - command line argument. Added ability to search the current URL - posts. Added ping command. Added more efficient arguments - parsing in the public and private commands. Added ability for - the originator to modify a post's URL. Removed the various - URL-based attributes from the constructor. Fixed the nick - command. - -2004-02-24 05:09 erik - - * README.txt: The properties file can now be specified from the - command line. - -2004-02-24 04:58 erik - - * website/index.html: Added reference to Commons CLI. - -2004-02-24 04:56 erik - - * mobibot.iml, mobibot.iws, lib/commons-cli-1.0.jar, - src/net/thauvin/erik/mobibot/Mobibot.java: The properties file - can now be specified from the command line. - -2004-02-24 04:55 erik - - * src/net/thauvin/erik/mobibot/CurrencyConverter.java: Added the - ability to list the current rates. - -2004-02-18 03:40 erik - - * src/net/thauvin/erik/mobibot/: Mobibot.java, Weather.java: The - weather command help is now returned when a station id is not - specified. - -2004-02-17 06:10 erik - - * README.txt: Added (very) minimal instructions. - -2004-02-17 03:22 erik - - * website/index.html: Added wiki reference. - -2004-02-16 20:04 erik - - * .cvsignore, build.properties, build.xml, mobibot.fb, mobibot.iml, - mobibot.ipr, mobibot.iws, lib/EXML.jar, - lib/commons-httpclient-2.0-final.jar, lib/commons-logging.jar, - lib/commons-net-1.1.0.jar, lib/fetchrss.jar, lib/google.jar, - lib/MathEvaluator.jar, lib/googleapi.jar, - lib/jakarta-oro-2.0.8.jar, lib/jdom.jar, lib/jweather-0.2.3.jar, - lib/log4j-1.2.8.jar, lib/pircbot.jar, lib/rsslibj.jar, - licenses/Commons License.txt, licenses/EXML-license.txt, - licenses/Google License.txt, licenses/GoogleTagLib License.txt, - licenses/JDOM License.txt, licenses/JWeather License.txt, - licenses/License.txt, licenses/Log4j License.txt, - licenses/PircBot License.html, licenses/RSSJLib License.txt, - licenses/fetchrss License.txt, properties/log4j.properties, - properties/mobibot.properties, - src/net/thauvin/erik/mobibot/CurrencyConverter.java, - src/net/thauvin/erik/mobibot/EntryComment.java, - src/net/thauvin/erik/mobibot/EntryLink.java, - src/net/thauvin/erik/mobibot/FeedReader.java, - src/net/thauvin/erik/mobibot/GoogleSearch.java, - src/net/thauvin/erik/mobibot/Mobibot.java, - src/net/thauvin/erik/mobibot/StockQuote.java, - src/net/thauvin/erik/mobibot/Weather.java, website/index.html, - website/simple.css: Initial import. - -2004-02-16 20:04 erik - - * .cvsignore, build.properties, build.xml, mobibot.fb, mobibot.iml, - mobibot.ipr, mobibot.iws, lib/EXML.jar, - lib/commons-httpclient-2.0-final.jar, lib/commons-logging.jar, - lib/commons-net-1.1.0.jar, lib/fetchrss.jar, lib/google.jar, - lib/MathEvaluator.jar, lib/googleapi.jar, - lib/jakarta-oro-2.0.8.jar, lib/jdom.jar, lib/jweather-0.2.3.jar, - lib/log4j-1.2.8.jar, lib/pircbot.jar, lib/rsslibj.jar, - licenses/Commons License.txt, licenses/EXML-license.txt, - licenses/Google License.txt, licenses/GoogleTagLib License.txt, - licenses/JDOM License.txt, licenses/JWeather License.txt, - licenses/License.txt, licenses/Log4j License.txt, - licenses/PircBot License.html, licenses/RSSJLib License.txt, - licenses/fetchrss License.txt, properties/log4j.properties, - properties/mobibot.properties, - src/net/thauvin/erik/mobibot/CurrencyConverter.java, - src/net/thauvin/erik/mobibot/EntryComment.java, - src/net/thauvin/erik/mobibot/EntryLink.java, - src/net/thauvin/erik/mobibot/FeedReader.java, - src/net/thauvin/erik/mobibot/GoogleSearch.java, - src/net/thauvin/erik/mobibot/Mobibot.java, - src/net/thauvin/erik/mobibot/StockQuote.java, - src/net/thauvin/erik/mobibot/Weather.java, website/index.html, - website/simple.css: Initial revision - diff --git a/README.txt b/README.txt deleted file mode 100644 index 804b473..0000000 --- a/README.txt +++ /dev/null @@ -1,23 +0,0 @@ -Some very basic instructions: - - ant jar - - mkdir run - - cp dist/mobibot.jar run - cp -R lib run - cp properties/*.properties run - - cd run - - mkdir logs - - { configure the properties } - vi *.properties - - { help } - java -jar mobibot.jar -h - - { launch } - /usr/bin/nohup java -jar mobibot.jar & - \ No newline at end of file diff --git a/ant/jreleaseinfo-1.3.0.jar b/ant/jreleaseinfo-1.3.0.jar deleted file mode 100644 index 0c00c5f..0000000 Binary files a/ant/jreleaseinfo-1.3.0.jar and /dev/null differ diff --git a/build.properties b/build.properties deleted file mode 100644 index daa4b7e..0000000 --- a/build.properties +++ /dev/null @@ -1,12 +0,0 @@ -# Project -proj.name=mobibot -proj.version=0.4 -proj.package=net.thauvin.erik.mobibot -proj.run=${proj.package}.Mobibot - -# Locations -path.classes=build -path.src=src -path.dist=dist -path.lib=lib -path.ant=ant \ No newline at end of file diff --git a/build.xml b/build.xml deleted file mode 100644 index d3386f6..0000000 --- a/build.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/MathEvaluator.jar b/lib/MathEvaluator.jar deleted file mode 100644 index 9011d76..0000000 Binary files a/lib/MathEvaluator.jar and /dev/null differ diff --git a/lib/commons-cli-1.1.jar b/lib/commons-cli-1.1.jar deleted file mode 100644 index e633afb..0000000 Binary files a/lib/commons-cli-1.1.jar and /dev/null differ diff --git a/lib/commons-codec-1.3.jar b/lib/commons-codec-1.3.jar deleted file mode 100644 index 957b675..0000000 Binary files a/lib/commons-codec-1.3.jar and /dev/null differ diff --git a/lib/commons-httpclient-3.1.jar b/lib/commons-httpclient-3.1.jar deleted file mode 100644 index 7c59774..0000000 Binary files a/lib/commons-httpclient-3.1.jar and /dev/null differ diff --git a/lib/commons-logging-1.1.1.jar b/lib/commons-logging-1.1.1.jar deleted file mode 100644 index 8758a96..0000000 Binary files a/lib/commons-logging-1.1.1.jar and /dev/null differ diff --git a/lib/commons-net-1.4.1.jar b/lib/commons-net-1.4.1.jar deleted file mode 100644 index 9666a92..0000000 Binary files a/lib/commons-net-1.4.1.jar and /dev/null differ diff --git a/lib/delicious-1.14.jar b/lib/delicious-1.14.jar deleted file mode 100644 index bf441fa..0000000 Binary files a/lib/delicious-1.14.jar and /dev/null differ diff --git a/lib/google.jar b/lib/google.jar deleted file mode 100644 index 391aba6..0000000 Binary files a/lib/google.jar and /dev/null differ diff --git a/lib/googleapi.jar b/lib/googleapi.jar deleted file mode 100644 index 2aade51..0000000 Binary files a/lib/googleapi.jar and /dev/null differ diff --git a/lib/jakarta-oro-2.0.8.jar b/lib/jakarta-oro-2.0.8.jar deleted file mode 100644 index 23488d2..0000000 Binary files a/lib/jakarta-oro-2.0.8.jar and /dev/null differ diff --git a/lib/jdom-1.1.jar b/lib/jdom-1.1.jar deleted file mode 100644 index 97c85f5..0000000 Binary files a/lib/jdom-1.1.jar and /dev/null differ diff --git a/lib/jweather-0.2.5.jar b/lib/jweather-0.2.5.jar deleted file mode 100644 index 67baaaf..0000000 Binary files a/lib/jweather-0.2.5.jar and /dev/null differ diff --git a/lib/log4j-1.2.13.jar b/lib/log4j-1.2.13.jar deleted file mode 100644 index dde9972..0000000 Binary files a/lib/log4j-1.2.13.jar and /dev/null differ diff --git a/lib/pircbot.jar b/lib/pircbot.jar deleted file mode 100644 index b058aba..0000000 Binary files a/lib/pircbot.jar and /dev/null differ diff --git a/lib/rome-0.4.jar b/lib/rome-0.4.jar deleted file mode 100644 index a2937c0..0000000 Binary files a/lib/rome-0.4.jar and /dev/null differ diff --git a/lib/rome-fetcher-0.4.jar b/lib/rome-fetcher-0.4.jar deleted file mode 100644 index 4ad3371..0000000 Binary files a/lib/rome-fetcher-0.4.jar and /dev/null differ diff --git a/lib/twitter4j-1.0.4.jar b/lib/twitter4j-1.0.4.jar deleted file mode 100644 index 54d365e..0000000 Binary files a/lib/twitter4j-1.0.4.jar and /dev/null differ diff --git a/lib/ws-commons-util-1.0.2.jar b/lib/ws-commons-util-1.0.2.jar deleted file mode 100644 index 3fc364e..0000000 Binary files a/lib/ws-commons-util-1.0.2.jar and /dev/null differ diff --git a/lib/xmlrpc-client-3.1.jar b/lib/xmlrpc-client-3.1.jar deleted file mode 100644 index a76e6ec..0000000 Binary files a/lib/xmlrpc-client-3.1.jar and /dev/null differ diff --git a/lib/xmlrpc-common-3.1.jar b/lib/xmlrpc-common-3.1.jar deleted file mode 100644 index 862098b..0000000 Binary files a/lib/xmlrpc-common-3.1.jar and /dev/null differ diff --git a/licenses/Apache LICENSE.txt b/licenses/Apache LICENSE.txt deleted file mode 100644 index d645695..0000000 --- a/licenses/Apache LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/licenses/Google License.txt b/licenses/Google License.txt deleted file mode 100644 index 50f948b..0000000 --- a/licenses/Google License.txt +++ /dev/null @@ -1,150 +0,0 @@ -Thank you for using the Google Web APIs (TM) service! By using this -service ("Google Web APIs") you agree to be bound by the following -terms and conditions (the "Terms and Conditions"). - -PERSONAL AND LEGITIMATE USES ONLY - -The Google Web APIs service is made available to you for your -personal, non-commercial use only (at home or at work). You may only -create a single account and must provide accurate identification, -contact, and other information required as part of the registration -process. You may not create any script or other automated tool that -attempts to create multiple Google Web APIs accounts. And you may not -use the search results provided by the Google Web APIs service with an -existing product or service that competes with products or services -offered by Google. - -If you are interested in doing anything different than the foregoing, -you must first obtain Google's written consent. If you fail to do so, -Google reserves the right to take legal action against you. - -Furthermore, you may not use Google Web APIs in any manner that either -directly or indirectly violates any laws or proprietary rights. This -includes laws and proprietary rights in the United States as well as -in other countries. - -If you have questions on your contemplated use or if you have comments -on Google Web APIs or ideas on how to improve it, please email -api-support@google.com. Please note that by doing so, you also grant -Google permission to use and incorporate your ideas or comments into -Google Web APIs without further compensation. - -INTELLECTUAL PROPERTY - -You agree not to remove, obscure, or alter Google's copyright notice, -trademarks, or other proprietary rights notices affixed to or -contained within Google Web APIs. You also acknowledge that Google -owns all right, title and interest in and to Google Web APIs, -including without limitation all intellectual property rights (the -"Google Rights"). The Google Rights include rights to the following: -(1) the APIs developed and provided by Google, (2) all software -associated with the Google Web APIs server, and (3) the search results -and spell checking you obtain when you use Google Web APIs. The Google -Rights do not include the following: (1) third party components used -as part of Google Web APIs; or (2) software developed by you in -conjunction with using Google Web APIs. - -PUBLICITY - -So long as you comply with your obligations under this Agreement, you -may indicate that a product or service that you created either used or -is based on Google Web APIs provided that those products or services -do not in Google's reasonable opinion (1) tarnish, infringe, or dilute -Google's trademarks, (2) violate any applicable law, and (3) infringe -any third party rights. If you wish to use the GOOGLE trademark and/or -logo in any other manner, you must first obtain Google's written -consent. - -DISCLAIMER OF WARRANTIES - -The Google Web APIs service is presently in Beta form and has not been -fully tested or debugged. Accordingly, Google disclaims any -responsibility for any harm resulting from your use of Google Web APIs. - -The Google Web APIs service is provided "as is," with no warranties -whatsoever. Google expressly disclaims to the fullest extent permitted -by law all express, implied, and statutory warranties, including, -without limitation, the warranties of merchantability, fitness for a -particular purpose, and non-infringement of proprietary rights. Google -disclaims any warranties regarding the security, reliability, -timeliness, availability, and performance of Google Web APIs. - -You understand and agree that you use Google Web APIs at your own -discretion and risk and that you will be solely responsible for any -damages to your computer system or loss of data that results from the -download or use of Google Web APIs. - -Some states or other jurisdictions do not allow the exclusion of -implied warranties, so the above exclusions may not apply to you. You -may also have other rights that vary from state to state and -jurisdiction to jurisdiction. - -LIMITATION OF LIABILITY - -The Google Web APIs service is being provided free of charge. -Accordingly, you agree that Google shall have no liability arising -from or based on your use of Google Web APIs. - -Under no circumstances shall Google be liable to any user on account -of that user's use or misuse of Google Web APIs. Such limitation of -liability shall apply to prevent recovery of direct, indirect, -incidental, consequential, special, exemplary, and punitive damages -whether such claim is based on warranty, contract, tort (including -negligence), or otherwise, even if Google has been advised of the -possibility of such damages). Such limitation of liability shall apply -whether the damages arise from use or misuse of and reliance on the -Google Web APIs, from inability to use Google Web APIs, or from the -interruption, suspension, or termination of Google Web APIs (including -such damages incurred by third parties). Such limitation shall apply -notwithstanding a failure of essential purpose of any limited remedy -and to the fullest extent permitted by law. - -Some states or other jurisdictions do not allow the exclusion or -limitation of liability for incidental or consequential damages, so -the above limitations and exclusions may not apply to you. - -INDEMNIFICATION - -You hereby agree to indemnify, defend and hold Google, and its -officers, directors, agents, licensors and licensees (collectively, -the "Indemnified Parties") harmless from and against any and all -liability and costs incurred by the Indemnified Parties in connection -with any claim arising out of your use of Google Web APIs, including, -without limitation, reasonable attorneys' fees. You shall cooperate as -fully as reasonably required in the defense of any claim. Google -reserves the right, at its own expense, to assume the exclusive -defense and control of any matter subject to indemnification by you. - -GOOGLE'S SEARCH SERVICE - -The Google Web APIs service is designed to be used in conjunction with -Google's search services. Accordingly, your use of Google Web APIs is -also defined by Google's Terms of Service and Privacy Policy. In the -event of a conflict between these Terms and Conditions and Google's -Terms of Service, these Terms and Conditions shall prevail. - -TERM AND TERMINATION - -If you wish to terminate this Agreement, you may simply cease using -the Google Web APIs service. In such a case, you must delete any -search result information that you may have obtained from the Google -Web APIs service. Google may terminate this Agreement (and your -account) at any time, with or without cause. - -GENERAL PROVISIONS - -These Terms and Conditions will be governed by and construed in -accordance with the laws of the State of California, without giving -effect to the conflict of laws provisions of California or your actual -state or country of residence. Any dispute arising from these Terms -and Conditions shall be adjudicated in the federal or state courts -located in Santa Clara County, California. If for any reason a court -of competent jurisdiction finds any provision or portion of these -Terms and Conditions to be unenforceable, the remainder of these Terms -and Conditions will continue in full force and effect. These Terms and -Conditions constitute the entire agreement between the parties with -respect to the subject matter hereof and supersede and replace all -prior or contemporaneous understandings or agreements, written or -oral, regarding such subject matter. Any waiver of any provision of -these Terms and Conditions will be effective only if in writing and -signed by Google. diff --git a/licenses/GoogleTagLib License.txt b/licenses/GoogleTagLib License.txt deleted file mode 100644 index c300b97..0000000 --- a/licenses/GoogleTagLib License.txt +++ /dev/null @@ -1,29 +0,0 @@ -Google Tag Library License - -Copyright (c) 2002-2003, Erik C. Thauvin (erik@thauvin.net) -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list -of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, this -list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. - -Neither the name of the author nor the names of its contributors may be used to -endorse or promote products derived from this software without specific prior -written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/JDOM License.txt b/licenses/JDOM License.txt deleted file mode 100644 index 81afefe..0000000 --- a/licenses/JDOM License.txt +++ /dev/null @@ -1,56 +0,0 @@ -/*-- - - $Id$ - - Copyright (C) 2000-2004 Jason Hunter & Brett McLaughlin. - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions, and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions, and the disclaimer that follows - these conditions in the documentation and/or other materials - provided with the distribution. - - 3. The name "JDOM" must not be used to endorse or promote products - derived from this software without prior written permission. For - written permission, please contact . - - 4. Products derived from this software may not be called "JDOM", nor - may "JDOM" appear in their name, without prior written permission - from the JDOM Project Management . - - In addition, we request (but do not require) that you include in the - end-user documentation provided with the redistribution and/or in the - software itself an acknowledgement equivalent to the following: - "This product includes software developed by the - JDOM Project (http://www.jdom.org/)." - Alternatively, the acknowledgment may be graphical using the logos - available at http://www.jdom.org/images/logos. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - This software consists of voluntary contributions made by many - individuals on behalf of the JDOM Project and was originally - created by Jason Hunter and - Brett McLaughlin . For more information - on the JDOM Project, please see . - - */ - diff --git a/licenses/JWeather License.txt b/licenses/JWeather License.txt deleted file mode 100644 index 14db8fc..0000000 --- a/licenses/JWeather License.txt +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/licenses/License.txt b/licenses/License.txt deleted file mode 100644 index c4fe425..0000000 --- a/licenses/License.txt +++ /dev/null @@ -1,29 +0,0 @@ -Mobibot License - -Copyright (c) 2004, Erik C. Thauvin (erik@thauvin.net) -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list -of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, this -list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. - -Neither the name of the author nor the names of its contributors may be used to -endorse or promote products derived from this software without specific prior -written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/PircBot License.html b/licenses/PircBot License.html deleted file mode 100644 index 2a5a569..0000000 --- a/licenses/PircBot License.html +++ /dev/null @@ -1,60 +0,0 @@ - - - -The GNU General Public License (GPL) - - -

The GNU General Public License (GPL)

-

Version 2, June 1991

-

Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

-

Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.

-

Preamble

-

The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.

-

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.

-

To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.

-

For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

-

We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.

-

Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.

-

Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.

-

The precise terms and conditions for copying, distribution and modification follow.

-

TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

-

0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".

-

Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.

-

1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.

-

You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.

-

2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:

-
-

a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.

-

b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.

-

c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)

-
-

These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.

-

Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.

-

In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.

-

3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:

-
-

a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

-

b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

-

c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)

-
-

The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.

-

If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.

-

4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.

-

5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.

-

6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.

-

7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.

-

If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.

-

It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.

-

This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.

-

8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.

-

9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

-

Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.

-

10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.

-

NO WARRANTY

-

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

-

12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

-

END OF TERMS AND CONDITIONS

- - diff --git a/licenses/ROME License.txt b/licenses/ROME License.txt deleted file mode 100644 index f43cdb1..0000000 --- a/licenses/ROME License.txt +++ /dev/null @@ -1,14 +0,0 @@ -Copyright 2004 Sun Microsystems, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - diff --git a/licenses/Twitter4J LICENSE.txt b/licenses/Twitter4J LICENSE.txt deleted file mode 100644 index c5669d9..0000000 --- a/licenses/Twitter4J LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2007-2008, Yusuke Yamamoto -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Yusuke Yamamoto nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY Yusuke Yamamoto ``AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL Yusuke Yamamoto BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/licenses/delicious-java License.txt b/licenses/delicious-java License.txt deleted file mode 100644 index 8249563..0000000 --- a/licenses/delicious-java License.txt +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Copyright (c) 2004, David A. Czarnecki - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of the "David A. Czarnecki" nor the names of - * its contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ \ No newline at end of file diff --git a/mobibot.fb b/mobibot.fb deleted file mode 100644 index 3a6314f..0000000 --- a/mobibot.fb +++ /dev/null @@ -1,21 +0,0 @@ -[Jar files] -D:\projects\java\mobibot\build -[Source dirs] -D:\projects\java\mobibot\src -[Aux classpath entries] -D:\projects\java\mobibot\lib\commons-cli-1.0.jar -D:\projects\java\mobibot\lib\commons-codec-1.3.jar -D:\projects\java\mobibot\lib\commons-httpclient-3.0-rc1.jar -D:\projects\java\mobibot\lib\commons-logging.jar -D:\projects\java\mobibot\lib\commons-net-1.2.2.jar -D:\projects\java\mobibot\lib\delicious-1.5.jar -D:\projects\java\mobibot\lib\google.jar -D:\projects\java\mobibot\lib\googleapi.jar -D:\projects\java\mobibot\lib\jakarta-oro-2.0.8.jar -D:\projects\java\mobibot\lib\jdom-1.0.jar -D:\projects\java\mobibot\lib\jweather-0.2.5.jar -D:\projects\java\mobibot\lib\log4j-1.2.8.jar -D:\projects\java\mobibot\lib\MathEvaluator.jar -D:\projects\java\mobibot\lib\pircbot.jar -D:\projects\java\mobibot\lib\rome-0.4.jar -D:\projects\java\mobibot\lib\rome-fetcher-0.4.jar diff --git a/mobibot.iml b/mobibot.iml deleted file mode 100644 index f48c5a8..0000000 --- a/mobibot.iml +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/properties/.cvsignore b/properties/.cvsignore deleted file mode 100644 index 0567e20..0000000 --- a/properties/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.properties diff --git a/src/net/thauvin/erik/mobibot/CurrencyConverter.java b/src/net/thauvin/erik/mobibot/CurrencyConverter.java deleted file mode 100644 index 745c1de..0000000 --- a/src/net/thauvin/erik/mobibot/CurrencyConverter.java +++ /dev/null @@ -1,231 +0,0 @@ -/* - * @(#)CurrencyConverter.java - * - * Copyright (c) 2004, Erik C. Thauvin (erik@thauvin.net) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ - * - */ -package net.thauvin.erik.mobibot; - -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.JDOMException; -import org.jdom.Namespace; - -import org.jdom.input.SAXBuilder; - -import java.io.IOException; - -import java.net.URL; - -import java.text.NumberFormat; - -import java.util.*; - - -/** - * Converts various currencies. - * - * @author Erik C. Thauvin - * @version $Revision$, $Date$ - * - * @created Feb 11, 2004 - * @since 1.0 - */ -public class CurrencyConverter implements Runnable -{ - /** - * The exchange rates table URL. - */ - private static final String EXCHANGE_TABLE_URL = "http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml"; - - /** - * The exchange rates. - */ - private static final Map EXCHANGE_RATES = new TreeMap(); - - /** - * The rates keyword. - */ - private static final String RATES_KEYWORD = "rates"; - - /** - * The last exchange rates table publication date. - */ - private String s_date = ""; - - /** - * The bot. - */ - private final Mobibot _bot; - - /** - * The actual currency _query. - */ - private final String _query; - - /** - * The nick of the person who sent the message. - */ - private final String _sender; - - /** - * Creates a new CurrencyConverter object. - * - * @param bot The bot. - * @param sender The nick of the person who sent the message. - * @param query The currency query. - * @param date The current date. - */ - public CurrencyConverter(Mobibot bot, String sender, String query, String date) - { - _bot = bot; - _sender = sender; - _query = query.toLowerCase(); - - if (!s_date.equals(date)) - { - EXCHANGE_RATES.clear(); - } - } - - // Converts specified currencies. - public final void run() - { - if (EXCHANGE_RATES.isEmpty()) - { - try - { - final SAXBuilder builder = new SAXBuilder(); - builder.setIgnoringElementContentWhitespace(true); - - final Document doc = builder.build(new URL(EXCHANGE_TABLE_URL)); - final Element root = doc.getRootElement(); - final Namespace ns = root.getNamespace(""); - final Element cubeRoot = root.getChild("Cube", ns); - final Element cubeTime = cubeRoot.getChild("Cube", ns); - - s_date = cubeTime.getAttribute("time").getValue(); - - final List cubes = cubeTime.getChildren(); - Element cube; - - for (int i = 0; i < cubes.size(); i++) - { - cube = (Element) cubes.get(i); - EXCHANGE_RATES.put(cube.getAttribute("currency").getValue(), cube.getAttribute("rate").getValue()); - } - - EXCHANGE_RATES.put("EUR", "1"); - } - catch (JDOMException e) - { - _bot.getLogger().debug("Unable to parse the exchange rates table.", e); - _bot.send(_sender, "An error has occurred while parsing the exchange rates table."); - } - catch (IOException e) - { - _bot.getLogger().debug("Unable to fetch the exchange rates table.", e); - _bot.send(_sender, - "An error has occurred while fetching the exchange rates table: " + e.getMessage()); - } - } - - if (!EXCHANGE_RATES.isEmpty()) - { - if (_query.matches("\\d+([,\\d]+)?(\\.\\d+)? [a-z]{3}+ to [a-z]{3}+")) - { - final String[] cmds = _query.split(" "); - - if (cmds.length == 4) - { - if (cmds[3].equals(cmds[1])) - { - _bot.send(_sender, "You're kidding, right?"); - } - else - { - try - { - final double amt = Double.parseDouble(cmds[0].replaceAll(",", "")); - final double from = Double.parseDouble((String) EXCHANGE_RATES.get(cmds[1].toUpperCase())); - final double to = Double.parseDouble((String) EXCHANGE_RATES.get(cmds[3].toUpperCase())); - - _bot.send(_bot.getChannel(), - NumberFormat.getCurrencyInstance(Locale.US).format(amt).substring(1) + ' ' + - cmds[1].toUpperCase() + " = " + - NumberFormat.getCurrencyInstance(Locale.US).format((amt * to) / from) - .substring(1) + ' ' + cmds[3].toUpperCase()); - } - catch (NullPointerException e) - { - _bot.send(_sender, - "The supported currencies are: " + EXCHANGE_RATES.keySet().toString()); - } - } - } - } - else if (_query.equals(RATES_KEYWORD)) - { - _bot.send(_sender, "Last Update: " + s_date); - - final Iterator it = EXCHANGE_RATES.keySet().iterator(); - String rate; - - final StringBuffer buff = new StringBuffer(0); - - while (it.hasNext()) - { - rate = (String) it.next(); - if (buff.length() > 0) - { - buff.append(", "); - } - buff.append(rate).append(": ").append(EXCHANGE_RATES.get(rate)); - } - - _bot.send(_sender, buff.toString()); - - } - else - { - _bot.helpResponse(_sender, Mobibot.CURRENCY_CMD + ' ' + _query); - _bot.send(_sender, "The supported currencies are: " + EXCHANGE_RATES.keySet().toString()); - } - } - else - { - _bot.getLogger().debug("The exchange rate table is empty."); - _bot.send(_sender, "Sorry, but the exchange rate table is empty."); - } - } -} diff --git a/src/net/thauvin/erik/mobibot/DeliciousPoster.java b/src/net/thauvin/erik/mobibot/DeliciousPoster.java deleted file mode 100644 index b63c5f6..0000000 --- a/src/net/thauvin/erik/mobibot/DeliciousPoster.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * @(#)DeliciousPoster.java - * - * Copyright (c) 2005, Erik C. Thauvin (erik@thauvin.net) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ - * - */ -package net.thauvin.erik.mobibot; - -import del.icio.us.Delicious; - - -/** - * The class to handle posts to del.icio.us. - * - * @author Erik C. Thauvin - * @version $Revision$, $Date$ - * @created Mar 5, 2005 - * @since 1.0 - * @noinspection UnnecessaryBoxing - */ -public class DeliciousPoster -{ - private final Delicious _delicious; - private final String _ircServer; - - /** - * Creates a new DeliciousPoster instance. - * - * @param username The del.icio.us username. - * @param password The del.icio.us password. - * @param ircServer The IRC server. - */ - public DeliciousPoster(String username, String password, String ircServer) - { - _delicious = new Delicious(username, password); - _ircServer = ircServer; - } - - /** - * Adds a post to del.icio.us. - * - * @param entry The entry to add. - */ - public final void addPost(final EntryLink entry) - { - final SwingWorker worker = - new SwingWorker() - { - public Object construct() - { - return Boolean.valueOf(_delicious.addPost(entry.getLink(), entry.getTitle(), postedBy(entry), - entry.getDeliciousTags(), entry.getDate())); - } - }; - - worker.start(); - } - - /** - * Deletes a post to del.icio.us. - * - * @param entry The entry to delete. - */ - public final void deletePost(EntryLink entry) - { - final String link = entry.getLink(); - - final SwingWorker worker = - new SwingWorker() - { - public Object construct() - { - return Boolean.valueOf(_delicious.deletePost(link)); - } - }; - - worker.start(); - } - - /** - * Updates a post to del.icio.us. - * - * @param oldUrl The old post URL. - * @param entry The entry to add. - */ - public final void updatePost(final String oldUrl, final EntryLink entry) - { - final SwingWorker worker = - new SwingWorker() - { - public Object construct() - { - if (!oldUrl.equals(entry.getLink())) - { - _delicious.deletePost(oldUrl); - - return Boolean.valueOf(_delicious.addPost(entry.getLink(), entry.getTitle(), postedBy(entry), - entry.getDeliciousTags(), entry.getDate())); - } - else - { - return Boolean.valueOf(_delicious.addPost(entry.getLink(), entry.getTitle(), postedBy(entry), - entry.getDeliciousTags(), entry.getDate(), true, - true)); - } - } - }; - - worker.start(); - } - - - /** - * Returns he del.icio.us extended attribution line. - * - * @param entry The entry. - * - * @return The extended attribution line. - */ - private String postedBy(EntryLink entry) - { - return "Posted by " + entry.getNick() + " on " + entry.getChannel() + " (" + _ircServer + ')'; - } -} diff --git a/src/net/thauvin/erik/mobibot/EntryComment.java b/src/net/thauvin/erik/mobibot/EntryComment.java deleted file mode 100644 index b6876dc..0000000 --- a/src/net/thauvin/erik/mobibot/EntryComment.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * @(#)EntryComment.java - * - * Copyright (c) 2004, Erik C. Thauvin (erik@thauvin.net) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ - * - */ -package net.thauvin.erik.mobibot; - -import java.io.Serializable; - -import java.util.Calendar; -import java.util.Date; - - -/** - * The class used to store comments associated to a specific entry. - * - * @author Erik C. Thauvin - * @version $Revision$, $Date$ - * - * @created Jan 31, 2004 - * @since 1.0 - */ -public class EntryComment implements Serializable -{ - /** - * The serial version UID. - */ - static final long serialVersionUID = 6957415292233553224L; - - /** - * The creation date. - */ - private final Date _date = Calendar.getInstance().getTime(); - private String _comment = ""; - private String _nick = ""; - - /** - * Creates a new comment. - * - * @param comment The new comment. - * @param nick The nickname of the comment's author. - */ - public EntryComment(String comment, String nick) - { - _comment = comment; - _nick = nick; - } - - /** - * Creates a new comment. - */ - protected EntryComment() - { - ; // Required for serialization. - } - - /** - * Sets the comment. - * - * @param comment The actual comment. - */ - public final void setComment(String comment) - { - _comment = comment; - } - - /** - * Returns the comment. - * - * @return The comment. - */ - public final String getComment() - { - return _comment; - } - - /** - * Returns the comment's creation date. - * - * @return The date. - */ - public final Date getDate() - { - return _date; - } - - /** - * Sets the nickname of the author of the comment. - * - * @param nick The new nickname. - */ - public final void setNick(String nick) - { - _nick = nick; - } - - /** - * Returns the nickname of the author of the comment. - * - * @return The nickname. - */ - public final String getNick() - { - return _nick; - } -} diff --git a/src/net/thauvin/erik/mobibot/EntryLink.java b/src/net/thauvin/erik/mobibot/EntryLink.java deleted file mode 100644 index cdcba20..0000000 --- a/src/net/thauvin/erik/mobibot/EntryLink.java +++ /dev/null @@ -1,459 +0,0 @@ -/* - * @(#)EntryLink.java - * - * Copyright (c) 2004, Erik C. Thauvin (erik@thauvin.net) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ - * - */ -package net.thauvin.erik.mobibot; - -import com.sun.syndication.feed.synd.SyndCategoryImpl; - -import java.io.Serializable; - -import java.util.*; - - -/** - * The class used to store link entries. - * - * @author Erik C. Thauvin - * @version $Revision$, $Date$ - * @created Jan 31, 2004 - * @since 1.0 - */ -public class EntryLink implements Serializable -{ - /** - * The serial version UID. - */ - static final long serialVersionUID = 3676245542270899086L; - - // The channel - private String _channel = ""; - - // The link's comments - private final List _comments = new ArrayList(0); - - // The creation date - private Date _date = Calendar.getInstance().getTime(); - - // The link's URL - private String _link = ""; - - // The author's login - private String _login = ""; - - // The author's nickname - private String _nick = ""; - - // The tags/categories - private final List _tags = new ArrayList(0); - - // The link's title - private String _title = ""; - - /** - * Creates a new entry. - * - * @param link The new entry's link. - * @param title The new entry's title. - * @param nick The nickname of the author of the link. - * @param login The login of the author of the link. - * @param channel The channel. - * @param tags The entry's tags/categories. - */ - public EntryLink(String link, String title, String nick, String login, String channel, String tags) - { - _link = link; - _title = title; - _nick = nick; - _login = login; - _channel = channel; - - setTags(tags); - } - - - /** - * Creates a new entry. - * - * @param link The new entry's link. - * @param title The new entry's title. - * @param nick The nickname of the author of the link. - * @param channel The channel. - * @param date The entry date. - * @param tags The entry's tags/categories. - */ - public EntryLink(String link, String title, String nick, String channel, Date date, List tags) - { - _link = link; - _title = title; - _nick = nick; - _channel = channel; - _date = date; - - - setTags(tags); - } - - /** - * Creates a new EntryLink object. - */ - protected EntryLink() - { - ; // Required for serialization. - } - - /** - * Adds a new comment. - * - * @param comment The actual comment. - * @param nick The nickname of the author of the comment. - * - * @return The total number of comments for this entry. - */ - public final synchronized int addComment(String comment, String nick) - { - _comments.add(new EntryComment(comment, nick)); - - return (_comments.size() - 1); - } - - /** - * Deletes a specific comment. - * - * @param index The index of the comment to delete. - */ - public final synchronized void deleteComment(int index) - { - if (index < _comments.size()) - { - _comments.remove(index); - } - } - - /** - * Returns the channel the link was posted on. - * - * @return The channel - */ - public final synchronized String getChannel() - { - return _channel; - } - - /** - * Returns a comment. - * - * @param index The comment's index. - * - * @return The specific comment. - */ - public final synchronized EntryComment getComment(int index) - { - return ((EntryComment) _comments.get(index)); - } - - /** - * Returns all the comments. - * - * @return The comments. - */ - public final synchronized EntryComment[] getComments() - { - return ((EntryComment[]) _comments.toArray(new EntryComment[0])); - } - - /** - * Returns the total number of comments. - * - * @return The count of comments. - */ - public final synchronized int getCommentsCount() - { - return _comments.size(); - } - - /** - * Returns the comment's creation date. - * - * @return The date. - */ - public final synchronized Date getDate() - { - return _date; - } - - /** - * Returns the tags formatted for del.icio.us. - * - * @return The tags as a space-deliminted string. - */ - public final synchronized String getDeliciousTags() - { - final StringBuffer tags = new StringBuffer(0); - - for (int i = 0; i < _tags.size(); i++) - { - if (i != 0) - { - tags.append(' '); - } - - tags.append(((SyndCategoryImpl) _tags.get(i)).getName()); - } - - return tags.toString(); - } - - /** - * Returns the comment's link. - * - * @return The link. - */ - public final synchronized String getLink() - { - return _link; - } - - /** - * Return's the comment's author login. - * - * @return The login; - */ - public final synchronized String getLogin() - { - return _login; - } - - /** - * Returns the comment's author nickname. - * - * @return The nickname. - */ - public final synchronized String getNick() - { - return _nick; - } - - /** - * Returns the tags. - * - * @return The tags. - */ - public final synchronized List getTags() - { - return _tags; - } - - /** - * Returns the comment's title. - * - * @return The title. - */ - public final synchronized String getTitle() - { - return _title; - } - - /** - * Returns true if the entry has comments. - * - * @return true if there are comments, false otherwise. - */ - public final synchronized boolean hasComments() - { - return (!_comments.isEmpty()); - } - - /** - * Returns true if the entry has tags. - * - * @return true if there are tags, false otherwise. - */ - public final synchronized boolean hasTags() - { - return (!_tags.isEmpty()); - } - - /** - * Sets the channel. - * - * @param channel The channel. - */ - public final synchronized void setChannel(String channel) - { - _channel = channel; - } - - /** - * /** Sets a comment. - * - * @param index The comment's index. - * @param comment The actual comment. - * @param nick The nickname of the author of the comment. - */ - public final synchronized void setComment(int index, String comment, String nick) - { - if (index < _comments.size()) - { - _comments.set(index, new EntryComment(comment, nick)); - } - } - - /** - * Sets the comment's link. - * - * @param link The new link. - */ - public final synchronized void setLink(String link) - { - _link = link; - } - - /** - * Set the comment's author login. - * - * @param login The new login. - */ - public final synchronized void setLogin(String login) - { - _login = login; - } - - /** - * Sets the comment's author nickname. - * - * @param nick The new nickname. - */ - public final synchronized void setNick(String nick) - { - _nick = nick; - } - - /** - * Sets the tags. - * - * @param tags The tags. - */ - public final synchronized void setTags(List tags) - { - _tags.addAll(tags); - } - - /** - * Sets the tags. - * - * @param tags The space-delimited tags. - */ - public final synchronized void setTags(String tags) - { - if (tags != null) - { - final String[] parts = tags.replaceAll(", ", " ").replaceAll(",", " ").split(" "); - - SyndCategoryImpl tag; - String part; - char mod; - - for (int i = 0; i < parts.length; i++) - { - part = parts[i].trim(); - - if (part.length() >= 2) - { - tag = new SyndCategoryImpl(); - tag.setName(part.substring(1).toLowerCase()); - - mod = part.charAt(0); - - if (mod == '-') - { - // Don't remove the channel tag, if any. - if (!tag.getName().equals(_channel.substring(1))) - { - _tags.remove(tag); - } - } - else if (mod == '+') - { - if (!_tags.contains(tag)) - { - _tags.add(tag); - } - } - else - { - tag.setName(part.trim().toLowerCase()); - - if (!_tags.contains(tag)) - { - _tags.add(tag); - } - } - } - } - } - } - - /** - * Sets the comment's title. - * - * @param title The new title. - */ - public final synchronized void setTitle(String title) - { - _title = title; - } - - /** - * Returns a string representation of the object. - * - * @return A string representation of the object. - */ - public final String toString() - { - final StringBuffer sb = new StringBuffer(super.toString()); - sb.append("[ channel -> '").append(_channel).append('\''); - sb.append(", comments -> ").append(_comments); - sb.append(", date -> ").append(_date); - sb.append(", link -> '").append(_link).append('\''); - sb.append(", login -> '").append(_login).append('\''); - sb.append(", nick -> '").append(_nick).append('\''); - sb.append(", tags -> ").append(_tags); - sb.append(", title -> '").append(_title).append('\''); - sb.append(" ]"); - - return sb.toString(); - } -} diff --git a/src/net/thauvin/erik/mobibot/FeedReader.java b/src/net/thauvin/erik/mobibot/FeedReader.java deleted file mode 100644 index 85cad19..0000000 --- a/src/net/thauvin/erik/mobibot/FeedReader.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * @(#)FeedReader.java - * - * Copyright (c) 2004, Erik C. Thauvin (erik@thauvin.net) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ - * - */ -package net.thauvin.erik.mobibot; - -import com.sun.syndication.feed.synd.SyndEntry; -import com.sun.syndication.feed.synd.SyndEntryImpl; -import com.sun.syndication.feed.synd.SyndFeed; -import com.sun.syndication.fetcher.FeedFetcher; -import com.sun.syndication.fetcher.impl.HttpURLFeedFetcher; - -import java.net.MalformedURLException; -import java.net.URL; - -import java.util.List; - - -/** - * Reads a RSS feed. - * - * @author Erik C. Thauvin - * @version $Revision$, $Date$ - * - * @created Feb 1, 2004 - * @since 1.0 - */ -public class FeedReader implements Runnable -{ - /** - * The maximum number of feed items to display. - */ - private static final int MAX_ITEMS = 5; - - /** - * The tab indent (4 spaces). - */ - private static final String TAB_INDENT = " "; - - /** - * The bot. - */ - private final Mobibot _bot; - - /** - * The nick of the person who sent the message. - */ - private final String _sender; - - /** - * The URL to fetch. - */ - private final String _url; - - /** - * Creates a new FeedReader object. - * - * @param bot The bot. - * @param sender The nick of the person who sent the message. - * @param url The URL to fetch. - */ - public FeedReader(Mobibot bot, String sender, String url) - { - _bot = bot; - _sender = sender; - _url = url; - } - - /** - * Fetches the Feed's items. - */ - public final void run() - { - final FeedFetcher fetcher = new HttpURLFeedFetcher(_bot.getFeedInfoCache()); - - try - { - final SyndFeed feed = fetcher.retrieveFeed(new URL(_url)); - SyndEntry item; - final List items = feed.getEntries(); - - for (int i = 0; (i < items.size()) && (i < MAX_ITEMS); i++) - { - item = (SyndEntryImpl) items.get(i); - _bot.send(_sender, item.getTitle()); - _bot.send(_sender, TAB_INDENT + item.getLink()); - } - } - catch (MalformedURLException e) - { - _bot.getLogger().debug("Invalid feed URL.", e); - _bot.send(_sender, "The feed URL is invalid."); - } - catch (Exception e) - { - _bot.getLogger().debug("Unable to fetch the feed.", e); - _bot.send(_sender, "An error has occurred while fetching the feed: " + e.getMessage()); - } - } -} diff --git a/src/net/thauvin/erik/mobibot/GoogleSearch.java b/src/net/thauvin/erik/mobibot/GoogleSearch.java deleted file mode 100644 index 7e70375..0000000 --- a/src/net/thauvin/erik/mobibot/GoogleSearch.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * @(#)GoogleSearch.java - * - * Copyright (c) 2004, Erik C. Thauvin (erik@thauvin.net) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ - * - */ -package net.thauvin.erik.mobibot; - -import com.google.soap.search.GoogleSearchFault; - -import net.thauvin.google.GoogleSearchBean; - -import org.jibble.pircbot.Colors; - - -/** - * Performs a Google search or spell checking query. - * - * @author Erik C. Thauvin - * @version $Revision$, $Date$ - * - * @created Feb 7, 2004 - * @since 1.0 - */ -public class GoogleSearch implements Runnable -{ - /** - * The maximum number of Google results to display. - */ - private static final int MAX_GOOGLE = 5; - - /** - * The Google search bean. - */ - private static final GoogleSearchBean GOOGLE_BEAN = new GoogleSearchBean(); - - /** - * The tab indent (4 spaces). - */ - private static final String TAB_INDENT = " "; - - /** - * The bot. - */ - private final Mobibot _bot; - - /** - * The Google API key. - */ - private final String _key; - - /** - * The search query. - */ - private final String _query; - - /** - * The nick of the person who sent the message. - */ - private final String _sender; - - /** - * Spell Checking query flag. - */ - private final boolean _isSpellQuery; - - /** - * Creates a new GoogleSearch object. - * - * @param bot The bot. - * @param key The Google API key. - * @param sender The nick of the person who sent the message. - * @param query The Google query - * @param isSpellQuery Set to true if the query is a Spell Checking query - */ - public GoogleSearch(Mobibot bot, String key, String sender, String query, boolean isSpellQuery) - { - _bot = bot; - _key = key; - _sender = sender; - _query = query; - _isSpellQuery = isSpellQuery; - } - - /** - * Main processing method. - */ - public final void run() - { - GOOGLE_BEAN.setKey(_key); - - if (_isSpellQuery) - { - try - { - final String r = GOOGLE_BEAN.getSpellingSuggestion(_query); - - if (Mobibot.isValidString(r)) - { - _bot.send(_sender, Mobibot.unescapeXml(r)); - } - else - { - _bot.send(_sender, "You've just won our spelling bee contest."); - } - } - catch (GoogleSearchFault e) - { - _bot.getLogger().warn("Unable to spell: " + _query, e); - _bot.send(_sender, "An error has occurred: " + e.getMessage()); - } - } - else - { - try - { - GOOGLE_BEAN.getGoogleSearch(_query, GoogleSearchBean.DEFAULT_START, MAX_GOOGLE, - GoogleSearchBean.DEFAULT_FILTER, GoogleSearchBean.DEFAULT_RESTRICT, - GoogleSearchBean.DEFAULT_SAFE_SEARCH, GoogleSearchBean.DEFAULT_LR); - - if (GOOGLE_BEAN.isValidResult()) - { - for (int i = 0; i < GOOGLE_BEAN.getResultElementsCount(); i++) - { - _bot.send(_sender, - Mobibot.unescapeXml(GOOGLE_BEAN.getResultElementProperty(i, "title").replaceAll("<([bB]|/[bB])>", - Colors.BOLD))); - _bot.send(_sender, TAB_INDENT + GOOGLE_BEAN.getResultElementProperty(i, "url")); - } - } - } - catch (GoogleSearchFault e) - { - _bot.getLogger().warn("Unable to search in Google for: " + _query, e); - _bot.send(_sender, "An error has occurred: " + e.getMessage()); - } - } - } -} diff --git a/src/net/thauvin/erik/mobibot/Jaiku.java b/src/net/thauvin/erik/mobibot/Jaiku.java deleted file mode 100644 index 90048a3..0000000 --- a/src/net/thauvin/erik/mobibot/Jaiku.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * @(#)Jaiku.java - * - * Copyright (C) 2007 Erik C. Thauvin - * All rights reserved. - * - * $Id$ - * - */ -package net.thauvin.erik.mobibot; - -import org.apache.xmlrpc.client.XmlRpcClient; -import org.apache.xmlrpc.client.XmlRpcClientConfigImpl; - -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * Inserts presence information into Jaiku. - * - * @author Erik C. Thauvin - * @version $Revision$, $Date$ - * @created Oct 11, 2007 - * @since 1.0 - */ -public class Jaiku implements Runnable -{ - /** - * The bot. - */ - private final Mobibot _bot; - - /** - * The Jaiku API key. - */ - private final String _key; - - /** - * The Jaiku user. - */ - private final String _user; - - /** - * The Jaiku message. - */ - private final String _message; - - /** - * The nick of the person who sent the message. - */ - private final String _sender; - - /** - * Creates a new Jaiku object. - * - * @param bot The bot. - * @param sender The nick of the person who sent the message. - * @param user The Jaiku user. - * @param key The Jaiku API key. - * @param message The Jaiku message. - */ - public Jaiku(Mobibot bot, String sender, String user, String key, String message) - { - _bot = bot; - _user = user; - _key = key; - _message = message; - _sender = sender; - } - - public final void run() - { - try - { - final XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl(); - config.setServerURL(new URL("http://api.jaiku.com/xmlrpc")); - - final XmlRpcClient client = new XmlRpcClient(); - client.setConfig(config); - - final Map map = new HashMap(0); - map.put("user", _user); - map.put("personal_key", _key); - map.put("message", _bot.getChannel() + ' ' + _message + " (" + _sender + ')'); - - final List params = new ArrayList(0); - params.add(map); - - client.execute("presence.send", params); - - _bot.send(_sender, "You message was posted to http://jaiku.com/channel/" + _bot.getChannel().substring(1)); - } - catch (Exception e) - { - _bot.getLogger().warn("Unable to post to Jaiku: " + _message, e); - _bot.send(_sender, "An error has occurred: " + e.getMessage()); - } - } -} diff --git a/src/net/thauvin/erik/mobibot/StockQuote.java b/src/net/thauvin/erik/mobibot/StockQuote.java deleted file mode 100644 index fb765e0..0000000 --- a/src/net/thauvin/erik/mobibot/StockQuote.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * @(#)StockQuote.java - * - * Copyright (c) 2004, Erik C. Thauvin (erik@thauvin.net) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ - * - */ -package net.thauvin.erik.mobibot; - -import org.apache.commons.httpclient.HttpClient; -import org.apache.commons.httpclient.methods.GetMethod; - -import java.io.IOException; - - -/** - * Retrieves a stock quote from Yahoo!. - * - * @author Erik C. Thauvin - * @version $Revision$, $Date$ - * @created Feb 7, 2004 - * @since 1.0 - */ -public class StockQuote implements Runnable -{ - /** - * The Yahoo! stock quote URL. - */ - private static final String YAHOO_URL = "http://finance.yahoo.com/d/quotes.csv?&f=snl1d1t1c1oghv&e=.csv&s="; - - /** - * The bot. - */ - private final Mobibot _bot; - - /** - * The nick of the person who sent the message. - */ - private final String _sender; - - /** - * The stock symbol. - */ - private final String _symbol; - - /** - * Creates a new StockQuote object. - * - * @param bot The bot. - * @param sender The nick of the person who sent the message. - * @param symbol The stock symbol. - */ - public StockQuote(Mobibot bot, String sender, String symbol) - { - _bot = bot; - _sender = sender; - _symbol = symbol; - } - - /** - * Returns the specified stock quote. - */ - public final void run() - { - try - { - final HttpClient client = new HttpClient(); - client.getHttpConnectionManager().getParams().setConnectionTimeout(Mobibot.CONNECT_TIMEOUT); - client.getHttpConnectionManager().getParams().setSoTimeout(Mobibot.CONNECT_TIMEOUT); - - final GetMethod getMethod = new GetMethod(YAHOO_URL + _symbol.toUpperCase()); - client.executeMethod(getMethod); - - final String[] quote = getMethod.getResponseBodyAsString().split(","); - - if (quote.length > 0) - { - if ((quote.length > 3) && (!"\"N/A\"".equalsIgnoreCase(quote[3]))) - { - _bot.send(_bot.getChannel(), - "Symbol: " + quote[0].replaceAll("\"", "") + " [" + quote[1].replaceAll("\"", "") + ']'); - - if (quote.length > 5) - { - _bot.send(_bot.getChannel(), "Last Trade: " + quote[2] + " (" + quote[5] + ')'); - } - else - { - _bot.send(_bot.getChannel(), "Last Trade: " + quote[2]); - } - - if (quote.length > 4) - { - _bot.send(_sender, - "Time: " + quote[3].replaceAll("\"", "") + ' ' + quote[4].replaceAll("\"", "")); - } - - if (quote.length > 6) - { - _bot.send(_sender, "Open: " + quote[6]); - } - - if (quote.length > 7) - { - _bot.send(_sender, "Day's Range: " + quote[7] + " - " + quote[8]); - } - - if (quote.length > 9) - { - _bot.send(_sender, "Volume: " + quote[9]); - } - } - else - { - _bot.send(_sender, "Invalid ticker symbol."); - } - } - else - { - _bot.send(_sender, "No data returned."); - } - } - catch (IOException e) - { - _bot.getLogger().debug("Unable to retrieve stock quote for: " + _symbol, e); - _bot.send(_sender, "An error has occurred: " + e.getMessage()); - } - } -} diff --git a/src/net/thauvin/erik/mobibot/SwingWorker.java b/src/net/thauvin/erik/mobibot/SwingWorker.java deleted file mode 100644 index 39bf290..0000000 --- a/src/net/thauvin/erik/mobibot/SwingWorker.java +++ /dev/null @@ -1,131 +0,0 @@ -package net.thauvin.erik.mobibot; - -import javax.swing.SwingUtilities; - -/** - * This is the 3rd version of SwingWorker (also known as - * SwingWorker 3), an abstract class that you subclass to - * perform GUI-related work in a dedicated thread. For - * instructions on and examples of using this class, see: - * - * http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html - * - * Note that the API changed slightly in the 3rd version: - * You must now invoke start() on the SwingWorker after - * creating it. - */ -public abstract class SwingWorker { - private Object value; // see getValue(), setValue() - - /** - * Class to maintain reference to current worker thread - * under separate synchronization control. - */ - private static class ThreadVar { - private Thread thread; - ThreadVar(Thread t) { thread = t; } - synchronized Thread get() { return thread; } - synchronized void clear() { thread = null; } - } - - private ThreadVar threadVar; - - /** - * Get the value produced by the worker thread, or null if it - * hasn't been constructed yet. - */ - protected synchronized Object getValue() { - return value; - } - - /** - * Set the value produced by worker thread - */ - private synchronized void setValue(Object x) { - value = x; - } - - /** - * Compute the value to be returned by the get method. - */ - public abstract Object construct(); - - /** - * Called on the event dispatching thread (not on the worker thread) - * after the construct method has returned. - */ - public void finished() { - } - - /** - * A new method that interrupts the worker thread. Call this method - * to force the worker to stop what it's doing. - */ - public void interrupt() { - Thread t = threadVar.get(); - if (t != null) { - t.interrupt(); - } - threadVar.clear(); - } - - /** - * Return the value created by the construct method. - * Returns null if either the constructing thread or the current - * thread was interrupted before a value was produced. - * - * @return the value created by the construct method - */ - public Object get() { - while (true) { - Thread t = threadVar.get(); - if (t == null) { - return getValue(); - } - try { - t.join(); - } - catch (InterruptedException e) { - Thread.currentThread().interrupt(); // propagate - return null; - } - } - } - - - /** - * Start a thread that will call the construct method - * and then exit. - */ - public SwingWorker() { - final Runnable doFinished = new Runnable() { - public void run() { finished(); } - }; - - Runnable doConstruct = new Runnable() { - public void run() { - try { - setValue(construct()); - } - finally { - threadVar.clear(); - } - - SwingUtilities.invokeLater(doFinished); - } - }; - - Thread t = new Thread(doConstruct); - threadVar = new ThreadVar(t); - } - - /** - * Start the worker thread. - */ - public void start() { - Thread t = threadVar.get(); - if (t != null) { - t.start(); - } - } -} diff --git a/src/net/thauvin/erik/mobibot/Twitter.java b/src/net/thauvin/erik/mobibot/Twitter.java deleted file mode 100644 index 588bd50..0000000 --- a/src/net/thauvin/erik/mobibot/Twitter.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * @(#)Jaiku.java - * - * Copyright (C) 2007 Erik C. Thauvin - * All rights reserved. - * - * $Id$ - * - */ -package net.thauvin.erik.mobibot; - -/** - * Inserts presence information into Twitter. - * - * @author Erik C. Thauvin - * @version $Revision$, $Date$ - * @created Sept 10, 2008 - * @since 1.0 - */ -public class Twitter implements Runnable -{ - /** - * The bot. - */ - private final Mobibot _bot; - - /** - * The Twitter API password. - */ - private final String _pwd; - - /** - * The Twitter user. - */ - private final String _user; - - /** - * The Twitter message. - */ - private final String _message; - - /** - * The Twitter source. - */ - private final String _source; - - /** - * The nick of the person who sent the message. - */ - private final String _sender; - - /** - * Creates a new Twitter object. - * - * @param bot The bot. - * @param sender The nick of the person who sent the message. - * @param user The Twitter user. - * @param password The Twitter password. - * @param source The Twitter client id/source. - * @param message The Twitter message. - */ - public Twitter(Mobibot bot, String sender, String user, String password, String source, String message) - { - _bot = bot; - _user = user; - _pwd = password; - _source = source; - _message = message; - _sender = sender; - } - - public final void run() - { - try - { - twitter4j.Twitter twitter = new twitter4j.Twitter(_user, _pwd); - - if (Mobibot.isValidString(_source)) - { - twitter.setSource(_source); - } - - twitter.update(_message + " (" + _sender + ')'); - - _bot.send(_sender, "You message was posted to http://twitter.com/" + _user); - } - catch (Exception e) - { - _bot.getLogger().warn("Unable to post to Twitter: " + _message, e); - _bot.send(_sender, "An error has occurred: " + e.getMessage()); - } - } -} \ No newline at end of file diff --git a/src/net/thauvin/erik/mobibot/Weather.java b/src/net/thauvin/erik/mobibot/Weather.java deleted file mode 100644 index 78f25d8..0000000 --- a/src/net/thauvin/erik/mobibot/Weather.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * @(#)Weather.java - * - * Copyright (c) 2004, Erik C. Thauvin (erik@thauvin.net) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * Neither the name of the author nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $Id$ - * - */ -package net.thauvin.erik.mobibot; - -import net.sf.jweather.metar.Metar; -import net.sf.jweather.metar.SkyCondition; -import net.sf.jweather.metar.WeatherCondition; - -import java.text.DecimalFormat; -import java.util.Date; -import java.util.Iterator; - -/** - * Fetches the weather data from a specific station ID. - * - * @author Erik C. Thauvin - * @version $Revision$, $Date$ - * @created Feb 7, 2004 - * @since 1.0 - */ -public class Weather implements Runnable -{ - /** - * The URL where the stations are listed. - */ - public static final String STATIONS_URL = "http://www.rap.ucar.edu/weather/surface/stations.txt"; - - /** - * The decimal number format. - */ - private static final DecimalFormat NUMBER_FORMAT = new DecimalFormat("0.##"); - - /** - * The bot. - */ - private final Mobibot _bot; - - /** - * The nick of the person who sent the message. - */ - private final String _sender; - - /** - * The station ID. - */ - private final String _station; - - /** - * The private message flag. - */ - private final boolean _isPrivate; - - /** - * Creates a new Weather object. - * - * @param bot The bot. - * @param sender The nick of the person who sent the message. - * @param station The station ID. - * @param isPrivate Set to true is the response should be send as a private message. - */ - public Weather(Mobibot bot, String sender, String station, boolean isPrivate) - { - _bot = bot; - _sender = sender; - _station = station.toUpperCase(); - _isPrivate = isPrivate; - } - - /** - * Main processing method. - */ - public final void run() - { - if (_station.length() == 4) - { - final Metar metar = net.sf.jweather.Weather.getMetar(_station); - - if (metar != null) - { - Float result; - - _bot.send(_sender, "Station ID: " + metar.getStationID(), _isPrivate); - - _bot.send(_sender, - "At: " + metar.getDateString() + " UTC (" - + (((new Date()).getTime() - metar.getDate().getTime()) / 1000L / 60L) + " minutes ago)", - _isPrivate); - - result = metar.getWindSpeedInMPH(); - - if (result != null) - { - _bot.send(_sender, - "Wind Speed: " + result + " mph, " + metar.getWindSpeedInKnots() + " knots", - _isPrivate); - } - - result = metar.getVisibility(); - - if (result != null) - { - if (!metar.getVisibilityLessThan()) - { - _bot.send(_sender, "Visibility: " + NUMBER_FORMAT.format(result) + " mile(s)", _isPrivate); - } - else - { - _bot.send(_sender, "Visibility: < " + NUMBER_FORMAT.format(result) + " mile(s)", _isPrivate); - } - } - - result = metar.getPressure(); - - if (result != null) - { - _bot.send(_sender, "Pressure: " + result + " in Hg", _isPrivate); - } - - result = metar.getTemperatureInCelsius(); - - if (result != null) - { - _bot.send(_sender, - "Temperature: " + result + " C, " + metar.getTemperatureInFahrenheit() + " F", - _isPrivate); - } - - if (metar.getWeatherConditions() != null) - { - final Iterator it = metar.getWeatherConditions().iterator(); - - while (it.hasNext()) - { - final WeatherCondition weatherCondition = (WeatherCondition) it.next(); - _bot.send(_sender, weatherCondition.getNaturalLanguageString(), _isPrivate); - } - } - - if (metar.getSkyConditions() != null) - { - final Iterator it = metar.getSkyConditions().iterator(); - - while (it.hasNext()) - { - final SkyCondition skyCondition = (SkyCondition) it.next(); - _bot.send(_sender, skyCondition.getNaturalLanguageString(), _isPrivate); - } - } - - return; - } - else - { - _bot.send(_sender, "Invalid Station ID. Please try again.", _isPrivate); - - return; - } - } - - _bot.helpResponse(_sender, Mobibot.WEATHER_CMD); - } -} diff --git a/website/index.html b/website/index.html deleted file mode 100644 index 064d2bc..0000000 --- a/website/index.html +++ /dev/null @@ -1,59 +0,0 @@ - - - -mobibot - - - - -
-

mobibot

-

The #mobitopia bot

-

The latest version of mobibot is always available via CVS.

-

About mobibot

-

mobibot is the #mobitopia IRC channel bot. It is built on Paul Mutton's PircBot Java-based Framework.

-

mobibot is making extensive use of various open source libraries, including:

- -

mobibot was written by Erik C. Thauvin as a replacement for the channel's original ChumpBot.

-

Features

-

mobibot's main functionality is to capture URLs posted on the channel. The URLs are automatically gathered into a publishable RSS feed.

-

Other features include:

-
    -
  • Performing calculations
  • -
  • Converting between currencies
  • -
  • Rolling dice
  • -
  • Performing Google searches
  • -
  • Displaying the latest entries on Mobitopia
  • -
  • Performing DNS lookups
  • -
  • Recapping public channel messages
  • -
  • Performing Google spelling queries
  • -
  • Retrieving stock quotes
  • -
  • Displaying the time in various time zones
  • -
  • Listing the users on the channel
  • -
  • Displaying weather information
  • -
  • Posting to Jaiku's #mobitopia channel
  • -
  • Posting to Twitter
  • -
-

Some of the internal features include RSS feed backlogs, rolling logs, debugging toggle and much more.

-

If you have any feature suggestions, please post them to the mobibot wiki.

-

Using mobibot

-

To use mobibot, simply join #mobitopia on irc.freenode.net and type:

-

mobibot: help

-

mobibot will reply with a listing of the commands currently supported.

-

Licenses

-

There are various open source licenses attached to mobibot. Please refer to the licenses directory in the CVS tree for more details.

-
- - diff --git a/website/simple.css b/website/simple.css deleted file mode 100644 index 4092d3f..0000000 --- a/website/simple.css +++ /dev/null @@ -1,52 +0,0 @@ -body { - background: #ffffff; - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 13px; - color: #000000; - margin: 0px; -} - -h1 { - color: #333399; -} - -h2 { - border-bottom: 2px solid #9999cc; -} - -h3 { - padding-top: 25px; - border-bottom: 1px solid #9999cc; -} - -code { - font-family: Courier New, Courier, mono, monospace; - font-size: 12px; - color: #000066; - background-color: #ffeedd; -} - -a:hover { - color: #ff0000; - background: #eeeeff; -} - -#content { - float: none; - position: relative; - margin: 0px 10px 10px 10px; - padding: 0px 10px 10px 10px; -} - -#content p { - padding-left: 10px; -} - -#content p.note { - padding: 5px; - border: 1px solid #9999cc; - border-right: 2px solid #666699; - border-bottom: 2px solid #666699; - background: #eeeeff; - margin: 20px 50px; -} \ No newline at end of file