Updated locations.

This commit is contained in:
Erik C. Thauvin 2005-05-05 19:47:29 +00:00
parent f08c9c58d6
commit 0fbb32420f
10 changed files with 601 additions and 316 deletions

View file

@ -1,3 +1,3 @@
#ANT Task: ch.oscg.jreleaseinfo.BuildNumberHandler #ANT Task: ch.oscg.jreleaseinfo.BuildNumberHandler
#Sun Mar 06 13:05:37 PST 2005 #Thu May 05 12:13:40 PDT 2005
build.num.last=3 build.num.last=26

View file

@ -3,18 +3,19 @@ D:\projects\java\mobibot\build
[Source dirs] [Source dirs]
D:\projects\java\mobibot\src D:\projects\java\mobibot\src
[Aux classpath entries] [Aux classpath entries]
D:\projects\java\mobibot\lib\commons-httpclient-2.0-final.jar 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-logging.jar
D:\projects\java\mobibot\lib\commons-net-1.1.0.jar D:\projects\java\mobibot\lib\commons-net-1.2.2.jar
D:\projects\java\mobibot\lib\EXML.jar D:\projects\java\mobibot\lib\delicious-1.5.jar
D:\projects\java\mobibot\lib\fetchrss.jar
D:\projects\java\mobibot\lib\google.jar D:\projects\java\mobibot\lib\google.jar
D:\projects\java\mobibot\lib\googleapi.jar D:\projects\java\mobibot\lib\googleapi.jar
D:\projects\java\mobibot\lib\jakarta-oro-2.0.7.jar
D:\projects\java\mobibot\lib\jakarta-oro-2.0.8.jar D:\projects\java\mobibot\lib\jakarta-oro-2.0.8.jar
D:\projects\java\mobibot\lib\jdom.jar D:\projects\java\mobibot\lib\jdom-1.0.jar
D:\projects\java\mobibot\lib\jweather-0.2.3.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\log4j-1.2.8.jar
D:\projects\java\mobibot\lib\MathEvaluator.jar D:\projects\java\mobibot\lib\MathEvaluator.jar
D:\projects\java\mobibot\lib\pircbot.jar D:\projects\java\mobibot\lib\pircbot.jar
D:\projects\java\mobibot\lib\rsslibj.jar D:\projects\java\mobibot\lib\rome-0.4.jar
D:\projects\java\mobibot\lib\rome-fetcher-0.4.jar

View file

@ -44,7 +44,7 @@
</languages> </languages>
<startupscripts /> <startupscripts />
<preferredrecentcommandsdividerlocations> <preferredrecentcommandsdividerlocations>
<dividerlocationd language="beanshell" position="939" /> <dividerlocationd language="beanshell" position="1028" />
</preferredrecentcommandsdividerlocations> </preferredrecentcommandsdividerlocations>
<BSFConsoleSearchOptions searchfromcursor="false"> <BSFConsoleSearchOptions searchfromcursor="false">
<recentsearches /> <recentsearches />

View file

@ -112,70 +112,61 @@
<option name="HIDE_WARNINGS" value="false" /> <option name="HIDE_WARNINGS" value="false" />
</component> </component>
<component name="FileEditorManager" split-orientation="vertical" split-proportion="0.5"> <component name="FileEditorManager" split-orientation="vertical" split-proportion="0.5">
<first-group selected-file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/DeliciousPoster.java"> <first-group selected-file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Mobibot.java">
<entry file="file://$PROJECT_DIR$/ChangeLog.txt" pinned="false"> <entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/DeliciousPoster.java" pinned="false">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="23" column="34" selection-start="878" selection-end="878" vertical-scroll-proportion="0.6571429"> <state line="44" column="52" selection-start="1823" selection-end="1823" vertical-scroll-proportion="0.24878049">
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Mobibot.java" pinned="false"> <entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Mobibot.java" pinned="false">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="2771" column="46" selection-start="64811" selection-end="64811" vertical-scroll-proportion="1.5982759"> <state line="90" column="79" selection-start="3025" selection-end="3025" vertical-scroll-proportion="0.19666667">
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Weather.java" pinned="false"> <entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/EntryLink.java" pinned="false">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="54" column="13" selection-start="2059" selection-end="2059" vertical-scroll-proportion="0.42068964"> <state line="394" column="26" selection-start="8275" selection-end="8275" vertical-scroll-proportion="0.5479675">
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/FeedReader.java" pinned="false">
<provider selected="true" editor-type-id="text-editor">
<state line="109" column="52" selection-start="3133" selection-end="3133" vertical-scroll-proportion="0.8655462">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/DeliciousPoster.java" pinned="false">
<provider selected="true" editor-type-id="text-editor">
<state line="103" column="5" selection-start="3140" selection-end="3140" vertical-scroll-proportion="1.3361344">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/SwingWorker.java" pinned="false">
<provider selected="true" editor-type-id="text-editor">
<state line="29" column="33" selection-start="956" selection-end="956" vertical-scroll-proportion="0.82857144">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/CurrencyConverter.java" pinned="false">
<provider selected="true" editor-type-id="text-editor">
<state line="36" column="0" selection-start="1681" selection-end="1714" vertical-scroll-proportion="0.029310346">
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/mobibot.properties" pinned="false"> <entry file="file://$PROJECT_DIR$/mobibot.properties" pinned="false">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="17" column="7" selection-start="457" selection-end="457" vertical-scroll-proportion="0.4857143"> <state line="17" column="0" selection-start="440" selection-end="440" vertical-scroll-proportion="0.4699187">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/properties/mobibot.properties" pinned="false">
<provider selected="true" editor-type-id="text-editor">
<state line="12" column="5" selection-start="258" selection-end="258" vertical-scroll-proportion="0.33170733">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/properties/log4j.properties" pinned="false">
<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>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/properties/fetcher.properties" pinned="false">
<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 /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/buildnum.properties" pinned="false"> <entry file="file://$PROJECT_DIR$/buildnum.properties" pinned="false">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="3" column="0" selection-start="98" selection-end="98" vertical-scroll-proportion="0.08571429"> <state line="3" column="0" selection-start="99" selection-end="99" vertical-scroll-proportion="0.08292683">
<folding /> <folding />
</state> </state>
</provider> </provider>
@ -204,21 +195,15 @@
<component name="NamedScopeManager" /> <component name="NamedScopeManager" />
<component name="PackagesPane"> <component name="PackagesPane">
<expanded_node url="net.thauvin.erik.mobibot" module="mobibot" type="package" /> <expanded_node url="net.thauvin.erik.mobibot" module="mobibot" type="package" />
<expanded_node url="net.thauvin.erik" module="mobibot" type="package" />
<expanded_node url="net.thauvin" module="mobibot" type="package" />
<expanded_node url="net" module="mobibot" type="package" />
<expanded_node url="" module="mobibot" type="module" /> <expanded_node url="" module="mobibot" type="module" />
<expanded_node url="net" module="mobibot" type="package" />
<expanded_node url="net.thauvin" module="mobibot" type="package" />
<expanded_node url="net.thauvin.erik" module="mobibot" type="package" />
</component> </component>
<component name="ProjectPane"> <component name="ProjectPane">
<expanded_node url="file://$PROJECT_DIR$/lib" module="mobibot" type="directory" />
<expanded_node url="file://$PROJECT_DIR$/licenses" module="mobibot" type="directory" />
<expanded_node url="file://$PROJECT_DIR$/src/net/thauvin" module="mobibot" type="directory" />
<expanded_node url="file://$PROJECT_DIR$/src" module="mobibot" type="directory" />
<expanded_node url="file://$PROJECT_DIR$/src/net" module="mobibot" type="directory" />
<expanded_node url="file://$PROJECT_DIR$" module="mobibot" type="directory" /> <expanded_node url="file://$PROJECT_DIR$" module="mobibot" type="directory" />
<expanded_node url="" module="mobibot" type="module" /> <expanded_node url="" module="mobibot" type="module" />
<expanded_node url="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot" module="mobibot" type="directory" /> <expanded_node url="file://$PROJECT_DIR$/properties" module="mobibot" type="directory" />
<expanded_node url="file://$PROJECT_DIR$/src/net/thauvin/erik" module="mobibot" type="directory" />
<expanded_node url="file://$PROJECT_DIR$/website" module="mobibot" type="directory" /> <expanded_node url="file://$PROJECT_DIR$/website" module="mobibot" type="directory" />
</component> </component>
<component name="ProjectView"> <component name="ProjectView">
@ -262,8 +247,8 @@
<property name="last_opened_file_path" value="C:\Documents and Settings\erik\My Documents\My Received Files\src\MathEvaluator" /> <property name="last_opened_file_path" value="C:\Documents and Settings\erik\My Documents\My Received Files\src\MathEvaluator" />
<property name="cvs_file_history_flatOrder5" value="5" /> <property name="cvs_file_history_flatOrder5" value="5" />
<property name="cvs_file_history_flatWidth5" value="136" /> <property name="cvs_file_history_flatWidth5" value="136" />
<property name="cvs_file_history_treeWidth3" value="136" />
<property name="cvs_file_history_treeOrder2" value="2" /> <property name="cvs_file_history_treeOrder2" value="2" />
<property name="cvs_file_history_treeWidth3" value="136" />
<property name="cvs_file_history_treeWidth5" value="136" /> <property name="cvs_file_history_treeWidth5" value="136" />
<property name="cvs_file_history_flatOrder6" value="6" /> <property name="cvs_file_history_flatOrder6" value="6" />
<property name="cvs_file_history_flatWidth0" value="135" /> <property name="cvs_file_history_flatWidth0" value="135" />
@ -341,7 +326,13 @@
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" /> <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<module name="mobibot" /> <module name="mobibot" />
<RunnerSettings RunnerId="Run" /> <RunnerSettings RunnerId="Run" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="1063" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<ConfigurationWrapper RunnerId="Run" /> <ConfigurationWrapper RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
</configuration> </configuration>
</component> </component>
<component name="SelectInManager"> <component name="SelectInManager">
@ -396,27 +387,27 @@
</todo-panel> </todo-panel>
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="42" y="29" width="1445" height="1124" extended-state="0" /> <frame x="-4" y="-4" width="1288" height="808" extended-state="0" />
<editor active="false" /> <editor active="false" />
<layout> <layout>
<window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33032128" order="8" /> <window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33032128" order="8" />
<window_info id="Regex" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.44135803" order="10" x="22" y="277" width="980" height="214" /> <window_info id="Regex" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.44135803" order="10" x="22" y="277" width="980" height="214" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33024693" order="7" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33024693" order="7" />
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.25771716" order="0" /> <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.1658576" order="0" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33032128" order="1" /> <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33032128" order="1" />
<window_info id="Jalopy" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="8" /> <window_info id="Jalopy" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33032128" order="8" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.27959183" order="1" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.27959183" order="1" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.33032128" order="9" /> <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33088234" order="9" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="true" internal_type="docked" type="docked" visible="false" weight="0.3995984" order="6" /> <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.3995984" order="6" />
<window_info id="Profile" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="8" /> <window_info id="Profile" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="8" />
<window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="8" /> <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="8" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.096195266" order="1" /> <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.06553398" order="1" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="true" internal_type="docked" type="docked" visible="false" weight="0.39658636" order="2" x="22" y="277" width="980" height="213" /> <window_info id="Run" active="false" anchor="bottom" auto_hide="true" internal_type="docked" type="docked" visible="false" weight="0.39658636" order="2" x="22" y="277" width="980" height="213" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="2" /> <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="2" />
<window_info id="CVS File View" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="3" /> <window_info id="CVS File View" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="3" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="sliding" type="sliding" visible="false" weight="0.4" order="0" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="sliding" type="sliding" visible="false" weight="0.4" order="0" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.39969134" order="4" /> <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.3995984" order="4" />
<window_info id="BSFConsole" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33024693" order="11" /> <window_info id="BSFConsole" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33032128" order="11" />
<window_info id="Properties File Structure" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.20918368" order="5" /> <window_info id="Properties File Structure" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.20918368" order="5" />
<window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="2" /> <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="2" />
<window_info id="Code Outline" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="4" /> <window_info id="Code Outline" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="4" />
@ -501,23 +492,16 @@
</buildFile> </buildFile>
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/website/index.html"> <entry file="jar://$PROJECT_DIR$/lib/pircbot.jar!/org/jibble/pircbot/InputThread.class">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="45" column="160" selection-start="2992" selection-end="2992" vertical-scroll-proportion="0.7169615"> <state line="32" column="60" selection-start="824" selection-end="826" vertical-scroll-proportion="0.52953815">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/build.properties">
<provider selected="true" editor-type-id="text-editor">
<state line="2" column="16" selection-start="44" selection-end="44" vertical-scroll-proportion="0.034836065">
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/StockQuote.java"> <entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/StockQuote.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="44" column="0" selection-start="1838" selection-end="1838" vertical-scroll-proportion="0.16433942"> <state line="97" column="63" selection-start="3007" selection-end="3007" vertical-scroll-proportion="0.51932776">
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
</folding> </folding>
@ -526,76 +510,81 @@
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/EntryComment.java"> <entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/EntryComment.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="53" column="13" selection-start="2016" selection-end="2016" vertical-scroll-proportion="0.32867885"> <state line="53" column="13" selection-start="2016" selection-end="2016" vertical-scroll-proportion="0.0605042">
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/build.xml">
<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>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/ChangeLog.txt">
<provider selected="true" editor-type-id="text-editor">
<state line="23" column="34" selection-start="878" selection-end="878" vertical-scroll-proportion="0.6571429">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Mobibot.java">
<provider selected="true" editor-type-id="text-editor">
<state line="2771" column="46" selection-start="64811" selection-end="64811" vertical-scroll-proportion="1.5982759">
<folding>
<element signature="imports" expanded="true" />
</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="54" column="13" selection-start="2059" selection-end="2059" vertical-scroll-proportion="0.42068964">
<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="109" column="52" selection-start="3133" selection-end="3133" vertical-scroll-proportion="0.8655462">
<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="103" column="5" selection-start="3140" selection-end="3140" vertical-scroll-proportion="1.3361344">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/SwingWorker.java"> <entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/SwingWorker.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="29" column="33" selection-start="956" selection-end="956" vertical-scroll-proportion="0.82857144"> <state line="29" column="33" selection-start="956" selection-end="956" vertical-scroll-proportion="0.52953815">
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/CurrencyConverter.java"> <entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/CurrencyConverter.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="36" column="0" selection-start="1681" selection-end="1714" vertical-scroll-proportion="0.029310346"> <state line="83" column="12" selection-start="2595" selection-end="2595" vertical-scroll-proportion="0.8764769">
<folding />
</state>
</provider>
</entry>
<entry file="jar://$PROJECT_DIR$/lib/pircbot.jar!/org/jibble/pircbot/PircBot.class">
<provider selected="true" editor-type-id="text-editor">
<state line="384" column="24" selection-start="10669" selection-end="10669" vertical-scroll-proportion="0.3329753">
<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="44" column="52" selection-start="1823" selection-end="1823" vertical-scroll-proportion="0.24878049">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Mobibot.java">
<provider selected="true" editor-type-id="text-editor">
<state line="90" column="79" selection-start="3025" selection-end="3025" vertical-scroll-proportion="0.19666667">
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/EntryLink.java">
<provider selected="true" editor-type-id="text-editor">
<state line="394" column="26" selection-start="8275" selection-end="8275" vertical-scroll-proportion="0.5479675">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/mobibot.properties"> <entry file="file://$PROJECT_DIR$/mobibot.properties">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="17" column="7" selection-start="457" selection-end="457" vertical-scroll-proportion="0.4857143"> <state line="17" column="0" selection-start="440" selection-end="440" vertical-scroll-proportion="0.4699187">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/properties/log4j.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">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/properties/mobibot.properties">
<provider selected="true" editor-type-id="text-editor">
<state line="12" column="5" selection-start="258" selection-end="258" vertical-scroll-proportion="0.33170733">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/properties/fetcher.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">
<folding /> <folding />
</state> </state>
</provider> </provider>
@ -609,7 +598,7 @@
</entry> </entry>
<entry file="file://$PROJECT_DIR$/buildnum.properties"> <entry file="file://$PROJECT_DIR$/buildnum.properties">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="3" column="0" selection-start="98" selection-end="98" vertical-scroll-proportion="0.08571429"> <state line="3" column="0" selection-start="99" selection-end="99" vertical-scroll-proportion="0.08292683">
<folding /> <folding />
</state> </state>
</provider> </provider>

View file

@ -81,7 +81,7 @@ public class CurrencyConverter implements Runnable
/** /**
* The last exchange rates table publication date. * The last exchange rates table publication date.
*/ */
private static String s_date = ""; private String s_date = "";
/** /**
* The bot. * The bot.

View file

@ -50,35 +50,34 @@ import del.icio.us.Delicious;
public class DeliciousPoster public class DeliciousPoster
{ {
private final Delicious _delicious; private final Delicious _delicious;
private final String _tags; private final String _ircServer;
/** /**
* Creates a new DeliciousPoster instance. * Creates a new DeliciousPoster instance.
* *
* @param username The del.icio.us username. * @param username The del.icio.us username.
* @param password The del.icio.us password. * @param password The del.icio.us password.
* @param tags The del.icio.us tags. * @param ircServer The IRC server.
*/ */
public DeliciousPoster(String username, String password, String tags) public DeliciousPoster(String username, String password, String ircServer)
{ {
_delicious = new Delicious(username, password); _delicious = new Delicious(username, password);
_tags = tags; _ircServer = ircServer;
} }
/** /**
* Adds a post to del.icio.us. * Adds a post to del.icio.us.
* *
* @param entry The entry to add. * @param entry The entry to add.
* @param extended The del.icio.us extended data.
*/ */
public final void addPost(final EntryLink entry, final String extended) public final void addPost(final EntryLink entry)
{ {
final SwingWorker worker = new SwingWorker() final SwingWorker worker = new SwingWorker()
{ {
public Object construct() public Object construct()
{ {
return new Boolean(_delicious.addPost(entry.getLink(), entry.getTitle(), extended, _tags, return Boolean.valueOf(_delicious.addPost(entry.getLink(), entry.getTitle(), postedBy(entry),
entry.getDate())); entry.getDeliciousTags(), entry.getDate()));
} }
}; };
@ -86,20 +85,57 @@ public class DeliciousPoster
} }
/** /**
* Delets a post to del.icio.us. * Deletes a post to del.icio.us.
* *
* @param entry The entry to delete. * @param entry The entry to delete.
*/ */
public final void deletePost(final EntryLink entry) public final void deletePost(EntryLink entry)
{ {
final String link = entry.getLink();
final SwingWorker worker = new SwingWorker() final SwingWorker worker = new SwingWorker()
{ {
public Object construct() public Object construct()
{ {
return new Boolean(_delicious.deletePost(entry.getLink())); return Boolean.valueOf(_delicious.deletePost(link));
} }
}; };
worker.start(); 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()
{
_delicious.deletePost(oldUrl);
return Boolean.valueOf(_delicious.addPost(entry.getLink(), entry.getTitle(), postedBy(entry),
entry.getDeliciousTags(), entry.getDate()));
}
};
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 + ')';
}
} }

View file

@ -36,12 +36,11 @@
*/ */
package net.thauvin.erik.mobibot; package net.thauvin.erik.mobibot;
import com.sun.syndication.feed.synd.SyndCategoryImpl;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.*;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
/** /**
@ -49,7 +48,6 @@ import java.util.List;
* *
* @author Erik C. Thauvin * @author Erik C. Thauvin
* @version $Revision$, $Date$ * @version $Revision$, $Date$
*
* @created Jan 31, 2004 * @created Jan 31, 2004
* @since 1.0 * @since 1.0
*/ */
@ -60,37 +58,30 @@ public class EntryLink implements Serializable
*/ */
static final long serialVersionUID = 3676245542270899086L; static final long serialVersionUID = 3676245542270899086L;
/** // The channel
* The creation date. private String _channel = "";
*/
// The link's comments
private final List _comments = new ArrayList(0);
// The creation date
private Date _date = Calendar.getInstance().getTime(); private Date _date = Calendar.getInstance().getTime();
/** // The link's URL
* The comments.
*/
private final List _comments = new ArrayList(0);
private String _link = ""; private String _link = "";
// The author's login
private String _login = ""; private String _login = "";
// The author's nickname
private String _nick = ""; private String _nick = "";
// The tags/categories
private final List _tags = new ArrayList(0);
// The link's title
private String _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 date The entry date.
*/
public EntryLink(String link, String title, String nick, Date date)
{
_link = link;
_title = title;
_nick = nick;
_date = date;
}
/** /**
* Creates a new entry. * Creates a new entry.
* *
@ -98,13 +89,41 @@ public class EntryLink implements Serializable
* @param title The new entry's title. * @param title The new entry's title.
* @param nick The nickname of the author of the link. * @param nick The nickname of the author of the link.
* @param login The login 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) public EntryLink(String link, String title, String nick, String login, String channel, String tags)
{ {
_link = link; _link = link;
_title = title; _title = title;
_nick = nick; _nick = nick;
_login = login; _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);
} }
/** /**
@ -116,20 +135,43 @@ public class EntryLink implements Serializable
} }
/** /**
* Sets a comment. * Adds a new comment.
* *
* @param index The comment's index.
* @param comment The actual comment. * @param comment The actual comment.
* @param nick The nickname of the author of the comment. * @param nick The nickname of the author of the comment.
*
* @return The total number of comments for this entry.
*/ */
public final synchronized void setComment(int index, String comment, String nick) 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()) if (index < _comments.size())
{ {
_comments.set(index, new EntryComment(comment, nick)); _comments.remove(index);
} }
} }
/**
* Returns the channel the link was posted on.
*
* @return The channel
*/
public final synchronized String getChannel()
{
return _channel;
}
/** /**
* Returns a comment. * Returns a comment.
* *
@ -173,13 +215,25 @@ public class EntryLink implements Serializable
} }
/** /**
* Sets the comment's link. * Returns the tags formatted for del.icio.us.
* *
* @param link The new link. * @return The tags as a space-deliminted string.
*/ */
public final synchronized void setLink(String link) public final synchronized String getDeliciousTags()
{ {
this._link = link; 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();
} }
/** /**
@ -192,16 +246,6 @@ public class EntryLink implements Serializable
return _link; return _link;
} }
/**
* Set the comment's author login.
*
* @param login The new login.
*/
public final synchronized void setLogin(String login)
{
this._login = login;
}
/** /**
* Return's the comment's author login. * Return's the comment's author login.
* *
@ -212,16 +256,6 @@ public class EntryLink implements Serializable
return _login; return _login;
} }
/**
* Sets the comment's author nickname.
*
* @param nick The new nickname.
*/
public final synchronized void setNick(String nick)
{
this._nick = nick;
}
/** /**
* Returns the comment's author nickname. * Returns the comment's author nickname.
* *
@ -233,13 +267,13 @@ public class EntryLink implements Serializable
} }
/** /**
* Sets the comment's title. * Returns the tags.
* *
* @param title The new title. * @return The tags.
*/ */
public final synchronized void setTitle(String title) public final synchronized List getTags()
{ {
this._title = title; return _tags;
} }
/** /**
@ -252,34 +286,6 @@ public class EntryLink implements Serializable
return _title; return _title;
} }
/**
* 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 true if the entry has comments. * Returns true if the entry has comments.
* *
@ -287,6 +293,146 @@ public class EntryLink implements Serializable
*/ */
public final synchronized boolean hasComments() public final synchronized boolean hasComments()
{ {
return (_comments.size() > 0); 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.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;
} }
} }

View file

@ -88,7 +88,7 @@ public class Mobibot extends PircBot
private static final String[] INFO_STRS = private static final String[] INFO_STRS =
{ {
"Mobibot v" + ReleaseInfo.getVersion() + '.' + ReleaseInfo.getBuildNumber() + "Mobibot v" + ReleaseInfo.getVersion() + '.' + ReleaseInfo.getBuildNumber() +
" by Erik C. Thauvin (erik@thauvin.net)", "http://www.thauvin.net/mobitopia/mobibot/" " by Erik C. Thauvin (erik@thauvin.net)", "http://mobitopia.thauvin.net/mobibot/"
}; };
/** /**
@ -181,6 +181,11 @@ public class Mobibot extends PircBot
*/ */
private static final String HELP_POSTING_KEYWORD = "posting"; private static final String HELP_POSTING_KEYWORD = "posting";
/**
* The help on tags keyword.
*/
private static final String HELP_TAGS_KEYWORD = "tags";
/** /**
* The Google command. * The Google command.
*/ */
@ -251,6 +256,11 @@ public class Mobibot extends PircBot
*/ */
private static final String NO_TITLE = "No Title"; private static final String NO_TITLE = "No Title";
/**
* The tags/categories marker.
*/
private static final String TAGS_MARKER = "tags:";
/** /**
* The countries supporte by the {@link #TIME_CMD time} command. * The countries supporte by the {@link #TIME_CMD time} command.
*/ */
@ -336,6 +346,7 @@ public class Mobibot extends PircBot
COUNTRIES_MAP.put("NL", "Europe/Amsterdam"); COUNTRIES_MAP.put("NL", "Europe/Amsterdam");
COUNTRIES_MAP.put("NO", "Europe/Oslo"); COUNTRIES_MAP.put("NO", "Europe/Oslo");
COUNTRIES_MAP.put("NZ", "Pacific/Auckland"); COUNTRIES_MAP.put("NZ", "Pacific/Auckland");
COUNTRIES_MAP.put("PK", "Asia/Karachi");
COUNTRIES_MAP.put("RU", "Europe/Moscow"); COUNTRIES_MAP.put("RU", "Europe/Moscow");
COUNTRIES_MAP.put("SE", "Europe/Stockholm"); COUNTRIES_MAP.put("SE", "Europe/Stockholm");
COUNTRIES_MAP.put("SG", "Asia/Singapore"); COUNTRIES_MAP.put("SG", "Asia/Singapore");
@ -368,7 +379,7 @@ public class Mobibot extends PircBot
/** /**
* The number of milliseconds to delay between consecutive messages. * The number of milliseconds to delay between consecutive messages.
*/ */
private static final int MESSAGE_DELAY = 1000; private static final long MESSAGE_DELAY = 1000L;
/** /**
* The name of the file containing the current entries. * The name of the file containing the current entries.
@ -380,11 +391,6 @@ public class Mobibot extends PircBot
*/ */
private static final String NAV_XML = "nav.xml"; private static final String NAV_XML = "nav.xml";
/**
* The del.icio.us posts handler.
*/
private static DeliciousPoster _delicious = null;
/** /**
* The backlogs URL. * The backlogs URL.
*/ */
@ -395,6 +401,16 @@ public class Mobibot extends PircBot
*/ */
private final String _channel; private final String _channel;
/**
* The default tags/categories.
*/
private String _defaultTags = "";
/**
* The del.icio.us posts handler.
*/
private DeliciousPoster _delicious = null;
/** /**
* The entries array. * The entries array.
*/ */
@ -410,7 +426,10 @@ public class Mobibot extends PircBot
*/ */
private String _feedURL = ""; private String _feedURL = "";
// The Google API key. /**
* The Google API key.
*/
private String _googleKey = ""; private String _googleKey = "";
/** /**
@ -637,14 +656,6 @@ public class Mobibot extends PircBot
System.setErr(stderr); System.setErr(stderr);
} }
// Get the del.icio.us properties
final String dname = p.getProperty("delicious-user");
final String dpwd = p.getProperty("delicious-pwd");
if (isValidString(dname) && isValidString(dpwd))
{
_delicious = new DeliciousPoster(dname, dpwd, p.getProperty("delicious-tags", ""));
}
// Get the bot's properties // Get the bot's properties
final String login = p.getProperty("login", nickname); final String login = p.getProperty("login", nickname);
@ -653,6 +664,11 @@ public class Mobibot extends PircBot
final String backlogsURL = ensureDir(p.getProperty("backlogs", weblogURL), true); final String backlogsURL = ensureDir(p.getProperty("backlogs", weblogURL), true);
final String googleKey = p.getProperty("google", ""); final String googleKey = p.getProperty("google", "");
final String ignoredNicks = p.getProperty("ignore", ""); final String ignoredNicks = p.getProperty("ignore", "");
final String tags = p.getProperty("tags", "");
// Get the del.icio.us properties
final String dname = p.getProperty("delicious-user");
final String dpwd = p.getProperty("delicious-pwd");
// Create the bot // Create the bot
final Mobibot bot = new Mobibot(server, channel, logsDir); final Mobibot bot = new Mobibot(server, channel, logsDir);
@ -673,6 +689,16 @@ public class Mobibot extends PircBot
// Set the Google key // Set the Google key
bot.setGoogleKey(googleKey); bot.setGoogleKey(googleKey);
if (isValidString(dname) && isValidString(dpwd))
{
// Set the del.icio.us authentication
bot.setDeliciousAuth(dname, dpwd);
}
// Set the tags
bot.setTags(tags);
// Set the ignored nicks // Set the ignored nicks
bot.setIgnoredNicks(ignoredNicks); bot.setIgnoredNicks(ignoredNicks);
@ -753,7 +779,7 @@ public class Mobibot extends PircBot
{ {
if (isValidString(channel) && isValidString(action)) if (isValidString(channel) && isValidString(action))
{ {
this.sendAction(channel, action); sendAction(channel, action);
} }
} }
@ -799,7 +825,8 @@ public class Mobibot extends PircBot
if (lcTopic.endsWith(HELP_POSTING_KEYWORD)) if (lcTopic.endsWith(HELP_POSTING_KEYWORD))
{ {
send(sender, bold("Post a URL, by saying it on a line on its own.")); send(sender, bold("Post a URL, by saying it on a line on its own:"));
send(sender, DOUBLE_INDENT + bold("<url> [<title>] [" + TAGS_MARKER + "<+tag> [...]]"));
send(sender, "I will reply with a label, for example: " + bold(LINK_CMD + '1')); send(sender, "I will reply with a label, for example: " + bold(LINK_CMD + '1'));
send(sender, "To add a title, use a its label and a pipe:"); send(sender, "To add a title, use a its label and a pipe:");
send(sender, DOUBLE_INDENT + bold(LINK_CMD + "1:|This is the title")); send(sender, DOUBLE_INDENT + bold(LINK_CMD + "1:|This is the title"));
@ -812,6 +839,11 @@ public class Mobibot extends PircBot
send(sender, DOUBLE_INDENT + bold(LINK_CMD + "1.1:-")); send(sender, DOUBLE_INDENT + bold(LINK_CMD + "1.1:-"));
send(sender, "You can also view a posting by saying its label."); send(sender, "You can also view a posting by saying its label.");
} }
else if (lcTopic.endsWith(HELP_TAGS_KEYWORD))
{
send(sender, bold("To categorize or tag a URL, use its label and a T:"));
send(sender, DOUBLE_INDENT + bold(LINK_CMD + "1T:<+tag|-tag> [...]"));
}
else if (lcTopic.endsWith(VIEW_CMD)) else if (lcTopic.endsWith(VIEW_CMD))
{ {
send(sender, "To list or search the current URL posts:"); send(sender, "To list or search the current URL posts:");
@ -938,7 +970,9 @@ public class Mobibot extends PircBot
bold(INFO_CMD + ' ' + getChannel().substring(1) + ' ' + LOOKUP_CMD + ' ' + HELP_POSTING_KEYWORD + ' ' + bold(INFO_CMD + ' ' + getChannel().substring(1) + ' ' + LOOKUP_CMD + ' ' + HELP_POSTING_KEYWORD + ' ' +
RECAP_CMD)); RECAP_CMD));
send(sender, send(sender,
DOUBLE_INDENT + bold(SPELL_CMD + ' ' + STOCK_CMD + ' ' + TIME_CMD + ' ' + USERS_CMD + ' ' + VIEW_CMD)); DOUBLE_INDENT +
bold(SPELL_CMD + ' ' + STOCK_CMD + ' ' + HELP_TAGS_KEYWORD + ' ' + TIME_CMD + ' ' + USERS_CMD + ' ' +
VIEW_CMD));
send(sender, DOUBLE_INDENT + bold(WEATHER_CMD)); send(sender, DOUBLE_INDENT + bold(WEATHER_CMD));
if (isOp(sender)) if (isOp(sender))
@ -978,7 +1012,7 @@ public class Mobibot extends PircBot
_logger.debug("Sending message to " + sender + ": " + message); _logger.debug("Sending message to " + sender + ": " + message);
} }
this.sendMessage(sender, message); sendMessage(sender, message);
} }
else else
{ {
@ -987,7 +1021,7 @@ public class Mobibot extends PircBot
_logger.debug("Sending notice to " + sender + ": " + message); _logger.debug("Sending notice to " + sender + ": " + message);
} }
this.sendNotice(sender, message); sendNotice(sender, message);
} }
} }
} }
@ -1102,7 +1136,18 @@ public class Mobibot extends PircBot
if (title.indexOf(getNick()) == -1) if (title.indexOf(getNick()) == -1)
{ {
_entries.add(new EntryLink(cmd, title, sender, login)); final int tagSep = title.lastIndexOf(TAGS_MARKER);
if (tagSep != -1)
{
_entries.add(new EntryLink(cmd, title.substring(0, tagSep), sender, login, channel,
(_defaultTags + ' ' +
title.substring(tagSep + TAGS_MARKER.length()))));
}
else
{
_entries.add(new EntryLink(cmd, title, sender, login, channel, _defaultTags));
}
} }
else else
{ {
@ -1111,7 +1156,7 @@ public class Mobibot extends PircBot
} }
else else
{ {
_entries.add(new EntryLink(cmd, NO_TITLE, sender, login)); _entries.add(new EntryLink(cmd, NO_TITLE, sender, login, channel, _defaultTags));
} }
if (isCommand) if (isCommand)
@ -1122,7 +1167,7 @@ public class Mobibot extends PircBot
if (_delicious != null) if (_delicious != null)
{ {
_delicious.addPost(entry, postedBy(entry, channel)); _delicious.addPost(entry);
} }
saveEntries(isBackup); saveEntries(isBackup);
@ -1354,6 +1399,11 @@ public class Mobibot extends PircBot
final EntryLink entry = (EntryLink) _entries.get(index); final EntryLink entry = (EntryLink) _entries.get(index);
send(getChannel(), buildLink(index, entry)); send(getChannel(), buildLink(index, entry));
if (entry.hasTags())
{
send(getChannel(), buildTags(index, entry));
}
if (entry.hasComments()) if (entry.hasComments())
{ {
final EntryComment[] comments = entry.getComments(); final EntryComment[] comments = entry.getComments();
@ -1395,7 +1445,7 @@ public class Mobibot extends PircBot
if (_delicious != null) if (_delicious != null)
{ {
_delicious.addPost(entry, postedBy(entry, channel)); _delicious.addPost(entry);
} }
send(getChannel(), buildLink(index, entry)); send(getChannel(), buildLink(index, entry));
@ -1412,16 +1462,13 @@ public class Mobibot extends PircBot
if (link.matches(LINK_MATCH)) if (link.matches(LINK_MATCH))
{ {
if (_delicious != null) final String oldLink = entry.getLink();
{
_delicious.deletePost(entry);
}
entry.setLink(link); entry.setLink(link);
if (_delicious != null) if (_delicious != null)
{ {
_delicious.addPost(entry, postedBy(entry, channel)); _delicious.updatePost(oldLink, entry);
} }
send(getChannel(), buildLink(index, entry)); send(getChannel(), buildLink(index, entry));
@ -1462,6 +1509,51 @@ public class Mobibot extends PircBot
} }
} }
} }
else if (message.matches(LINK_CMD + "[0-9]+T:.*"))
{
isCommand = true;
final String[] cmds = message.substring(1).split("T:", 2);
final int index = Integer.parseInt(cmds[0]) - 1;
if (index < _entries.size())
{
final String cmd = cmds[1].trim();
final EntryLink entry = (EntryLink) _entries.get(index);
if (cmd.length() != 0)
{
if (entry.getLogin().equals(login) || isOp(sender))
{
entry.setTags(cmd);
if (_delicious != null)
{
_delicious.addPost(entry);
}
send(getChannel(), buildTags(index, entry));
saveEntries(false);
}
else
{
send(sender, "Please ask a channel op to change the tags for you.");
}
}
else
{
if (entry.hasTags())
{
send(getChannel(), buildTags(index, entry));
}
else
{
send(sender, "The entry has no tags. Why don't add some?");
}
}
}
}
else if (message.matches(LINK_CMD + "[0-9]+\\.[0-9]+:.*")) else if (message.matches(LINK_CMD + "[0-9]+\\.[0-9]+:.*"))
{ {
isCommand = true; isCommand = true;
@ -1556,7 +1648,7 @@ public class Mobibot extends PircBot
{ {
if (isOp(sender)) if (isOp(sender))
{ {
this.sendRawLine("QUIT : Poof!"); sendRawLine("QUIT : Poof!");
System.exit(0); System.exit(0);
} }
} }
@ -1567,7 +1659,7 @@ public class Mobibot extends PircBot
send(getChannel(), sender + " has just signed my death sentence."); send(getChannel(), sender + " has just signed my death sentence.");
saveEntries(true); saveEntries(true);
sleep(3); sleep(3);
this.quitServer("The Bot Is Out There!"); quitServer("The Bot Is Out There!");
System.exit(0); System.exit(0);
} }
} }
@ -1575,9 +1667,9 @@ public class Mobibot extends PircBot
{ {
send(getChannel(), sender + " has just asked me to leave. I'll be back!"); send(getChannel(), sender + " has just asked me to leave. I'll be back!");
sleep(0); sleep(0);
this.partChannel(getChannel()); partChannel(getChannel());
sleep(5); sleep(5);
this.joinChannel(getChannel()); joinChannel(getChannel());
} }
else if (cmd.equals(RECAP_CMD)) else if (cmd.equals(RECAP_CMD))
{ {
@ -1613,7 +1705,7 @@ public class Mobibot extends PircBot
{ {
if (isOp(sender)) if (isOp(sender))
{ {
this.changeNick(args); changeNick(args);
} }
} }
else if (cmd.startsWith(SAY_CMD)) else if (cmd.startsWith(SAY_CMD))
@ -1746,6 +1838,19 @@ public class Mobibot extends PircBot
return buff.toString(); return buff.toString();
} }
/**
* Build an entry's tags/categories for diplay on the channel.
*
* @param entryIndex The entry's index.
* @param entry The {@link EntryLink entry} object.
*
* @return The entry's tags.
*/
private static String buildTags(int entryIndex, EntryLink entry)
{
return (LINK_CMD + (entryIndex + 1) + "T: " + entry.getDeliciousTags());
}
/** /**
* Ensures that the given location (File/URL) has a trailing slash (<code>/</code>) to indicate a directory. * Ensures that the given location (File/URL) has a trailing slash (<code>/</code>) to indicate a directory.
* *
@ -2123,7 +2228,7 @@ public class Mobibot extends PircBot
*/ */
private boolean isOp(String sender) private boolean isOp(String sender)
{ {
final User[] users = this.getUsers(getChannel()); final User[] users = getUsers(getChannel());
User user; User user;
@ -2153,10 +2258,10 @@ public class Mobibot extends PircBot
{ {
_history.clear(); _history.clear();
SyndFeedInput input = new SyndFeedInput(); final SyndFeedInput input = new SyndFeedInput();
SyndFeed feed = input.build(new InputStreamReader(new FileInputStream(new File(file)))); final SyndFeed feed = input.build(new InputStreamReader(new FileInputStream(new File(file))));
List items = feed.getEntries(); final List items = feed.getEntries();
SyndEntry item; SyndEntry item;
for (int i = items.size() - 1; i >= 0; i--) for (int i = items.size() - 1; i >= 0; i--)
@ -2179,12 +2284,12 @@ public class Mobibot extends PircBot
{ {
_entries.clear(); _entries.clear();
SyndFeedInput input = new SyndFeedInput(); final SyndFeedInput input = new SyndFeedInput();
SyndFeed feed = input.build(new InputStreamReader(new FileInputStream(new File(file)))); final SyndFeed feed = input.build(new InputStreamReader(new FileInputStream(new File(file))));
setToday(ISO_SDF.format(feed.getPublishedDate())); setToday(ISO_SDF.format(feed.getPublishedDate()));
List items = feed.getEntries(); final List items = feed.getEntries();
SyndEntry item; SyndEntry item;
SyndContent description; SyndContent description;
String[] comments; String[] comments;
@ -2196,7 +2301,8 @@ public class Mobibot extends PircBot
{ {
item = (SyndEntryImpl) items.get(i); item = (SyndEntryImpl) items.get(i);
author = item.getAuthor().substring(item.getAuthor().lastIndexOf('(') + 1, item.getAuthor().length() - 1); author = item.getAuthor().substring(item.getAuthor().lastIndexOf('(') + 1, item.getAuthor().length() - 1);
entry = new EntryLink(item.getLink(), item.getTitle(), author, item.getPublishedDate()); entry = new EntryLink(item.getLink(), item.getTitle(), author, getChannel(), item.getPublishedDate(),
item.getCategories());
description = item.getDescription(); description = item.getDescription();
comments = description.getValue().split("<br/>"); comments = description.getValue().split("<br/>");
@ -2274,19 +2380,6 @@ public class Mobibot extends PircBot
} }
/**
* Returns he del.icio.us extended attribution line.
*
* @param entry The entry.
* @param channel The channel
*
* @return The extended attribution line.
*/
private String postedBy(EntryLink entry, String channel)
{
return "Posted by " + entry.getNick() + " on " + channel + " (" + _ircServer + ')';
}
/** /**
* Stores the last 10 public messages and actions. * Stores the last 10 public messages and actions.
* *
@ -2350,7 +2443,7 @@ public class Mobibot extends PircBot
EntryLink entry; EntryLink entry;
StringBuffer buff; StringBuffer buff;
EntryComment comment; EntryComment comment;
final List items = new ArrayList(); final List items = new ArrayList(0);
SyndEntry item; SyndEntry item;
SyndContent description; SyndContent description;
@ -2385,6 +2478,7 @@ public class Mobibot extends PircBot
item.setTitle(entry.getTitle()); item.setTitle(entry.getTitle());
item.setPublishedDate(entry.getDate()); item.setPublishedDate(entry.getDate());
item.setAuthor(getChannel().substring(1) + '@' + _ircServer + " (" + entry.getNick() + ')'); item.setAuthor(getChannel().substring(1) + '@' + _ircServer + " (" + entry.getNick() + ')');
item.setCategories(entry.getTags());
items.add(item); items.add(item);
} }
@ -2490,6 +2584,17 @@ public class Mobibot extends PircBot
_backlogsURL = backlogsURL; _backlogsURL = backlogsURL;
} }
/**
* Sets the del.icio.us authentication.
*
* @param username The del.icio.us username.
* @param password The del.icio.us password.
*/
private void setDeliciousAuth(String username, String password)
{
_delicious = new DeliciousPoster(username, password, _ircServer);
}
/** /**
* Sets the feed URL. * Sets the feed URL.
* *
@ -2528,6 +2633,16 @@ public class Mobibot extends PircBot
} }
} }
/**
* Sets the default tags/categories.
*
* @param tags The tags.
*/
private void setTags(String tags)
{
_defaultTags = tags;
}
/** /**
* Set today's date. * Set today's date.
* *
@ -2648,7 +2763,7 @@ public class Mobibot extends PircBot
*/ */
private void usersResponse(String sender, boolean isPrivate) private void usersResponse(String sender, boolean isPrivate)
{ {
final User[] users = this.getUsers(getChannel()); final User[] users = getUsers(getChannel());
final String[] nicks = new String[users.length]; final String[] nicks = new String[users.length];
for (int i = 0; i < users.length; i++) for (int i = 0; i < users.length; i++)

View file

@ -1,5 +1,5 @@
/* Created by JReleaseInfo AntTask from Open Source Competence Group */ /* Created by JReleaseInfo AntTask from Open Source Competence Group */
/* Creation date Sun Mar 06 13:05:37 PST 2005 */ /* Creation date Thu May 05 12:13:41 PDT 2005 */
package net.thauvin.erik.mobibot; package net.thauvin.erik.mobibot;
import java.util.Date; import java.util.Date;
@ -12,21 +12,21 @@ import java.util.Date;
public class ReleaseInfo { public class ReleaseInfo {
/** buildDate (set during build process to 1110143137218L). */ /** buildDate (set during build process to 1115320421004L). */
private static Date buildDate = new Date(1110143137218L); private static Date buildDate = new Date(1115320421004L);
/** /**
* Get buildDate (set during build process to Sun Mar 06 13:05:37 PST 2005). * Get buildDate (set during build process to Thu May 05 12:13:41 PDT 2005).
* @return Date buildDate * @return Date buildDate
*/ */
public static final Date getBuildDate() { return buildDate; } public static final Date getBuildDate() { return buildDate; }
/** /**
* Get buildNumber (set during build process to 3). * Get buildNumber (set during build process to 26).
* @return int buildNumber * @return int buildNumber
*/ */
public static final int getBuildNumber() { return 3; } public static final int getBuildNumber() { return 26; }
/** version (set during build process to "0.3"). */ /** version (set during build process to "0.3"). */

View file

@ -47,7 +47,6 @@ import java.io.IOException;
* *
* @author Erik C. Thauvin * @author Erik C. Thauvin
* @version $Revision$, $Date$ * @version $Revision$, $Date$
*
* @created Feb 7, 2004 * @created Feb 7, 2004
* @since 1.0 * @since 1.0
*/ */
@ -95,8 +94,8 @@ public class StockQuote implements Runnable
try try
{ {
final HttpClient client = new HttpClient(); final HttpClient client = new HttpClient();
client.setConnectionTimeout(Mobibot.CONNECT_TIMEOUT); client.getHttpConnectionManager().getParams().setConnectionTimeout(Mobibot.CONNECT_TIMEOUT);
client.setTimeout(Mobibot.CONNECT_TIMEOUT); client.getHttpConnectionManager().getParams().setSoTimeout(Mobibot.CONNECT_TIMEOUT);
final GetMethod getMethod = new GetMethod(YAHOO_URL + _symbol.toUpperCase()); final GetMethod getMethod = new GetMethod(YAHOO_URL + _symbol.toUpperCase());
client.executeMethod(getMethod); client.executeMethod(getMethod);
@ -108,8 +107,7 @@ public class StockQuote implements Runnable
if ((quote.length > 3) && (!"\"N/A\"".equalsIgnoreCase(quote[3]))) if ((quote.length > 3) && (!"\"N/A\"".equalsIgnoreCase(quote[3])))
{ {
_bot.send(_bot.getChannel(), _bot.send(_bot.getChannel(),
"Symbol: " + quote[0].replaceAll("\"", "") + " [" + quote[1].replaceAll("\"", "") + "Symbol: " + quote[0].replaceAll("\"", "") + " [" + quote[1].replaceAll("\"", "") + ']');
']');
if (quote.length > 5) if (quote.length > 5)
{ {