Menu

#39 Synchronize properties/arguments

2.1.0rc2-RELEASE
open
nobody
None
1
2013-02-09
2013-01-18
christian
No

It would be a great thing if you could synchronize commandLine args and webharvest.properties. It is a bit painful to have the settings in a file for the development gui and to pass all settings to command line as arguments in batch mode.

Discussion

  • Piotr Dyraga

    Piotr Dyraga - 2013-01-21
    • milestone: 2.1.0rc1-RELEASE --> 2.1.0rc2-RELEASE
     
  • christian

    christian - 2013-01-22

    I have completely rewritten the CommandLine class. CommandLine is now using the very same settings the GUI is using (overridden by command line args). Parameters syntax is also more common sense now, since I have introduced apache commons cli. I have also changed everything from properties to jconfig files. Please check this patch.

     
  • christian

    christian - 2013-02-09

    I have now made all the settings suff more "guicy". Check out that I have moved all the settings to core. When someone develops plugins it is much more easy to get the right classpath dependecy otherwise you always have a cyclic dependecy!

    Anyway check out:
    /webharvest-core/src/main/java/org/webharvest/RuntimeSettings.java
    /webharvest-core/src/main/java/org/webharvest/RuntimeSettingsProvider.java
    /webharvest-core/src/main/java/org/webharvest/ioc/ScraperModule.java

    /webharvest-ide/src/main/java/org/webharvest/ApplicationInfo.java
    /webharvest-ide/src/main/java/org/webharvest/CommandLine.java
    /webharvest-ide/src/main/java/org/webharvest/gui/Ide.java
    /webharvest-ide/src/main/java/org/webharvest/gui/Settings.java

    Now not only any setting can be synced between console and gui mode, you also can get any runtime setting in a plugin by just injecting the runtime settings

    @Inject
    RuntimeSettings settings;

    It is still not perfect but much more comfortable in usage!

     

Log in to post a comment.