# File languages-statistics.rb, line 50
        def execute
                
                @status = 0
                time_started = Time.now.utc
                working_directory_format = DateTimeFormat.new('${year}${month}${day}T${hour}${minute}${second}')
                working_directory = working_directory_format.format(time_started)
                Dir.mkdir(working_directory)
                logger = Logger.new([$stderr, File.new(working_directory + '/log.txt', 'w')])
                date_time_format = DateTimeFormat.new()
                logger.log '統計情報の取得と更新用ウィキテキストの作成'
                logger.log '開始しました。 ' + date_time_format.format(time_started)
                config = Config.new(working_directory)
                logger.log('作業ディレクトリ: ' + config.working_directory)
                current_page_file_name = config.working_directory + '/current-page.txt'
                resource = Resource.new(logger)
                statisticsFetcher = StatisticsFetcher.new(config, resource, logger)
                statisticsFetcher.execute()
                @status = statisticsFetcher.status
                
                bot = WikiBot.new(config)
                bot.login
                current_revision_text = bot.current_revision_text(config.target_statistics_page)
                bot.logout
                current_page_file = File.new(current_page_file_name, 'w')
                current_page_file.print(current_revision_text)
                current_page_file.close()
                LanguageEntry.minimum_number_of_articles_for_calculating_depth =
                        resource.minimum_number_of_articles_for_calculating_depth
                new_statistics_page =
                        NewStatisticsPage.new(statisticsFetcher, current_revision_text, resource, logger)
                new_statistics_page.number_of_languages_in_site_matrix =
                        statisticsFetcher.number_of_languages_in_site_matrix()
                new_statistics_page.print
                FileUtils.copy(Dir.glob(config.working_directory + '/*'), '.')
                FileUtils.copy(Resource::FILE_NAME, config.working_directory)
                if (config.file_browser != nil) then
                        launch(config.file_browser, config.working_directory, 'ファイルブラウザの起動に失敗しました: ', logger)
                end
                if (config.text_viewer != nil) then
                        launch(config.text_viewer, new_statistics_page.file_name, 'テキストビューワの起動に失敗しました: ', logger)
                end
                time_ended = Time.now.utc
                date_time_format.set_date_time(time_ended)
                logger.log '終了しました。 ' + date_time_format.format
                logger.log '要した時間: ' + (time_ended - time_started).to_s + ' 秒'
        end