The properties file can now be specified from the command line.
This commit is contained in:
parent
8b44a73d4d
commit
cd36c7a221
4 changed files with 221 additions and 227 deletions
BIN
lib/commons-cli-1.0.jar
Normal file
BIN
lib/commons-cli-1.0.jar
Normal file
Binary file not shown.
|
@ -144,6 +144,15 @@
|
||||||
<SOURCES />
|
<SOURCES />
|
||||||
</library>
|
</library>
|
||||||
</orderEntry>
|
</orderEntry>
|
||||||
|
<orderEntry type="module-library">
|
||||||
|
<library>
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$MODULE_DIR$/lib/commons-cli-1.0.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</orderEntry>
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
|
178
mobibot.iws
178
mobibot.iws
|
@ -65,7 +65,7 @@
|
||||||
<option name="PUT_FOCUS_INTO_COMMENT" value="false" />
|
<option name="PUT_FOCUS_INTO_COMMENT" value="false" />
|
||||||
<option name="SHOW_CHECKIN_OPTIONS" value="true" />
|
<option name="SHOW_CHECKIN_OPTIONS" value="true" />
|
||||||
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
|
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="" />
|
<option name="LAST_COMMIT_MESSAGE" value="The weather command help is now returned when a station id is not specified." />
|
||||||
<option name="SAVE_LAST_COMMIT_MESSAGE" value="true" />
|
<option name="SAVE_LAST_COMMIT_MESSAGE" value="true" />
|
||||||
<option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" />
|
<option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" />
|
||||||
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
|
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
|
||||||
|
@ -105,70 +105,22 @@
|
||||||
<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/Mobibot.java">
|
<first-group selected-file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/CurrencyConverter.java">
|
||||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/CurrencyConverter.java" pinned="false">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state line="66" column="13" selection-start="2138" selection-end="2138" vertical-scroll-proportion="1.518732">
|
|
||||||
<folding>
|
|
||||||
<element signature="imports" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/EntryComment.java" pinned="false">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state line="45" column="66" selection-start="1803" selection-end="1803" vertical-scroll-proportion="0.4364641">
|
|
||||||
<folding>
|
|
||||||
<element signature="imports" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/EntryLink.java" pinned="false">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state line="47" column="40" selection-start="1825" selection-end="1825" vertical-scroll-proportion="0.160221">
|
|
||||||
<folding>
|
|
||||||
<element signature="imports" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</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="64" column="13" selection-start="2145" selection-end="2145" vertical-scroll-proportion="0.6023055">
|
|
||||||
<folding>
|
|
||||||
<element signature="imports" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/GoogleSearch.java" pinned="false">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state line="54" column="13" selection-start="1958" selection-end="1958" vertical-scroll-proportion="0.6023055">
|
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</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="1441" column="47" selection-start="37111" selection-end="37111" vertical-scroll-proportion="67.129684">
|
<state line="1411" column="63" selection-start="36710" selection-end="36710" vertical-scroll-proportion="0.39086294">
|
||||||
<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/StockQuote.java" pinned="false">
|
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/CurrencyConverter.java" pinned="false">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state line="53" column="13" selection-start="1948" selection-end="1948" vertical-scroll-proportion="0.5821326">
|
<state line="63" column="13" selection-start="2158" selection-end="2158" vertical-scroll-proportion="0.80541456">
|
||||||
<folding />
|
<folding>
|
||||||
</state>
|
<element signature="imports" expanded="true" />
|
||||||
</provider>
|
</folding>
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Weather.java" pinned="false">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state line="54" column="13" selection-start="1981" selection-end="1981" vertical-scroll-proportion="0.556196">
|
|
||||||
<folding />
|
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
@ -187,23 +139,23 @@
|
||||||
</component>
|
</component>
|
||||||
<component name="J2EEProjectPane" />
|
<component name="J2EEProjectPane" />
|
||||||
<component name="PackagesPane">
|
<component name="PackagesPane">
|
||||||
<expanded_node url="net" module="mobibot" type="package" />
|
|
||||||
<expanded_node url="net.thauvin.erik.mobibot" module="mobibot" type="package" />
|
|
||||||
<expanded_node url="" module="mobibot" type="module" />
|
<expanded_node url="" module="mobibot" type="module" />
|
||||||
<expanded_node url="net.thauvin.erik" module="mobibot" type="package" />
|
|
||||||
<expanded_node url="net.thauvin" module="mobibot" type="package" />
|
<expanded_node url="net.thauvin" module="mobibot" type="package" />
|
||||||
|
<expanded_node url="net" module="mobibot" type="package" />
|
||||||
|
<expanded_node url="net.thauvin.erik" module="mobibot" type="package" />
|
||||||
|
<expanded_node url="net.thauvin.erik.mobibot" module="mobibot" type="package" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectPane">
|
<component name="ProjectPane">
|
||||||
<expanded_node url="file://$PROJECT_DIR$/src/net/thauvin/erik" module="mobibot" type="directory" />
|
|
||||||
<expanded_node url="file://$PROJECT_DIR$/src/net/thauvin" module="mobibot" type="directory" />
|
|
||||||
<expanded_node url="file://$PROJECT_DIR$/src/net" module="mobibot" type="directory" />
|
<expanded_node url="file://$PROJECT_DIR$/src/net" module="mobibot" type="directory" />
|
||||||
|
<expanded_node url="file://$PROJECT_DIR$/src/net/thauvin" 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="file://$PROJECT_DIR$/src/net/thauvin/erik" module="mobibot" type="directory" />
|
||||||
<expanded_node url="file://$PROJECT_DIR$/src" module="mobibot" type="directory" />
|
<expanded_node url="file://$PROJECT_DIR$/src" module="mobibot" type="directory" />
|
||||||
<expanded_node url="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot" 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" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectView">
|
<component name="ProjectView">
|
||||||
<navigator currentView="ProjectPane" splitterProportion="0.5">
|
<navigator currentView="PackagesPane" splitterProportion="0.5">
|
||||||
<flattenPackages />
|
<flattenPackages />
|
||||||
<showMembers />
|
<showMembers />
|
||||||
<showModules />
|
<showModules />
|
||||||
|
@ -272,7 +224,7 @@
|
||||||
<configuration name="Mobibot" type="Application" default="false" selected="true">
|
<configuration name="Mobibot" type="Application" default="false" selected="true">
|
||||||
<option name="MAIN_CLASS_NAME" value="net.thauvin.erik.mobibot.Mobibot" />
|
<option name="MAIN_CLASS_NAME" value="net.thauvin.erik.mobibot.Mobibot" />
|
||||||
<option name="VM_PARAMETERS" value="" />
|
<option name="VM_PARAMETERS" value="" />
|
||||||
<option name="PROGRAM_PARAMETERS" value="-debug" />
|
<option name="PROGRAM_PARAMETERS" value="--debug" />
|
||||||
<option name="WORKING_DIRECTORY" value="D:\projects\java\mobibot" />
|
<option name="WORKING_DIRECTORY" value="D:\projects\java\mobibot" />
|
||||||
<module name="mobibot" />
|
<module name="mobibot" />
|
||||||
</configuration>
|
</configuration>
|
||||||
|
@ -328,18 +280,18 @@
|
||||||
</todo-panel>
|
</todo-panel>
|
||||||
</component>
|
</component>
|
||||||
<component name="ToolWindowManager">
|
<component name="ToolWindowManager">
|
||||||
<frame x="-4" y="-4" width="1032" height="776" extended-state="0" />
|
<frame x="-4" y="-4" width="1032" height="776" extended-state="6" />
|
||||||
<editor active="false" />
|
<editor active="true" />
|
||||||
<layout>
|
<layout>
|
||||||
<window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="8" />
|
<window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33024693" 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="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25918368" order="0" />
|
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.18571429" order="0" />
|
||||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33024693" order="1" />
|
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33024693" order="1" />
|
||||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.16836734" order="1" />
|
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.22857143" order="1" />
|
||||||
<window_info id="Messages" active="true" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.33024693" order="9" />
|
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33024693" order="9" />
|
||||||
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.39969134" order="6" />
|
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.39969134" order="6" />
|
||||||
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.08265306" order="1" />
|
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.10612245" order="1" />
|
||||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="true" internal_type="docked" type="docked" visible="false" weight="0.39660493" 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.39660493" 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" />
|
||||||
|
@ -460,32 +412,9 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="jar://$PROJECT_DIR$/lib/pircbot.jar!/org/jibble/pircbot/InputThread.class">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state line="24" column="0" selection-start="760" selection-end="760" vertical-scroll-proportion="1.2615894">
|
|
||||||
<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="372" column="24" selection-start="12156" selection-end="12156" vertical-scroll-proportion="0.33274648">
|
|
||||||
<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="66" column="13" selection-start="2138" selection-end="2138" vertical-scroll-proportion="1.518732">
|
|
||||||
<folding>
|
|
||||||
<element signature="imports" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</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="45" column="66" selection-start="1803" selection-end="1803" vertical-scroll-proportion="0.4364641">
|
<state line="45" column="66" selection-start="1862" selection-end="1862" vertical-scroll-proportion="0.30357143">
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="imports" expanded="true" />
|
<element signature="imports" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
|
@ -494,25 +423,7 @@
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/EntryLink.java">
|
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/EntryLink.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state line="47" column="40" selection-start="1825" selection-end="1825" vertical-scroll-proportion="0.160221">
|
<state line="47" column="40" selection-start="1881" selection-end="1881" vertical-scroll-proportion="0.21651377">
|
||||||
<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="64" column="13" selection-start="2145" selection-end="2145" vertical-scroll-proportion="0.6023055">
|
|
||||||
<folding>
|
|
||||||
<element signature="imports" expanded="true" />
|
|
||||||
</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="1441" column="47" selection-start="37111" selection-end="37111" vertical-scroll-proportion="67.129684">
|
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="imports" expanded="true" />
|
<element signature="imports" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
|
@ -521,22 +432,51 @@
|
||||||
</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="53" column="13" selection-start="1948" selection-end="1948" vertical-scroll-proportion="0.5821326">
|
<state line="38" column="0" selection-start="1706" selection-end="1706" vertical-scroll-proportion="0.09357798">
|
||||||
|
<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="64" column="13" selection-start="2234" selection-end="2234" vertical-scroll-proportion="-0.89724773">
|
||||||
|
<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="54" column="13" selection-start="2049" selection-end="2049" vertical-scroll-proportion="-2.7155964">
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Weather.java">
|
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Weather.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state line="54" column="13" selection-start="1981" selection-end="1981" vertical-scroll-proportion="0.556196">
|
<state line="175" column="56" selection-start="4795" selection-end="4795" vertical-scroll-proportion="0.7614679">
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/GoogleSearch.java">
|
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Mobibot.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state line="54" column="13" selection-start="1958" selection-end="1958" vertical-scroll-proportion="0.6023055">
|
<state line="1411" column="63" selection-start="36710" selection-end="36710" vertical-scroll-proportion="0.39086294">
|
||||||
<folding />
|
<folding>
|
||||||
|
<element signature="imports" expanded="true" />
|
||||||
|
</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="2158" selection-end="2158" vertical-scroll-proportion="0.80541456">
|
||||||
|
<folding>
|
||||||
|
<element signature="imports" expanded="true" />
|
||||||
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
|
|
@ -41,6 +41,7 @@ import com.primalworld.math.MathEvaluator;
|
||||||
import com.rsslibj.elements.Channel;
|
import com.rsslibj.elements.Channel;
|
||||||
import com.rsslibj.elements.Item;
|
import com.rsslibj.elements.Item;
|
||||||
|
|
||||||
|
import org.apache.commons.cli.*;
|
||||||
import org.apache.commons.logging.impl.Log4JLogger;
|
import org.apache.commons.logging.impl.Log4JLogger;
|
||||||
import org.apache.commons.net.WhoisClient;
|
import org.apache.commons.net.WhoisClient;
|
||||||
|
|
||||||
|
@ -79,14 +80,24 @@ public class Mobibot extends PircBot
|
||||||
*/
|
*/
|
||||||
private static final String[] INFO_STRS =
|
private static final String[] INFO_STRS =
|
||||||
{
|
{
|
||||||
"Mobibot v0.1.2 by Erik C. Thauvin (erik@thauvin.net)",
|
"Mobibot v0.1.3b1 by Erik C. Thauvin (erik@thauvin.net)",
|
||||||
"<http://www.thauvin.net/mobitopia/mobibot/>"
|
"<http://www.thauvin.net/mobitopia/mobibot/>"
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Debug command line argument.
|
* Debug command line argument.
|
||||||
*/
|
*/
|
||||||
private static final String DEBUG_ARG = "-debug";
|
private static final String DEBUG_ARG = "debug";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Help command line argument.
|
||||||
|
*/
|
||||||
|
private static final String HELP_ARG = "help";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Properties command line argument.
|
||||||
|
*/
|
||||||
|
private static final String PROPS_ARG = "properties";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The object serialization file where data is saved between launches.
|
* The object serialization file where data is saved between launches.
|
||||||
|
@ -478,13 +489,41 @@ public class Mobibot extends PircBot
|
||||||
* @param args The command line arguments.
|
* @param args The command line arguments.
|
||||||
*/
|
*/
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
// Setup the command line options
|
||||||
|
final Options options = new Options();
|
||||||
|
options.addOption(HELP_ARG.substring(0,1), HELP_ARG, false, "print this help message");
|
||||||
|
options.addOption(DEBUG_ARG.substring(0,1), DEBUG_ARG, false, "print debug & logging data directly to the console");
|
||||||
|
options.addOption(PROPS_ARG.substring(0,1), PROPS_ARG, true, "use alternate properties file");
|
||||||
|
|
||||||
|
// Parse the command line
|
||||||
|
final CommandLineParser parser = new PosixParser();
|
||||||
|
CommandLine line = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
line = parser.parse(options, args);
|
||||||
|
}
|
||||||
|
catch (ParseException e)
|
||||||
|
{
|
||||||
|
System.err.println("CLI Parsing failed. Reason: " + e.getMessage());
|
||||||
|
e.printStackTrace(System.err);
|
||||||
|
System.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (line.hasOption(HELP_ARG.charAt(0)))
|
||||||
|
{
|
||||||
|
// Output the usage
|
||||||
|
new HelpFormatter().printHelp(Mobibot.class.getName(), options);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
FileInputStream fis = null;
|
FileInputStream fis = null;
|
||||||
final Properties p = new Properties();
|
final Properties p = new Properties();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
fis = new FileInputStream(new File("./mobibot.properties"));
|
fis = new FileInputStream(new File(line.getOptionValue(PROPS_ARG.charAt(0), "./mobibot.properties")));
|
||||||
|
|
||||||
// Load the properties files
|
// Load the properties files
|
||||||
p.load(fis);
|
p.load(fis);
|
||||||
|
@ -522,15 +561,15 @@ public class Mobibot extends PircBot
|
||||||
final String nickname = p.getProperty("nick", Mobibot.class.getName().toLowerCase());
|
final String nickname = p.getProperty("nick", Mobibot.class.getName().toLowerCase());
|
||||||
final String logsDir = ensureDir(p.getProperty("logs", "."), false);
|
final String logsDir = ensureDir(p.getProperty("logs", "."), false);
|
||||||
|
|
||||||
if ((args.length == 0) || !DEBUG_ARG.equals(args[0]))
|
if (!line.hasOption(DEBUG_ARG.charAt(0)))
|
||||||
{
|
{
|
||||||
// Redirect the stdout and stderr
|
// Redirect the stdout and stderr
|
||||||
PrintStream stdout = null;
|
PrintStream stdout = null;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
stdout = new PrintStream(new FileOutputStream(logsDir + channel.substring(1) + '.' + today() + ".log",
|
stdout = new PrintStream(new FileOutputStream(logsDir + channel.substring(1) + '.' + today() +
|
||||||
true));
|
".log", true));
|
||||||
}
|
}
|
||||||
catch (IOException e)
|
catch (IOException e)
|
||||||
{
|
{
|
||||||
|
@ -613,7 +652,8 @@ public class Mobibot extends PircBot
|
||||||
{
|
{
|
||||||
if (retries == MAX_RECONNECT)
|
if (retries == MAX_RECONNECT)
|
||||||
{
|
{
|
||||||
System.err.println("Unable to connect to " + server + " after " + MAX_RECONNECT + " retries.");
|
System.err.println("Unable to connect to " + server + " after " + MAX_RECONNECT +
|
||||||
|
" retries.");
|
||||||
e.printStackTrace(System.err);
|
e.printStackTrace(System.err);
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
|
@ -624,6 +664,7 @@ public class Mobibot extends PircBot
|
||||||
bot.setVersion(INFO_STRS[0]);
|
bot.setVersion(INFO_STRS[0]);
|
||||||
bot.joinChannel(channel);
|
bot.joinChannel(channel);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts XML/XHTML entities to plain text.
|
* Converts XML/XHTML entities to plain text.
|
||||||
|
@ -872,7 +913,8 @@ public class Mobibot extends PircBot
|
||||||
this.sendNotice(sender,
|
this.sendNotice(sender,
|
||||||
DOUBLE_INDENT + Colors.BOLD + getNick() + ": " + WEATHER_CMD + Colors.BOLD +
|
DOUBLE_INDENT + Colors.BOLD + getNick() + ": " + WEATHER_CMD + Colors.BOLD +
|
||||||
" [<station id>]");
|
" [<station id>]");
|
||||||
this.sendNotice(sender, "For a listing of the ICAO station IDs, please visit: <" + Weather.STATIONS_URL + '>');
|
this.sendNotice(sender,
|
||||||
|
"For a listing of the ICAO station IDs, please visit: <" + Weather.STATIONS_URL + '>');
|
||||||
}
|
}
|
||||||
else if (lcmd.endsWith(USERS_CMD))
|
else if (lcmd.endsWith(USERS_CMD))
|
||||||
{
|
{
|
||||||
|
@ -974,6 +1016,8 @@ public class Mobibot extends PircBot
|
||||||
{
|
{
|
||||||
setVersion(_weblogURL);
|
setVersion(_weblogURL);
|
||||||
|
|
||||||
|
sleep(5);
|
||||||
|
|
||||||
// Connect
|
// Connect
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -2138,6 +2182,7 @@ public class Mobibot extends PircBot
|
||||||
return ISO_SDF.format(Calendar.getInstance().getTime());
|
return ISO_SDF.format(Calendar.getInstance().getTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Responds with the users on a channel.
|
* Responds with the users on a channel.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue