Changeset 4342

Show
Ignore:
Timestamp:
03/08/09 17:49:12 (4 years ago)
Author:
gpolo
Message:

Merged revisions 4302,4326,4328-4329,4331,4336-4341 via svnmerge from
http://svn.umitproject.org/svnroot/umit/trunk

................

r4302 | gpolo | 2009-03-06 18:34:39 -0300 (Fri, 06 Mar 2009) | 3 lines


Initialized merge tracking via "svnmerge" with revisions "1-4301" from
http://svn.umitproject.org/svnroot/umit/branch/sphinxdoc

................

r4326 | gpolo | 2009-03-08 09:29:15 -0300 (Sun, 08 Mar 2009) | 1 line


Removed trailing whitespaces.

................

r4328 | gpolo | 2009-03-08 09:36:59 -0300 (Sun, 08 Mar 2009) | 1 line


Fixed ticket #238: assume the process is still running if an error different than "No such process" is returned.

................

r4329 | gpolo | 2009-03-08 09:49:58 -0300 (Sun, 08 Mar 2009) | 95 lines


Merged revisions 4303-4305,4307-4325 via svnmerge from
http://svn.umitproject.org/svnroot/umit/branch/sphinxdoc


........

r4303 | gpolo | 2009-03-06 18:39:43 -0300 (Fri, 06 Mar 2009) | 1 line


Added the src directory for holding the rst files.

........

r4304 | gpolo | 2009-03-06 21:47:30 -0300 (Fri, 06 Mar 2009) | 4 lines


  • Started moving the current documentation to reStructuredText;
  • Created a Makefile for building the new documentation using sphinx (only supports html right now).

........

r4305 | gpolo | 2009-03-06 22:02:30 -0300 (Fri, 06 Mar 2009) | 1 line


Moved nisearch to .rst

........

r4307 | gpolo | 2009-03-07 10:18:45 -0300 (Sat, 07 Mar 2009) | 1 line


Converted scheduler documentation to rst, adjusted index to a max depth of 2.

........

r4308 | gpolo | 2009-03-07 10:24:01 -0300 (Sat, 07 Mar 2009) | 1 line


Minor adjust.

........

r4309 | gpolo | 2009-03-07 12:19:46 -0300 (Sat, 07 Mar 2009) | 1 line


Converted smtpsetup to rst.

........

r4310 | gpolo | 2009-03-07 12:20:08 -0300 (Sat, 07 Mar 2009) | 1 line


Forgot to remove the old smtpsetup.html

........

r4311 | gpolo | 2009-03-07 12:30:47 -0300 (Sat, 07 Mar 2009) | 1 line


Added a favicon.

........

r4312 | gpolo | 2009-03-07 12:43:04 -0300 (Sat, 07 Mar 2009) | 1 line


Moved searching to rst.

........

r4313 | gpolo | 2009-03-07 13:04:31 -0300 (Sat, 07 Mar 2009) | 1 line


Moved under_the_roof documentation to rst.

........

r4314 | gpolo | 2009-03-07 13:44:53 -0300 (Sat, 07 Mar 2009) | 1 line


Converted comparing_results to rst.

........

r4315 | gpolo | 2009-03-07 15:36:56 -0300 (Sat, 07 Mar 2009) | 1 line


Moved nse_facilitator and wizard to rst.

........

r4316 | gpolo | 2009-03-07 15:56:25 -0300 (Sat, 07 Mar 2009) | 1 line


Moved scanning to rst.

........

r4317 | gpolo | 2009-03-07 17:20:30 -0300 (Sat, 07 Mar 2009) | 1 line


Removing old Makefile.

........

r4318 | gpolo | 2009-03-07 17:20:56 -0300 (Sat, 07 Mar 2009) | 1 line


Renamed Makefile-sphinx to Makefile.

........

r4319 | gpolo | 2009-03-07 17:36:20 -0300 (Sat, 07 Mar 2009) | 1 line


Minor tweaks.

........

r4320 | gpolo | 2009-03-07 20:00:27 -0300 (Sat, 07 Mar 2009) | 1 line


Rewording and some reformatting.

........

r4321 | luis | 2009-03-08 08:35:04 -0300 (Sun, 08 Mar 2009) | 1 line


Convert Profile Editor Documentation to RST format

........

r4322 | luis | 2009-03-08 09:00:08 -0300 (Sun, 08 Mar 2009) | 1 line


Remove older format of Profile Editor documentation

........

r4323 | gpolo | 2009-03-08 09:14:12 -0300 (Sun, 08 Mar 2009) | 1 line


Misc rewording.

........

r4324 | gpolo | 2009-03-08 09:25:29 -0300 (Sun, 08 Mar 2009) | 1 line


Removed trailling whitespaces from profile_editor, some relayout, minor fixes.

........

r4325 | gpolo | 2009-03-08 09:25:51 -0300 (Sun, 08 Mar 2009) | 1 line


screenshots dir is gone

........

................

r4331 | gpolo | 2009-03-08 09:53:41 -0300 (Sun, 08 Mar 2009) | 3 lines


Removed merge tracking for "svnmerge" for
http://svn.umitproject.org/svnroot/umit/branch/sphinxdoc

................

r4336 | gpolo | 2009-03-08 10:49:27 -0300 (Sun, 08 Mar 2009) | 1 line


Adjusted installer and paths to use the new documentation.

................

r4337 | gpolo | 2009-03-08 11:01:21 -0300 (Sun, 08 Mar 2009) | 1 line


Fixed ticket #240: Check for errors before continue the process of stopping the scheduler.

................

r4338 | gpolo | 2009-03-08 11:19:01 -0300 (Sun, 08 Mar 2009) | 1 line


Fixed old references to the documentation.

................

r4339 | gpolo | 2009-03-08 11:22:27 -0300 (Sun, 08 Mar 2009) | 1 line


Shortened NI titles.

................

r4340 | gpolo | 2009-03-08 14:16:56 -0300 (Sun, 08 Mar 2009) | 1 line


Adjusted for sdist.

................

r4341 | gpolo | 2009-03-08 14:18:10 -0300 (Sun, 08 Mar 2009) | 1 line


Adjusted documentation paths.

................

Location:
branch/NetworkInventory
Files:
23 removed
12 modified
24 copied

Legend:

Unmodified
Added
Removed
  • branch/NetworkInventory

    • Property svnmerge-integrated changed from /trunk:1-560,563-566,574,577-597,599-615,617-618,620-635,641-648,651,653-662,666-667,669-764,766-845,848-964,966-1038,1041,1047-1059,1070-1103,1113-1119,1139,1156-1187,1189,1196-1202,1206-1223,1225-1241,1244-1248,1251-1258,1260-1274,1276-1279,1281,1283-1284,1290-1295,1297-1305,1307-1308,1310-1311,1313-1322,1326,1328-1333,1335,1337-1397,1399-1418,1420-3939,3941-3945,3948-3952,3955-3978,3980-4122,4124-4299 to /trunk:1-560,563-566,574,577-597,599-615,617-618,620-635,641-648,651,653-662,666-667,669-764,766-845,848-964,966-1038,1041,1047-1059,1070-1103,1113-1119,1139,1156-1187,1189,1196-1202,1206-1223,1225-1241,1244-1248,1251-1258,1260-1274,1276-1279,1281,1283-1284,1290-1295,1297-1305,1307-1308,1310-1311,1313-1322,1326,1328-1333,1335,1337-1397,1399-1418,1420-3939,3941-3945,3948-3952,3955-3978,3980-4122,4124-4341
  • branch/NetworkInventory/MANIFEST.in

    r4333 r4342  
    11include bin/umit bin/umit_scheduler.py README 
    22include COPYING COPYING_HIGWIDGETS COPYING_NMAP COPYING_WINPCAP 
     3include share/doc/umit/umit.1 share/doc/umit/Makefile 
    34recursive-include share/pixmaps/umit *.png *.svg *.xpm umit.opf umit.opt 
    45recursive-include share/icons/umit *.ico 
    56recursive-include share/locale umit.mo *.po 
    6 recursive-include share/doc/umit *.html *.xml umit.1 
    7 recursive-include share/doc/umit/screenshots *.png 
     7recursive-include share/doc/umit/src * 
    88recursive-include share/umit/config *.xml *.conf *.usp umit_version *.db *.log 
    99recursive-include share/umit/misc *.dmp 
  • branch/NetworkInventory/install_scripts/common.py

    r4278 r4342  
    1414LOCALE_DIR = os.path.join('share', 'locale') 
    1515CONFIG_DIR = os.path.join('share', 'umit', 'config') 
    16 DOCS_DIR = os.path.join('share', 'doc', 'umit') 
     16BASE_DOCS_DIR = os.path.join('share', 'doc', 'umit') 
     17DOCS_DIR = os.path.join(BASE_DOCS_DIR, 'html') 
    1718MISC_DIR = os.path.join('share', 'umit', 'misc') 
    1819SQL_DIR = os.path.join('share', 'umit', 'sql') 
  • branch/NetworkInventory/setup.py

    r4333 r4342  
    3737 
    3838from install_scripts.common import BIN_DIRNAME, PIXMAPS_DIR, ICONS_DIR, \ 
    39         DOCS_DIR, LOCALE_DIR, CONFIG_DIR, MISC_DIR, SQL_DIR 
     39        BASE_DOCS_DIR, DOCS_DIR, LOCALE_DIR, CONFIG_DIR, MISC_DIR, SQL_DIR 
    4040 
    4141py2exe_cmdclass = py2exe_options = py2app_options = None 
     
    121121            glob(os.path.join(ICONS_DIR, '*.png'))), 
    122122 
     123        # Documentation 
    123124        (DOCS_DIR, 
    124125            glob(os.path.join(DOCS_DIR, '*.html')) + 
    125             glob(os.path.join(DOCS_DIR, 'comparing_results', '*.xml')) + 
    126             glob(os.path.join(DOCS_DIR, 'profile_editor', '*.xml')) + 
    127             glob(os.path.join(DOCS_DIR, 'scanning', '*.xml')) + 
    128             glob(os.path.join(DOCS_DIR, 'searching', '*.xml')) + 
    129             glob(os.path.join(DOCS_DIR, 'wizard', '*.xml')) + 
    130             glob(os.path.join(DOCS_DIR, 'scheduler', '*.xml')) + 
    131             glob(os.path.join(DOCS_DIR, 'smtpsetup', '*.xml')) + 
    132             glob(os.path.join(DOCS_DIR, 'screenshots', '*.png')))] 
     126            glob(os.path.join(DOCS_DIR, '*.js')) + 
     127            glob(os.path.join(DOCS_DIR, '*.inv'))), 
     128        (os.path.join(DOCS_DIR, '_images'), 
     129            glob(os.path.join(DOCS_DIR, '_images', '*'))), 
     130        (os.path.join(DOCS_DIR, '_sources'), 
     131            glob(os.path.join(DOCS_DIR, '_sources', '*'))), 
     132        (os.path.join(DOCS_DIR, '_static'), 
     133            glob(os.path.join(DOCS_DIR, '_static', '*'))) 
     134 
     135        ] 
    133136 
    134137# Add i18n files to data_files list 
     
    160163        os.path.walk(LOCALE_DIR, mo_find, data_files) 
    161164 
     165    def build_html_doc(self): 
     166        """Build the html documentation.""" 
     167        import sphinx 
     168 
     169        sphinx_ver = sphinx.__version__ 
     170        if map(int, sphinx_ver.split('.')) < [0, 5, 1]: 
     171            self.warn("Sphinx's version is too old (%s, expected at least " 
     172                    "0.5.1, documentation won't be build." % sphinx_ver) 
     173 
     174        # Build the documentation just like it is done through the Makefile 
     175        sphinx.main([__file__, 
     176            "-b", "html", 
     177            "-d", os.path.join(BASE_DOCS_DIR, 'doctrees'), 
     178            os.path.join(BASE_DOCS_DIR, 'src'), DOCS_DIR]) 
     179 
    162180    def run(self): 
    163181        self.delete_mo_files() 
    164182        self.build_mo_files() 
     183        self.build_html_doc() 
    165184        build.run(self) 
    166185 
  • branch/NetworkInventory/umit/core/BGProcess.py

    r4252 r4342  
    4141        pid = self._get_pid() 
    4242        if isinstance(pid, int): 
    43             return not bool(self._stopped(pid)) 
     43            res = self._stopped(pid) 
     44            if isinstance(res, tuple): 
     45                # It is assumed the process is still running if it gives an 
     46                # error different than "No such process". 
     47                return True 
     48            else: 
     49                return not bool(res) 
    4450        else: 
    4551            return False 
     
    4753    def stop(self): 
    4854        if self.running(): 
    49             self.cleanup() 
     55            return self.cleanup() 
    5056 
    5157    def cleanup(self): 
     
    8793 
    8894    def _finish(self, pid): 
    89         if not self._stopped(pid): 
     95        err = self._stopped(pid) 
     96        if isinstance(err, tuple): 
     97            # Error occurred 
     98            return err[1] 
     99 
     100        if not err: 
    90101            # Try finishing it now 
    91102            try: 
  • branch/NetworkInventory/umit/core/BasePaths.py

    r4252 r4342  
    5858PIXMAPS_DIR = os.path.join(main_dir, "share", "pixmaps", "umit") 
    5959PLUGINS_DIR = os.path.join(main_dir, "share", "umit", "plugins") 
    60 DOCS_DIR = os.path.join(main_dir, "share", "doc", "umit") 
     60DOCS_DIR = os.path.join(main_dir, "share", "doc", "umit", "html") 
    6161 
    6262base_paths = dict(config_file = 'umit.conf', 
  • branch/NetworkInventory/umit/gui/DiffCompare.py

    r4252 r4342  
    236236 
    237237    def _show_help(self, action): 
    238         webbrowser.open("file://%s" % os.path.join(Path.docs_dir, "help.html"), 
     238        webbrowser.open("file://%s" % os.path.join(Path.docs_dir, "index.html"), 
    239239                        new=2) 
    240240         
  • branch/NetworkInventory/umit/gui/MainWindow.py

    r4278 r4342  
    12161216            new = 2 
    12171217 
    1218         doc_path = abspath(join(Path.docs_dir, "help.html")) 
     1218        doc_path = abspath(join(Path.docs_dir, "index.html")) 
    12191219        log.warning(">>> Openning documentation: %s" % doc_path) 
    12201220        if exists(doc_path) and os.access(doc_path, os.R_OK): 
  • branch/NetworkInventory/umit/gui/SchedulerControl.py

    r4252 r4342  
    5252    GUI for controlling Scheduler starting/stopping. 
    5353    """ 
    54      
     54 
    5555    def __init__(self, daddy): 
    5656        self.ui_action = None 
     
    5959 
    6060        self.stock_icon, self.status_text = self._sched_status() 
    61          
     61 
    6262        gobject.timeout_add(1000, self._update_sched_status) 
    63          
     63 
    6464 
    6565    def start_scheduler(self): 
     
    8484                err = self.schedcontrol.start(from_gui=True) 
    8585            elif resp == gtk.RESPONSE_HELP: 
    86                 webbrowser.open("file://%s" % os.path.join(Path.docs_dir, 
    87                                                 "scheduler.html#root_start"), 
    88                                                 new=open_url_as()) 
     86                webbrowser.open("file://%s" % os.path.join( 
     87                    Path.docs_dir, 
     88                    "scheduler.html#starting-scheduler-as-root"), 
     89                    new=open_url_as()) 
    8990 
    9091            alertdlg.destroy() 
     
    100101            resp = alertdlg.run() 
    101102            if resp == gtk.RESPONSE_HELP: 
    102                 webbrowser.open("file://%s" % os.path.join(Path.docs_dir, 
    103                                                 "scheduler.html#sched_start"), 
    104                                                 new=open_url_as()) 
     103                webbrowser.open("file://%s" % os.path.join( 
     104                    Path.docs_dir, 
     105                    "scheduler.html#starting-scheduler"), 
     106                    new=open_url_as()) 
    105107            alertdlg.destroy() 
    106108 
     
    122124 
    123125            if resp == gtk.RESPONSE_HELP: 
    124                 webbrowser.open("file://%s" % os.path.join(Path.docs_dir, 
    125                                                 "scheduler.html#sched_stop"), 
    126                                                 new=open_url_as()) 
     126                webbrowser.open("file://%s" % os.path.join( 
     127                    Path.docs_dir, 
     128                    "scheduler.html#stopping-scheduler"), 
     129                    new=open_url_as()) 
    127130 
    128131            alertdlg.destroy() 
    129132 
    130      
     133 
    131134    def _sched_status(self): 
    132135        """ 
     
    151154            if self.daddy: 
    152155                self.daddy._clear_tip_statusbar() 
    153              
     156 
    154157        else: 
    155158            self.stop_scheduler() 
  • branch/NetworkInventory/umit/gui/SchedulerEdit.py

    r4252 r4342  
    358358        self._save_schema(None) 
    359359        self._exit(None) 
    360          
    361      
     360 
     361 
    362362    def _show_help(self, event): 
    363363        """ 
    364364        Show help for Scan Scheduler Editor. 
    365365        """ 
    366         webbrowser.open("file://%s" % os.path.join(Path.docs_dir,  
    367                                                  "scheduler.html#new_schema"), 
    368                                                  new=open_url_as()) 
     366        webbrowser.open("file://%s" % os.path.join( 
     367            Path.docs_dir, 
     368            "scheduler.html#setting-up-a-schedule"), 
     369            new=open_url_as()) 
    369370 
    370371 
     
    375376        self.set_title(self.wtitle) 
    376377        self.set_default_size(440, -1) 
    377         
    378          
     378 
    379379    def __do_layout(self): 
    380380        """ 
     
    656656        if new_sec: # update daddy scheduling profiles list 
    657657            self.daddy._load_pscheds() 
    658          
    659      
     658 
     659 
    660660    def _save_profile_and_leave(self, event): 
    661661        """ 
     
    664664        self._save_profile(None) 
    665665        self._exit(None) 
    666          
    667          
     666 
     667 
    668668    def _show_help(self, event): 
    669669        """ 
    670670        Show help for Scheduling Profiles. 
    671671        """ 
    672         webbrowser.open("file://%s" % os.path.join(Path.docs_dir,  
    673                                               "scheduler.html#new_scheduling"), 
    674                                               new=open_url_as()) 
     672        webbrowser.open("file://%s" % os.path.join( 
     673            Path.docs_dir, 
     674            "scheduler.html#creating-a-new-scheduling-profile"), 
     675            new=open_url_as()) 
    675676 
    676677 
     
    680681        """ 
    681682        self.set_title(self.wtitle) 
    682          
    683          
     683 
     684 
    684685    def __do_layout(self): 
    685686        """ 
  • branch/NetworkInventory/umit/gui/Wizard.py

    r4252 r4342  
    209209        import webbrowser 
    210210        webbrowser.open("file://%s" % os.path.join(Path.docs_dir, 
    211                                                    "help.html"), 
     211                                                   "index.html"), 
    212212                                                   new=2) 
    213213 
  • branch/NetworkInventory/umit/inventory/Viewer.py

    r4278 r4342  
    799799        """ 
    800800        webbrowser.open("file://%s" % os.path.join(Path.docs_dir, 
    801             "help.html"), new=open_url_as()) 
     801            "index.html"), new=open_url_as()) 
    802802 
    803803