Removed Jaiku (defunct) support.
Replaced Google SOAP API (defunct) with JSON API. Added support for posting to identi.ca. Fixed various StockQuote fetching problems.
This commit is contained in:
parent
dc3b4bb675
commit
a70a0629c3
26 changed files with 586 additions and 778 deletions
|
@ -1,6 +1,6 @@
|
|||
# Project
|
||||
proj.name=mobibot
|
||||
proj.version=0.4
|
||||
proj.version=0.5
|
||||
proj.package=net.thauvin.erik.mobibot
|
||||
proj.run=${proj.package}.Mobibot
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#ANT Task: ch.oscg.jreleaseinfo.BuildNumberHandler
|
||||
#Tue Sep 14 16:51:11 PDT 2010
|
||||
build.num.last=8
|
||||
#Wed Sep 15 03:24:37 PDT 2010
|
||||
build.num.last=0
|
||||
|
|
BIN
lib/google.jar
BIN
lib/google.jar
Binary file not shown.
Binary file not shown.
BIN
lib/ostermillerutils_1_07_00.jar
Normal file
BIN
lib/ostermillerutils_1_07_00.jar
Normal file
Binary file not shown.
BIN
lib/rome-0.4.jar
BIN
lib/rome-0.4.jar
Binary file not shown.
BIN
lib/rome-1.0.jar
Normal file
BIN
lib/rome-1.0.jar
Normal file
Binary file not shown.
Binary file not shown.
BIN
lib/rome-fetcher-1.0.jar
Normal file
BIN
lib/rome-fetcher-1.0.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -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.
|
|
@ -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.
|
13
licenses/OstermillerUtil License.txt
Normal file
13
licenses/OstermillerUtil License.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
License (http://ostermiller.org/utils/)
|
||||
|
||||
OstermillerUtil Java Utilities Copyright (c) 2001-2007 by Stephen Ostermiller
|
||||
and other contributors
|
||||
|
||||
The OstermillerUtils library 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.
|
76
mobibot.iml
76
mobibot.iml
|
@ -8,24 +8,6 @@
|
|||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/google.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/googleapi.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
|
@ -53,15 +35,6 @@
|
|||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/jakarta-oro-2.0.8.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
|
@ -74,7 +47,7 @@
|
|||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/rome-fetcher-0.4.jar!/" />
|
||||
<root url="jar://$MODULE_DIR$/lib/rome-fetcher-1.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
|
@ -101,7 +74,7 @@
|
|||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/rome-0.4.jar!/" />
|
||||
<root url="jar://$MODULE_DIR$/lib/rome-1.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
|
@ -116,33 +89,6 @@
|
|||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/xmlrpc-client-3.1.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/ws-commons-util-1.0.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/xmlrpc-common-3.1.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
|
@ -197,6 +143,24 @@
|
|||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/jakarta-oro-2.0.8.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/ostermillerutils_1_07_00.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
||||
|
||||
|
|
432
mobibot.iws
432
mobibot.iws
|
@ -34,10 +34,35 @@
|
|||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" readonly="true" id="944923a8-a8d5-4232-a77e-02473b958f59" name="Default" comment="">
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/website/index.html" afterPath="$PROJECT_DIR$/website/index.html" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/mobibot.iws" afterPath="$PROJECT_DIR$/mobibot.iws" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/mobibot.iml" afterPath="$PROJECT_DIR$/mobibot.iml" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/rome-1.0.jar" />
|
||||
<change type="DELETED" beforePath="K:\java\mobibot\lib\ws-commons-util-1.0.2.jar" afterPath="" />
|
||||
<change type="DELETED" beforePath="K:\java\mobibot\licenses\GoogleTagLib License.txt" afterPath="" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/StockQuote.java" afterPath="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/StockQuote.java" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Twitter.java" afterPath="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Twitter.java" />
|
||||
<change type="DELETED" beforePath="K:\java\mobibot\lib\rome-fetcher-0.4.jar" afterPath="" />
|
||||
<change type="DELETED" beforePath="K:\java\mobibot\lib\googleapi.jar" afterPath="" />
|
||||
<change type="DELETED" beforePath="K:\java\mobibot\lib\google.jar" afterPath="" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/buildnum.properties" afterPath="$PROJECT_DIR$/buildnum.properties" />
|
||||
<change type="DELETED" beforePath="K:\java\mobibot\src\net\thauvin\erik\mobibot\Jaiku.java" afterPath="" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/rome-fetcher-1.0.jar" />
|
||||
<change type="DELETED" beforePath="K:\java\mobibot\lib\rome-0.4.jar" afterPath="" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/ReleaseInfo.java" afterPath="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/ReleaseInfo.java" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/build.properties" afterPath="$PROJECT_DIR$/build.properties" />
|
||||
<change type="DELETED" beforePath="K:\java\mobibot\lib\xmlrpc-common-3.1.3.jar" afterPath="" />
|
||||
<change type="DELETED" beforePath="K:\java\mobibot\lib\xmlrpc-client-3.1.3.jar" afterPath="" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/ostermillerutils_1_07_00.jar" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Mobibot.java" afterPath="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Mobibot.java" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Identica.java" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/licenses/OstermillerUtil License.txt" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/GoogleSearch.java" afterPath="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/GoogleSearch.java" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/properties/mobibot.properties" afterPath="$PROJECT_DIR$/properties/mobibot.properties" />
|
||||
<change type="DELETED" beforePath="K:\java\mobibot\licenses\Google License.txt" afterPath="" />
|
||||
</list>
|
||||
<ignored path="$USER_HOME_GRAILS$/" />
|
||||
<ignored path="$USER_HOME_GRIFFON$/" />
|
||||
<ignored path="$USER_HOME_GRAILS$/" />
|
||||
<option name="TRACKING_ENABLED" value="true" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -134,92 +159,33 @@
|
|||
<component name="FileColors" enabled="true" enabledForTabs="true" />
|
||||
<component name="FileEditorManager">
|
||||
<leaf>
|
||||
<file leaf-file-name="EntryLink.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/EntryLink.java">
|
||||
<file leaf-file-name="buildnum.properties" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/buildnum.properties">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="53" column="13" selection-start="2001" selection-end="2001" vertical-scroll-proportion="0.0">
|
||||
<state line="3" column="0" selection-start="98" selection-end="98" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="Mobibot.java" pinned="false" current="true" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Mobibot.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="3012" column="114" selection-start="71113" selection-end="71113" vertical-scroll-proportion="2.0948906">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="SwingWorker.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/SwingWorker.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="16" column="22" selection-start="536" selection-end="536" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="ReleaseInfo.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/ReleaseInfo.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="40" column="42" selection-start="1170" selection-end="1170" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="Twitter.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Twitter.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="23" column="13" selection-start="517" selection-end="517" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="TwitterOAuth.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/TwitterOAuth.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="17" column="31" selection-start="558" selection-end="558" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="CurrencyConverter.java" pinned="false" current="false" current-in-tab="false">
|
||||
<file leaf-file-name="CurrencyConverter.java" pinned="false" current="true" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/CurrencyConverter.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="63" column="13" selection-start="2150" selection-end="2150" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
<state line="63" column="13" selection-start="2150" selection-end="2150" vertical-scroll-proportion="-0.9725191">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="DeliciousPoster.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/DeliciousPoster.java">
|
||||
<file leaf-file-name="StockQuote.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/StockQuote.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="50" column="13" selection-start="1995" selection-end="1995" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="EntryComment.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/EntryComment.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="53" column="13" selection-start="2016" selection-end="2016" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="Weather.java" pinned="false" current="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Weather.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
<state line="133" column="116" selection-start="4096" selection-end="4096" vertical-scroll-proportion="0.0">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -246,13 +212,22 @@
|
|||
<component name="IdeDocumentHistory">
|
||||
<option name="changedFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/EntryLink.java" />
|
||||
<option value="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/TwitterTest.java" />
|
||||
<option value="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Twitter.java" />
|
||||
<option value="$PROJECT_DIR$/buildnum.properties" />
|
||||
<option value="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/CurrencyConverter.java" />
|
||||
<option value="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Mobibot.java" />
|
||||
<option value="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/TwitterOAuth.java" />
|
||||
<option value="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/GoogleTest.java" />
|
||||
<option value="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/GoogleQuery.java" />
|
||||
<option value="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/GoogleSearch.java" />
|
||||
<option value="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Twitter.java" />
|
||||
<option value="$PROJECT_DIR$/properties/mobibot.properties" />
|
||||
<option value="$PROJECT_DIR$/build.properties" />
|
||||
<option value="$PROJECT_DIR$/website/index.html" />
|
||||
<option value="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Identica.java" />
|
||||
<option value="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Mobibot.java" />
|
||||
<option value="$PROJECT_DIR$/mobibot.properties" />
|
||||
<option value="$PROJECT_DIR$/licenses/OstermillerUtil License.txt" />
|
||||
<option value="$PROJECT_DIR$/src/net/thauvin/erik/mobibot/StockQuote.java" />
|
||||
<option value="$PROJECT_DIR$/buildnum.properties" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
|
@ -379,35 +354,8 @@
|
|||
<sortByType />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="PackagesPane">
|
||||
<subPane>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="mobibot" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="mobibot" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="mobibot" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="mobibot" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="net.thauvin.erik.mobibot" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="Favorites" />
|
||||
<pane id="Scope" />
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
<PATH>
|
||||
|
@ -440,9 +388,50 @@
|
|||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="mobibot" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="mobibot" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="licenses" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="PackagesPane">
|
||||
<subPane>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="mobibot" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="mobibot" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="mobibot" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="mobibot" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="net.thauvin.erik.mobibot" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="Scope" />
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
|
@ -463,14 +452,14 @@
|
|||
<property name="vcs_file_view_treeOrder1" value="1" />
|
||||
<property name="vcs_file_view_treeOrder4" value="4" />
|
||||
<property name="vcs_file_view_flatWidth5" value="81" />
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="cvs_file_history_flatWidth6" value="135" />
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="cvs_file_history_flatWidth4" value="135" />
|
||||
<property name="cvs_file_history_flatWidth5" value="136" />
|
||||
<property name="cvs_file_history_flatWidth2" value="135" />
|
||||
<property name="vcs_file_view_flatOrder0" value="0" />
|
||||
<property name="cvs_file_history_flatWidth3" value="136" />
|
||||
<property name="cvs_file_history_flatWidth2" value="135" />
|
||||
<property name="cvs_file_history_treeOrder0" value="0" />
|
||||
<property name="cvs_file_history_flatWidth3" value="136" />
|
||||
<property name="vcs_file_view_flatWidth0" value="81" />
|
||||
<property name="vcs_file_view_flatOrder2" value="2" />
|
||||
<property name="cvs_file_history_flatWidth0" value="135" />
|
||||
|
@ -491,7 +480,7 @@
|
|||
<property name="MemberChooser.copyJavadoc" value="false" />
|
||||
<property name="project.structure.last.edited" value="Modules" />
|
||||
<property name="vcs_file_view_treeWidth4" value="100" />
|
||||
<property name="project.structure.proportion" value="0.0" />
|
||||
<property name="project.structure.proportion" value="0.15" />
|
||||
<property name="vcs_file_view_treeWidth1" value="101" />
|
||||
<property name="vcs_file_view_treeWidth0" value="100" />
|
||||
<property name="vcs_file_view_treeWidth3" value="101" />
|
||||
|
@ -502,8 +491,8 @@
|
|||
<property name="cvs_file_history_treeWidth1" value="135" />
|
||||
<property name="cvs_file_history_treeWidth2" value="135" />
|
||||
<property name="cvs_file_history_treeWidth3" value="136" />
|
||||
<property name="MemberChooser.showClasses" value="true" />
|
||||
<property name="cvs_file_history_treeWidth4" value="135" />
|
||||
<property name="MemberChooser.showClasses" value="true" />
|
||||
<property name="cvs_file_history_treeWidth5" value="136" />
|
||||
<property name="cvs_file_history_treeWidth6" value="135" />
|
||||
<property name="cvs_file_history_flatOrder4" value="4" />
|
||||
|
@ -513,8 +502,8 @@
|
|||
<property name="cvs_file_history_flatOrder0" value="0" />
|
||||
<property name="cvs_file_history_flatOrder1" value="1" />
|
||||
<property name="cvs_file_history_flatOrder6" value="6" />
|
||||
<property name="dynamic.classpath" value="false" />
|
||||
<property name="options.searchVisible" value="true" />
|
||||
<property name="dynamic.classpath" value="false" />
|
||||
</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="CopyClassDialog.RECENTS_KEY">
|
||||
|
@ -532,7 +521,7 @@
|
|||
<option name="referencePos" value="0" />
|
||||
<option name="showLabels" value="true" />
|
||||
</component>
|
||||
<component name="RunManager" selected="Application.TwitterOAuth">
|
||||
<component name="RunManager" selected="Application.Unnamed">
|
||||
<configuration default="true" type="PhpRunConfigurationType" factoryName="PHP">
|
||||
<method>
|
||||
<option name="AntTarget" enabled="false" />
|
||||
|
@ -643,19 +632,13 @@
|
|||
<option name="Maven.BeforeRunTask" enabled="false" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration default="true" type="WebLogic Instance" factoryName="Local">
|
||||
<option name="PORT" value="7001" />
|
||||
<deployment />
|
||||
<server-settings>
|
||||
<option name="PASSWORD" value="weblogic" />
|
||||
</server-settings>
|
||||
<predefined_log_file id="WEBLOGIC_DOMAIN_LOG_FILE" enabled="true" />
|
||||
<predefined_log_file id="WEBLOGIC_SERVER_LOG_FILE" enabled="true" />
|
||||
<configuration default="true" type="PhpUnitRemoteRunConfigurationType" factoryName="PHPUnit on Server">
|
||||
<method>
|
||||
<option name="AntTarget" enabled="false" />
|
||||
<option name="BuildArtifacts" enabled="false" />
|
||||
<option name="Make" enabled="true" />
|
||||
<option name="FtpUpload" enabled="false" />
|
||||
<option name="Maven.BeforeRunTask" enabled="false" />
|
||||
<option name="ValidateXdebugSetup" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration default="true" type="JavascriptDebugSession" factoryName="Local">
|
||||
|
@ -669,13 +652,19 @@
|
|||
<option name="Maven.BeforeRunTask" enabled="false" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration default="true" type="PhpUnitRemoteRunConfigurationType" factoryName="PHPUnit on Server">
|
||||
<configuration default="true" type="WebLogic Instance" factoryName="Local">
|
||||
<option name="PORT" value="7001" />
|
||||
<deployment />
|
||||
<server-settings>
|
||||
<option name="PASSWORD" value="weblogic" />
|
||||
</server-settings>
|
||||
<predefined_log_file id="WEBLOGIC_DOMAIN_LOG_FILE" enabled="true" />
|
||||
<predefined_log_file id="WEBLOGIC_SERVER_LOG_FILE" enabled="true" />
|
||||
<method>
|
||||
<option name="AntTarget" enabled="false" />
|
||||
<option name="BuildArtifacts" enabled="false" />
|
||||
<option name="FtpUpload" enabled="false" />
|
||||
<option name="Make" enabled="true" />
|
||||
<option name="Maven.BeforeRunTask" enabled="false" />
|
||||
<option name="ValidateXdebugSetup" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration default="true" type="JUnit" factoryName="JUnit">
|
||||
|
@ -746,9 +735,28 @@
|
|||
<ConfigurationWrapper RunnerId="Run" />
|
||||
<method />
|
||||
</configuration>
|
||||
<list size="2">
|
||||
<configuration default="false" name="Unnamed" type="Application" factoryName="Application">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<extension name="snapshooter" />
|
||||
<option name="MAIN_CLASS_NAME" value="net.thauvin.erik.mobibot.StockQuote" />
|
||||
<option name="VM_PARAMETERS" value="" />
|
||||
<option name="PROGRAM_PARAMETERS" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" value="" />
|
||||
<option name="ENABLE_SWING_INSPECTOR" value="false" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<module name="mobibot" />
|
||||
<envs />
|
||||
<RunnerSettings RunnerId="Run" />
|
||||
<ConfigurationWrapper RunnerId="Run" />
|
||||
<method />
|
||||
</configuration>
|
||||
<list size="3">
|
||||
<item index="0" class="java.lang.String" itemvalue="Application.Mobibot" />
|
||||
<item index="1" class="java.lang.String" itemvalue="Application.TwitterOAuth" />
|
||||
<item index="2" class="java.lang.String" itemvalue="Application.Unnamed" />
|
||||
</list>
|
||||
</component>
|
||||
<component name="ScopeViewComponent">
|
||||
|
@ -852,22 +860,25 @@
|
|||
</todo-panel>
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="72" y="11" width="1415" height="1175" extended-state="0" />
|
||||
<editor active="false" />
|
||||
<frame x="107" y="0" width="1415" height="1175" extended-state="0" />
|
||||
<editor active="true" />
|
||||
<layout>
|
||||
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32934684" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32854405" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Ant Build" active="true" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.09689349" sideWeight="0.66762453" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32854405" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.09689349" sideWeight="0.66762453" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39907408" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33024693" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3256705" sideWeight="0.5" order="19" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32950193" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.27818063" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.18121302" sideWeight="0.66762453" order="0" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.2152367" sideWeight="0.66762453" order="0" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="17" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32854405" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39367816" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" x="22" y="277" width="980" height="213" />
|
||||
<window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="IntelliTail" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="12" side_tool="false" content_ui="tabs" />
|
||||
|
@ -879,20 +890,17 @@
|
|||
<window_info id="BeanShell Box" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3293247" sideWeight="0.5" order="13" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32854405" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Profile" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="16" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="BSFConsole" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32962963" sideWeight="0.5" order="21" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Favorites" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32969153" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Jalopy" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32962963" sideWeight="0.5" order="15" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Messages" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3256705" sideWeight="0.5" order="19" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Code Outline" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="EJB" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="JProfiler" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="14" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32962963" sideWeight="0.5" order="18" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32962963" sideWeight="0.5" order="18" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Duplicates" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32854405" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Regex" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.44135803" sideWeight="0.5" order="20" side_tool="false" content_ui="tabs" x="22" y="277" width="980" height="214" />
|
||||
</layout>
|
||||
</component>
|
||||
|
@ -996,86 +1004,136 @@
|
|||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/mobibot.properties">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
|
||||
<state line="7" column="32" selection-start="211" selection-end="211" vertical-scroll-proportion="0.15671642">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/buildnum.properties">
|
||||
<entry file="jar://$PROJECT_DIR$/lib/jdom-1.1.jar!/JDOMAbout.class">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="3" column="0" selection-start="98" selection-end="98" vertical-scroll-proportion="0.0" />
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/FeedReader.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/GoogleSearch.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Jaiku.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/StockQuote.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/EntryLink.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="53" column="13" selection-start="2001" selection-end="2001" vertical-scroll-proportion="0.0" />
|
||||
<state line="3" column="20" selection-start="134" selection-end="134" vertical-scroll-proportion="0.04643963">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/SwingWorker.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="16" column="22" selection-start="536" selection-end="536" vertical-scroll-proportion="0.0" />
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/ReleaseInfo.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="40" column="42" selection-start="1170" selection-end="1170" vertical-scroll-proportion="0.0" />
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Twitter.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="23" column="13" selection-start="517" selection-end="517" vertical-scroll-proportion="0.0" />
|
||||
<state line="16" column="29" selection-start="536" selection-end="547" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/TwitterOAuth.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="17" column="31" selection-start="558" selection-end="558" vertical-scroll-proportion="0.0" />
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/CurrencyConverter.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="63" column="13" selection-start="2150" selection-end="2150" vertical-scroll-proportion="0.0" />
|
||||
<state line="26" column="13" selection-start="905" selection-end="905" vertical-scroll-proportion="0.0">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/DeliciousPoster.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="50" column="13" selection-start="1995" selection-end="1995" vertical-scroll-proportion="0.0" />
|
||||
<state line="50" column="13" selection-start="1995" selection-end="1995" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/EntryComment.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="53" column="13" selection-start="2016" selection-end="2016" vertical-scroll-proportion="0.0" />
|
||||
<state line="53" column="13" selection-start="2016" selection-end="2016" vertical-scroll-proportion="0.0">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/EntryLink.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="53" column="13" selection-start="2001" selection-end="2001" vertical-scroll-proportion="0.0">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/FeedReader.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="59" column="13" selection-start="2216" selection-end="2216" vertical-scroll-proportion="0.0">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/GoogleSearch.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="124" column="108" selection-start="3727" selection-end="3727" vertical-scroll-proportion="0.0">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/licenses/OstermillerUtil License.txt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="0" column="9" selection-start="9" selection-end="9" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Weather.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
|
||||
<state line="54" column="13" selection-start="2110" selection-end="2110" vertical-scroll-proportion="0.0">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Mobibot.java">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Twitter.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="3012" column="114" selection-start="71113" selection-end="71113" vertical-scroll-proportion="2.0948906">
|
||||
<state line="50" column="13" selection-start="2004" selection-end="2004" vertical-scroll-proportion="0.0">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Identica.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="57" column="13" selection-start="2137" selection-end="2137" vertical-scroll-proportion="0.0">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/StockQuote.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="133" column="116" selection-start="4096" selection-end="4096" vertical-scroll-proportion="0.0">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/buildnum.properties">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="3" column="0" selection-start="98" selection-end="98" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/CurrencyConverter.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="63" column="13" selection-start="2150" selection-end="2150" vertical-scroll-proportion="-0.9725191">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</component>
|
||||
<component name="ideajad">
|
||||
<property name="annotate" value="false" />
|
||||
|
|
|
@ -18,7 +18,5 @@ backlogs=http://www.mobitopia.org/mobibot/logs
|
|||
delicious-user=mobibot
|
||||
delicious-pwd=changepwd
|
||||
|
||||
#jaiku-user=mobibot
|
||||
#jaiku-key=changeme
|
||||
|
||||
#google=changeme
|
||||
#identica-user=mobitopia
|
||||
#identica-pwd=changepwd
|
|
@ -36,34 +36,25 @@
|
|||
*/
|
||||
package net.thauvin.erik.mobibot;
|
||||
|
||||
import com.google.soap.search.GoogleSearchFault;
|
||||
|
||||
import net.thauvin.google.GoogleSearchBean;
|
||||
|
||||
import org.jibble.pircbot.Colors;
|
||||
import twitter4j.internal.org.json.JSONArray;
|
||||
import twitter4j.internal.org.json.JSONObject;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.net.URLEncoder;
|
||||
|
||||
/**
|
||||
* 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).
|
||||
*/
|
||||
|
@ -74,11 +65,6 @@ public class GoogleSearch implements Runnable
|
|||
*/
|
||||
private final Mobibot _bot;
|
||||
|
||||
/**
|
||||
* The Google API key.
|
||||
*/
|
||||
private final String _key;
|
||||
|
||||
/**
|
||||
* The search query.
|
||||
*/
|
||||
|
@ -89,27 +75,18 @@ public class GoogleSearch implements Runnable
|
|||
*/
|
||||
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)
|
||||
public GoogleSearch(Mobibot bot, String sender, String query)
|
||||
{
|
||||
_bot = bot;
|
||||
_key = key;
|
||||
_sender = sender;
|
||||
_query = query;
|
||||
_isSpellQuery = isSpellQuery;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -117,53 +94,41 @@ public class GoogleSearch implements Runnable
|
|||
*/
|
||||
public final void run()
|
||||
{
|
||||
GOOGLE_BEAN.setKey(_key);
|
||||
|
||||
if (_isSpellQuery)
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
final String r = GOOGLE_BEAN.getSpellingSuggestion(_query);
|
||||
final String query = URLEncoder.encode(_query, "UTF-8");
|
||||
|
||||
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)
|
||||
final URL url =
|
||||
new URL("http://ajax.googleapis.com/ajax/services/search/web?start=0&rsz=small&v=1.0&q=" + query);
|
||||
final URLConnection conn = url.openConnection();
|
||||
|
||||
final StringBuffer sb = new StringBuffer();
|
||||
final BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
|
||||
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null)
|
||||
{
|
||||
_bot.getLogger().warn("Unable to spell: " + _query, e);
|
||||
_bot.send(_sender, "An error has occurred: " + e.getMessage());
|
||||
sb.append(line);
|
||||
}
|
||||
|
||||
final JSONObject json = new JSONObject(sb.toString());
|
||||
final JSONArray ja = json.getJSONObject("responseData").getJSONArray("results");
|
||||
|
||||
for (int i = 0; i < ja.length(); i++)
|
||||
{
|
||||
final JSONObject j = ja.getJSONObject(i);
|
||||
_bot.send(_sender, Mobibot.unescapeXml(j.getString("titleNoFormatting")));
|
||||
_bot.send(_sender, TAB_INDENT + j.getString("url"));
|
||||
}
|
||||
|
||||
reader.close();
|
||||
|
||||
}
|
||||
else
|
||||
catch (Exception e)
|
||||
{
|
||||
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());
|
||||
}
|
||||
_bot.getLogger().warn("Unable to search in Google for: " + _query, e);
|
||||
_bot.send(_sender, "An error has occurred: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
141
src/net/thauvin/erik/mobibot/Identica.java
Normal file
141
src/net/thauvin/erik/mobibot/Identica.java
Normal file
|
@ -0,0 +1,141 @@
|
|||
/*
|
||||
* @(#)Identica.java
|
||||
*
|
||||
* Copyright (C) 2010 Erik C. Thauvin
|
||||
* 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 twitter4j.internal.http.BASE64Encoder;
|
||||
import twitter4j.internal.org.json.JSONObject;
|
||||
import twitter4j.internal.org.json.XML;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.net.URLEncoder;
|
||||
|
||||
/**
|
||||
* The <code>Identica</code> class.
|
||||
*
|
||||
* @author <a href="mailto:erik@thauvin.net">Erik C. Thauvin</a>
|
||||
* @version $Revision$, $Date$
|
||||
* @created Sep 14, 2010
|
||||
* @since 1.0
|
||||
*/
|
||||
public class Identica implements Runnable
|
||||
{
|
||||
/**
|
||||
* The bot.
|
||||
*/
|
||||
private final Mobibot _bot;
|
||||
|
||||
/**
|
||||
* The identi.ca user.
|
||||
*/
|
||||
private final String _user;
|
||||
|
||||
/**
|
||||
* The identi.ca password.
|
||||
*/
|
||||
private final String _pwd;
|
||||
/**
|
||||
* The identi.ca message.
|
||||
*/
|
||||
private final String _message;
|
||||
|
||||
/**
|
||||
* The nick of the person who sent the message.
|
||||
*/
|
||||
private final String _sender;
|
||||
|
||||
/**
|
||||
* Creates a new identi.ca object.
|
||||
*
|
||||
* @param bot The bot.
|
||||
* @param sender The nick of the person who sent the message.
|
||||
* @param user The identi.ca user.
|
||||
* @param pwd The identi.ca passwword.
|
||||
* @param message The identi.ca message.
|
||||
*/
|
||||
public Identica(Mobibot bot, String sender, String user, String pwd, String message)
|
||||
{
|
||||
_bot = bot;
|
||||
_sender = sender;
|
||||
_user = user;
|
||||
_pwd = pwd;
|
||||
_message = message;
|
||||
}
|
||||
|
||||
public final void run()
|
||||
{
|
||||
try
|
||||
{
|
||||
final String auth = _user + ':' + _pwd;
|
||||
|
||||
final URL url = new URL("http://identi.ca/api/statuses/update.xml");
|
||||
final URLConnection conn = url.openConnection();
|
||||
conn.setRequestProperty("Authorization", "Basic " + BASE64Encoder.encode(auth.getBytes()));
|
||||
conn.setDoOutput(true);
|
||||
|
||||
final OutputStreamWriter writer = new OutputStreamWriter(conn.getOutputStream());
|
||||
|
||||
writer.write("status=" + URLEncoder.encode(_message + " (" + _sender + ')', "UTF-8"));
|
||||
writer.flush();
|
||||
|
||||
final StringBuffer sb = new StringBuffer();
|
||||
final BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
|
||||
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null)
|
||||
{
|
||||
sb.append(line);
|
||||
}
|
||||
|
||||
final JSONObject response = XML.toJSONObject(sb.toString());
|
||||
final int id = response.getJSONObject("status").getInt("id");
|
||||
|
||||
_bot.send(_sender, "You message was posted to http://identi.ca/notice/" + id);
|
||||
|
||||
writer.close();
|
||||
reader.close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_bot.getLogger().warn("Unable to post to identi.ca: " + _message, e);
|
||||
_bot.send(_sender, "An error has occurred: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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 <a href="mailto:erik@thauvin.net">Erik C. Thauvin</a>
|
||||
* @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());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -87,15 +87,14 @@ public class Mobibot extends PircBot
|
|||
* The info strings.
|
||||
*/
|
||||
private static final String[] INFO_STRS =
|
||||
{"Mobibot v" + ReleaseInfo.getVersion() + '.' + ReleaseInfo.getBuildNumber()
|
||||
{ReleaseInfo.getProject() + " v" + ReleaseInfo.getVersion() + '.' + ReleaseInfo.getBuildNumber()
|
||||
+ " by Erik C. Thauvin (erik@thauvin.net)", "http://www.mobitopia.org/mobibot/"};
|
||||
|
||||
/**
|
||||
* The version strings.
|
||||
*/
|
||||
private static final String[] VERSION_STRS =
|
||||
{"Version: " + ReleaseInfo.getVersion() + '.' + ReleaseInfo.getBuildNumber() + " ("
|
||||
+ ISO_SDF.format(ReleaseInfo.getBuildDate()) + ')',
|
||||
{"Version: " + ReleaseInfo.getVersion() + '.' + ReleaseInfo.getBuildNumber() + " (" + ISO_SDF.format(ReleaseInfo.getBuildDate()) + ')',
|
||||
"Platform: " + System.getProperty("os.name") + " (" + System.getProperty("os.version") + ", "
|
||||
+ System.getProperty("os.arch") + ", " + System.getProperty("user.country") + ')',
|
||||
"Runtime: " + System.getProperty("java.runtime.name") + " (build "
|
||||
|
@ -209,9 +208,9 @@ public class Mobibot extends PircBot
|
|||
private static final String GOOGLE_CMD = "google";
|
||||
|
||||
/**
|
||||
* The Jaiku command.
|
||||
* The identi.ca command.
|
||||
*/
|
||||
private static final String JAIKU_CMD = "jaiku";
|
||||
private static final String IDENTICA_CMD = "identica";
|
||||
|
||||
/**
|
||||
* The Twitter command.
|
||||
|
@ -262,11 +261,6 @@ public class Mobibot extends PircBot
|
|||
*/
|
||||
private static final String RECAP_CMD = "recap";
|
||||
|
||||
/**
|
||||
* The spell command.
|
||||
*/
|
||||
private static final String SPELL_CMD = "spell";
|
||||
|
||||
/**
|
||||
* The stock command.
|
||||
*/
|
||||
|
@ -455,20 +449,14 @@ public class Mobibot extends PircBot
|
|||
private String _feedURL = "";
|
||||
|
||||
/**
|
||||
* The Google API key.
|
||||
* The identi.ca user.
|
||||
*/
|
||||
|
||||
private String _googleKey = "";
|
||||
private String _identicaUser = "";
|
||||
|
||||
/**
|
||||
* The Jaiku API key.
|
||||
* The identi.ca password.
|
||||
*/
|
||||
private String _jaikuKey = "";
|
||||
|
||||
/**
|
||||
* The Jaiku user.
|
||||
*/
|
||||
private String _jaikuUser = "";
|
||||
private String _identicaPwd = "";
|
||||
|
||||
/**
|
||||
* The Twitter consumer key.
|
||||
|
@ -743,7 +731,6 @@ public class Mobibot extends PircBot
|
|||
final String weblogURL = p.getProperty("weblog", "");
|
||||
final String feedURL = p.getProperty("feed", "");
|
||||
final String backlogsURL = ensureDir(p.getProperty("backlogs", weblogURL), true);
|
||||
final String googleKey = p.getProperty("google", "");
|
||||
final String ignoredNicks = p.getProperty("ignore", "");
|
||||
final String identNick = p.getProperty("ident-nick", "");
|
||||
final String identMsg = p.getProperty("ident-msg", "");
|
||||
|
@ -754,9 +741,9 @@ public class Mobibot extends PircBot
|
|||
final String dname = p.getProperty("delicious-user");
|
||||
final String dpwd = p.getProperty("delicious-pwd");
|
||||
|
||||
// Get the Jaiku properties
|
||||
final String jname = p.getProperty("jaiku-user");
|
||||
final String jkey = p.getProperty("jaiku-key");
|
||||
// Get the identi.ca properties
|
||||
final String iname = p.getProperty("identica-user");
|
||||
final String ipwd = p.getProperty("identica-pwd");
|
||||
|
||||
// Get the Twitter properties
|
||||
final String tconsumerKey = p.getProperty("twitter-consumerKey");
|
||||
|
@ -787,19 +774,16 @@ public class Mobibot extends PircBot
|
|||
bot.setFeedURL(feedURL);
|
||||
bot.setBacklogsURL(backlogsURL);
|
||||
|
||||
// Set the Google key
|
||||
bot.setGoogleKey(googleKey);
|
||||
|
||||
if (isValidString(dname) && isValidString(dpwd))
|
||||
{
|
||||
// Set the del.icio.us authentication
|
||||
bot.setDeliciousAuth(dname, dpwd);
|
||||
}
|
||||
|
||||
if (isValidString(jname) && isValidString(jkey))
|
||||
if (isValidString(iname) && isValidString(ipwd))
|
||||
{
|
||||
// Set the Jaiku authentication
|
||||
bot.setJaikuAuth(jname, jkey);
|
||||
// Set the identi.ca authentication
|
||||
bot.setIdenticaAuth(iname, ipwd);
|
||||
}
|
||||
|
||||
if (isValidString(tconsumerKey) && isValidString(tconsumerSecret) && isValidString(ttoken) && isValidString(
|
||||
|
@ -980,15 +964,15 @@ public class Mobibot extends PircBot
|
|||
send(sender, "To list the last 5 posts from the channel's weblog:");
|
||||
send(sender, DOUBLE_INDENT + bold(getNick() + ": " + getChannel().substring(1)));
|
||||
}
|
||||
else if (lcTopic.endsWith(GOOGLE_CMD) && isGoogleEnabled())
|
||||
else if (lcTopic.endsWith(GOOGLE_CMD))
|
||||
{
|
||||
send(sender, "To search Google:");
|
||||
send(sender, DOUBLE_INDENT + bold(getNick() + ": " + GOOGLE_CMD + " <query>"));
|
||||
}
|
||||
else if (lcTopic.endsWith(JAIKU_CMD) && isJaikuEnabled())
|
||||
else if (lcTopic.endsWith(IDENTICA_CMD) && isIdenticaEnabled())
|
||||
{
|
||||
send(sender, "To post to Jaiku:");
|
||||
send(sender, DOUBLE_INDENT + bold(getNick() + ": " + JAIKU_CMD + " <message>"));
|
||||
send(sender, "To post to identi.ca:");
|
||||
send(sender, DOUBLE_INDENT + bold(getNick() + ": " + IDENTICA_CMD + " <message>"));
|
||||
}
|
||||
else if (lcTopic.endsWith(TWITTER_CMD) && isTwitterEnabled())
|
||||
{
|
||||
|
@ -1018,11 +1002,6 @@ public class Mobibot extends PircBot
|
|||
send(sender, "For a listing of the supported countries:");
|
||||
send(sender, DOUBLE_INDENT + bold(getNick() + ": " + TIME_CMD));
|
||||
}
|
||||
else if (lcTopic.endsWith(SPELL_CMD) && isGoogleEnabled())
|
||||
{
|
||||
send(sender, "To have Google try to correctly spell a sentence:");
|
||||
send(sender, DOUBLE_INDENT + bold(getNick() + ": " + SPELL_CMD + " <sentence>"));
|
||||
}
|
||||
else if (lcTopic.endsWith(STOCK_CMD))
|
||||
{
|
||||
send(sender, "To retrieve a stock quote:");
|
||||
|
@ -1119,14 +1098,13 @@ public class Mobibot extends PircBot
|
|||
CURRENCY_CMD,
|
||||
DICE_CMD,
|
||||
GOOGLE_CMD,
|
||||
IDENTICA_CMD,
|
||||
IGNORE_CMD,
|
||||
INFO_CMD,
|
||||
JAIKU_CMD,
|
||||
LOOKUP_CMD,
|
||||
getChannel().substring(1),
|
||||
HELP_POSTING_KEYWORD,
|
||||
RECAP_CMD,
|
||||
SPELL_CMD,
|
||||
STOCK_CMD,
|
||||
HELP_TAGS_KEYWORD,
|
||||
TIME_CMD,
|
||||
|
@ -1142,14 +1120,9 @@ public class Mobibot extends PircBot
|
|||
|
||||
for (int i = 0, cmdCount = 1; i < cmds.length; i++, cmdCount++)
|
||||
{
|
||||
if (cmds[i].equals(GOOGLE_CMD) || cmds[i].equals(SPELL_CMD))
|
||||
if (cmds[i].equals(IDENTICA_CMD))
|
||||
{
|
||||
isValidCmd = isGoogleEnabled();
|
||||
}
|
||||
|
||||
if (cmds[i].equals(JAIKU_CMD))
|
||||
{
|
||||
isValidCmd = isJaikuEnabled();
|
||||
isValidCmd = isIdenticaEnabled();
|
||||
}
|
||||
|
||||
if (cmds[i].equals(TWITTER_CMD))
|
||||
|
@ -1290,9 +1263,8 @@ public class Mobibot extends PircBot
|
|||
{
|
||||
if (_logger.isDebugEnabled())
|
||||
{
|
||||
_logger.debug(
|
||||
"Unable to reconnect to " + _ircServer + " after " + MAX_RECONNECT + " retries.",
|
||||
ex);
|
||||
_logger.debug("Unable to reconnect to " + _ircServer + " after " + MAX_RECONNECT + " retries.",
|
||||
ex);
|
||||
}
|
||||
|
||||
e.printStackTrace(System.err);
|
||||
|
@ -1520,18 +1492,14 @@ public class Mobibot extends PircBot
|
|||
{
|
||||
googleResponse(sender, args);
|
||||
}
|
||||
else if (cmd.startsWith(JAIKU_CMD))
|
||||
else if (cmd.startsWith(IDENTICA_CMD))
|
||||
{
|
||||
jaikuResponse(sender, args);
|
||||
identicaResponse(sender, args);
|
||||
}
|
||||
else if (cmd.startsWith(TWITTER_CMD))
|
||||
{
|
||||
twitterResponse(sender, args);
|
||||
}
|
||||
else if (cmd.startsWith(SPELL_CMD))
|
||||
{
|
||||
spellResponse(sender, args);
|
||||
}
|
||||
else if (cmd.startsWith(STOCK_CMD))
|
||||
{
|
||||
stockResponse(sender, args);
|
||||
|
@ -2495,16 +2463,6 @@ public class Mobibot extends PircBot
|
|||
return _today;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns <code>true</code> if Google services are enabled.
|
||||
*
|
||||
* @return <code>true</code> or <code>false</code>
|
||||
*/
|
||||
private boolean isGoogleEnabled()
|
||||
{
|
||||
return isValidString(_googleKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* Responds with the Google search results for the specified query.
|
||||
*
|
||||
|
@ -2513,55 +2471,50 @@ public class Mobibot extends PircBot
|
|||
*/
|
||||
private void googleResponse(String sender, String query)
|
||||
{
|
||||
if (isGoogleEnabled())
|
||||
|
||||
if (query.length() > 0)
|
||||
{
|
||||
if (query.length() > 0)
|
||||
{
|
||||
new Thread(new GoogleSearch(this, _googleKey, sender, query, false)).start();
|
||||
}
|
||||
else
|
||||
{
|
||||
helpResponse(sender, GOOGLE_CMD);
|
||||
}
|
||||
new Thread(new GoogleSearch(this, sender, query)).start();
|
||||
}
|
||||
else
|
||||
{
|
||||
send(sender, "The Google search facility is disabled.");
|
||||
helpResponse(sender, GOOGLE_CMD);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns <code>true</code> if jaiku posting is enabled.
|
||||
* Returns <code>true</code> if identi.ca posting is enabled.
|
||||
*
|
||||
* @return <code>true</code> or <code>false</code>
|
||||
*/
|
||||
private boolean isJaikuEnabled()
|
||||
private boolean isIdenticaEnabled()
|
||||
{
|
||||
return isValidString(_jaikuKey) && isValidString(_jaikuUser);
|
||||
return isValidString(_identicaPwd) && isValidString(_identicaUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* Posts a message to Jaiku.
|
||||
* Posts a message to identi.ca.
|
||||
*
|
||||
* @param sender The sender's nick.
|
||||
* @param message The message.
|
||||
*/
|
||||
private void jaikuResponse(String sender, String message)
|
||||
private void identicaResponse(String sender, String message)
|
||||
{
|
||||
if (isJaikuEnabled())
|
||||
if (isIdenticaEnabled())
|
||||
{
|
||||
if (message.length() > 0)
|
||||
{
|
||||
new Thread(new Jaiku(this, sender, _jaikuUser, _jaikuKey, message)).start();
|
||||
new Thread(new Identica(this, sender, _identicaUser, _identicaPwd, message)).start();
|
||||
}
|
||||
else
|
||||
{
|
||||
helpResponse(sender, JAIKU_CMD);
|
||||
helpResponse(sender, IDENTICA_CMD);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
send(sender, "The Jaiku posting facility is disabled.");
|
||||
send(sender, "The identi.ca posting facility is disabled.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3088,25 +3041,15 @@ public class Mobibot extends PircBot
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the Google API key.
|
||||
* Sets the identi.ca user and password...
|
||||
*
|
||||
* @param googleKey The Google API key.
|
||||
* @param user The identi.ca user.
|
||||
* @param key The identi.ca password.
|
||||
*/
|
||||
private void setGoogleKey(String googleKey)
|
||||
private void setIdenticaAuth(String user, String key)
|
||||
{
|
||||
_googleKey = googleKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Jaiku user and API key..
|
||||
*
|
||||
* @param user The Jaiku user.
|
||||
* @param key The Jaiku API key.
|
||||
*/
|
||||
private void setJaikuAuth(String user, String key)
|
||||
{
|
||||
_jaikuKey = key;
|
||||
_jaikuUser = user;
|
||||
_identicaPwd = key;
|
||||
_identicaUser = user;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3203,31 +3146,6 @@ public class Mobibot extends PircBot
|
|||
_weblogURL = weblogURL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Uses Google to correctly spell a sentence.
|
||||
*
|
||||
* @param sender The nick of the person who sent the message
|
||||
* @param spell The sentence to spell.
|
||||
*/
|
||||
private void spellResponse(String sender, String spell)
|
||||
{
|
||||
if (isGoogleEnabled())
|
||||
{
|
||||
if (spell.length() > 0)
|
||||
{
|
||||
new Thread(new GoogleSearch(this, _googleKey, getChannel(), spell, true)).start();
|
||||
}
|
||||
else
|
||||
{
|
||||
helpResponse(sender, SPELL_CMD);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
send(getChannel(), "The Google spelling facility is disabled.");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Responds with the specified stock quote.
|
||||
*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Created by JReleaseInfo AntTask from Open Source Competence Group */
|
||||
/* Creation date Tue Sep 14 16:51:11 PDT 2010 */
|
||||
/* Creation date Wed Sep 15 03:24:37 PDT 2010 */
|
||||
package net.thauvin.erik.mobibot;
|
||||
|
||||
import java.util.Date;
|
||||
|
@ -20,21 +20,21 @@ public class ReleaseInfo {
|
|||
}
|
||||
|
||||
|
||||
/** buildDate (set during build process to 1284508271605L). */
|
||||
private static final Date buildDate = new Date(1284508271605L);
|
||||
/** buildDate (set during build process to 1284546277926L). */
|
||||
private static final Date buildDate = new Date(1284546277926L);
|
||||
|
||||
/**
|
||||
* Get buildDate (set during build process to Tue Sep 14 16:51:11 PDT 2010).
|
||||
* Get buildDate (set during build process to Wed Sep 15 03:24:37 PDT 2010).
|
||||
* @return Date buildDate
|
||||
*/
|
||||
public static Date getBuildDate() { return buildDate; }
|
||||
|
||||
|
||||
/**
|
||||
* Get buildNumber (set during build process to 8).
|
||||
* Get buildNumber (set during build process to 0).
|
||||
* @return int buildNumber
|
||||
*/
|
||||
public static int getBuildNumber() { return 8; }
|
||||
public static int getBuildNumber() { return 0; }
|
||||
|
||||
|
||||
/** project (set during build process to "mobibot"). */
|
||||
|
@ -47,11 +47,11 @@ public class ReleaseInfo {
|
|||
public static String getProject() { return project; }
|
||||
|
||||
|
||||
/** version (set during build process to "0.4"). */
|
||||
private static final String version = "0.4";
|
||||
/** version (set during build process to "0.5"). */
|
||||
private static final String version = "0.5";
|
||||
|
||||
/**
|
||||
* Get version (set during build process to "0.4").
|
||||
* Get version (set during build process to "0.5").
|
||||
* @return String version
|
||||
*/
|
||||
public static String getVersion() { return version; }
|
||||
|
|
|
@ -36,19 +36,19 @@
|
|||
*/
|
||||
package net.thauvin.erik.mobibot;
|
||||
|
||||
import com.Ostermiller.util.CSVParser;
|
||||
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
|
||||
* @author Erik C. Thauvin
|
||||
* @version $Revision$, $Date$
|
||||
* @created Feb 7, 2004
|
||||
* @since 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
public class StockQuote implements Runnable
|
||||
{
|
||||
|
@ -75,7 +75,7 @@ public class StockQuote implements Runnable
|
|||
/**
|
||||
* Creates a new StockQuote object.
|
||||
*
|
||||
* @param bot The bot.
|
||||
* @param bot The bot.
|
||||
* @param sender The nick of the person who sent the message.
|
||||
* @param symbol The stock symbol.
|
||||
*/
|
||||
|
@ -100,48 +100,55 @@ public class StockQuote implements Runnable
|
|||
final GetMethod getMethod = new GetMethod(YAHOO_URL + _symbol.toUpperCase());
|
||||
client.executeMethod(getMethod);
|
||||
|
||||
final String[] quote = getMethod.getResponseBodyAsString().split(",");
|
||||
final String[][] lines = CSVParser.parse(getMethod.getResponseBodyAsString());
|
||||
|
||||
if (quote.length > 0)
|
||||
if (lines.length > 0)
|
||||
{
|
||||
if ((quote.length > 3) && (!"\"N/A\"".equalsIgnoreCase(quote[3])))
|
||||
{
|
||||
_bot.send(_bot.getChannel(),
|
||||
"Symbol: " + quote[0].replaceAll("\"", "") + " [" + quote[1].replaceAll("\"", "") + ']');
|
||||
final String[] quote = lines[0];
|
||||
|
||||
if (quote.length > 5)
|
||||
if (quote.length > 0)
|
||||
{
|
||||
if ((quote.length > 3) && (!"N/A".equalsIgnoreCase(quote[3])))
|
||||
{
|
||||
_bot.send(_bot.getChannel(), "Last Trade: " + quote[2] + " (" + quote[5] + ')');
|
||||
_bot.send(_bot.getChannel(), "Symbol: " + quote[0] + " [" + quote[1] + ']');
|
||||
|
||||
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] + ' ' + quote[4]);
|
||||
}
|
||||
|
||||
if (quote.length > 6 && !"N/A".equalsIgnoreCase(quote[6]))
|
||||
{
|
||||
_bot.send(_sender, "Open: " + quote[6]);
|
||||
}
|
||||
|
||||
if (quote.length > 7 && !"N/A".equalsIgnoreCase(quote[7]) && !"N/A".equalsIgnoreCase(quote[8]))
|
||||
{
|
||||
_bot.send(_sender, "Day's Range: " + quote[7] + " - " + quote[8]);
|
||||
}
|
||||
|
||||
if (quote.length > 9 && !"0".equalsIgnoreCase(quote[9]))
|
||||
{
|
||||
_bot.send(_sender, "Volume: " + quote[9]);
|
||||
}
|
||||
}
|
||||
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]);
|
||||
_bot.send(_sender, "Invalid ticker symbol.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_bot.send(_sender, "Invalid ticker symbol.");
|
||||
_bot.send(_sender, "No values returned.");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1,9 +1,36 @@
|
|||
/*
|
||||
* @(#)Jaiku.java
|
||||
* @(#)Twitter.java
|
||||
*
|
||||
* Copyright (C) 2007 Erik C. Thauvin
|
||||
* 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$
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
<li><a href="http://jakarta.apache.org/commons/logging/">Commons Logging</a></li>
|
||||
<li><a href="http://jakarta.apache.org/commons/net/">Commons Net</a></li>
|
||||
<li><a href="http://sourceforge.net/projects/delicious-java/">delicious-java</a></li>
|
||||
<li><a href="http://google-taglib.sourceforge.net">Google Tag Library</a></li>
|
||||
<li><a href="http://sourceforge.net/projects/jweather/">JWeather</a></li>
|
||||
<li><a href="http://lts.online.fr/dev/java/math.evaluator/">MathEvaluator</a></li>
|
||||
<li><a href="https://rome.dev.java.net/">Rome</a></li>
|
||||
|
@ -38,16 +37,15 @@
|
|||
<li>Displaying the latest entries on Mobitopia</li>
|
||||
<li>Performing DNS lookups</li>
|
||||
<li>Recapping public channel messages</li>
|
||||
<li>Performing Google spelling queries</li>
|
||||
<li>Retrieving stock quotes</li>
|
||||
<li>Displaying the time in various time zones</li>
|
||||
<li>Listing the users on the channel</li>
|
||||
<li>Displaying weather information</li>
|
||||
<li>Posting to <a href="http://jaiku.com/channel/mobitopia/">Jaiku's #mobitopia channel</a></li>
|
||||
<li>Posting to <a href="http://identi.ca/mobitopia">identi.ca</a></li>
|
||||
<li>Posting to <a href="http://twitter.com/mobitopia">Twitter</a></li>
|
||||
</ul>
|
||||
<p>Some of the internal features include RSS feed backlogs, rolling logs, debugging toggle and much more.</p>
|
||||
<p>If you have any feature suggestions, please post them to the <a href="http://erik.thauvin.net/wiki/display/mobibot"><strong>mobibot wiki</strong></a>. </p>
|
||||
<p>If you have any feature suggestions, please post them to the <a href="http://erik.thauvin.net/wiki/mobibot"><strong>mobibot wiki</strong></a>. </p>
|
||||
<h3>Using mobibot</h3>
|
||||
<p>To use mobibot, simply <strong>join <a href="irc://irc.freenode.net/#mobitopia">#mobitopia</a></strong> on <strong>irc.freenode.net</strong> and type:</p>
|
||||
<p><code>mobibot: help</code></p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue