2012-11-12 16:12:43 -08:00
|
|
|
"""
|
|
|
|
Settings class for comictagger app
|
|
|
|
"""
|
|
|
|
|
|
|
|
"""
|
|
|
|
Copyright 2012 Anthony Beville
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
"""
|
|
|
|
|
|
|
|
#import sys
|
|
|
|
import os
|
2012-11-13 13:25:15 -08:00
|
|
|
import sys
|
2013-02-24 11:08:14 -08:00
|
|
|
import configparser
|
2012-11-12 16:12:43 -08:00
|
|
|
import platform
|
2013-02-24 11:08:14 -08:00
|
|
|
import codecs
|
2013-04-06 12:30:01 -07:00
|
|
|
import uuid
|
2012-11-12 16:12:43 -08:00
|
|
|
|
|
|
|
import utils
|
|
|
|
|
|
|
|
class ComicTaggerSettings:
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def getSettingsFolder():
|
|
|
|
if platform.system() == "Windows":
|
|
|
|
return os.path.join( os.environ['APPDATA'], 'ComicTagger' )
|
|
|
|
else:
|
|
|
|
return os.path.join( os.path.expanduser('~') , '.ComicTagger')
|
2012-11-13 13:25:15 -08:00
|
|
|
|
2013-02-13 13:52:02 -08:00
|
|
|
frozen_win_exe_path = None
|
|
|
|
|
2012-11-13 13:25:15 -08:00
|
|
|
@staticmethod
|
|
|
|
def baseDir():
|
2013-02-06 20:50:10 -08:00
|
|
|
if getattr(sys, 'frozen', None):
|
|
|
|
if platform.system() == "Darwin":
|
|
|
|
return sys._MEIPASS
|
|
|
|
else: # Windows
|
2013-02-13 13:52:02 -08:00
|
|
|
#Preserve this value, in case sys.argv gets changed importing a plugin script
|
|
|
|
if ComicTaggerSettings.frozen_win_exe_path is None:
|
|
|
|
ComicTaggerSettings.frozen_win_exe_path = os.path.dirname( os.path.abspath( sys.argv[0] ) )
|
|
|
|
return ComicTaggerSettings.frozen_win_exe_path
|
2012-11-13 13:25:15 -08:00
|
|
|
else:
|
2013-02-06 17:12:49 -08:00
|
|
|
return os.path.dirname( os.path.abspath( __file__) )
|
2013-02-06 14:03:53 -08:00
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def getGraphic( filename ):
|
2013-02-06 20:50:10 -08:00
|
|
|
graphic_folder = os.path.join(ComicTaggerSettings.baseDir(), 'graphics')
|
2013-02-06 17:01:39 -08:00
|
|
|
return os.path.join( graphic_folder, filename )
|
2012-11-24 10:34:49 -08:00
|
|
|
|
2013-02-06 14:03:53 -08:00
|
|
|
@staticmethod
|
|
|
|
def getUIFile( filename ):
|
2013-02-06 20:50:10 -08:00
|
|
|
ui_folder = os.path.join(ComicTaggerSettings.baseDir(), 'ui')
|
2013-02-06 17:01:39 -08:00
|
|
|
return os.path.join( ui_folder, filename )
|
2013-02-06 14:03:53 -08:00
|
|
|
|
2012-11-24 10:17:35 -08:00
|
|
|
def setDefaultValues( self ):
|
|
|
|
|
|
|
|
# General Settings
|
|
|
|
self.rar_exe_path = ""
|
|
|
|
self.unrar_exe_path = ""
|
|
|
|
self.allow_cbi_in_rar = True
|
2013-04-05 12:48:49 -07:00
|
|
|
self.check_for_new_version = True
|
2013-04-06 12:30:01 -07:00
|
|
|
self.send_usage_stats = False
|
2012-11-24 10:17:35 -08:00
|
|
|
|
|
|
|
# automatic settings
|
2013-04-06 12:30:01 -07:00
|
|
|
self.install_id = uuid.uuid4().hex
|
2013-01-18 13:12:23 -08:00
|
|
|
self.last_selected_save_data_style = 0
|
|
|
|
self.last_selected_load_data_style = 0
|
2012-11-24 10:17:35 -08:00
|
|
|
self.last_opened_folder = ""
|
|
|
|
self.last_main_window_width = 0
|
|
|
|
self.last_main_window_height = 0
|
|
|
|
self.last_main_window_x = 0
|
|
|
|
self.last_main_window_y = 0
|
2013-01-23 10:55:10 -08:00
|
|
|
self.last_form_side_width = -1
|
|
|
|
self.last_list_side_width = -1
|
2012-11-24 10:17:35 -08:00
|
|
|
|
|
|
|
# identifier settings
|
|
|
|
self.id_length_delta_thresh = 5
|
2013-02-03 10:16:16 -08:00
|
|
|
self.id_publisher_blacklist = "Panini Comics, Abril, Planeta DeAgostini, Editorial Televisa"
|
2012-11-12 16:12:43 -08:00
|
|
|
|
2012-11-24 10:17:35 -08:00
|
|
|
# Show/ask dialog flags
|
|
|
|
self.ask_about_cbi_in_rar = True
|
|
|
|
self.show_disclaimer = True
|
2013-04-05 12:48:49 -07:00
|
|
|
self.dont_notify_about_this_version = ""
|
2013-04-06 12:30:01 -07:00
|
|
|
self.ask_about_usage_stats = True
|
2012-12-04 12:36:56 -08:00
|
|
|
|
2013-04-11 21:49:08 -07:00
|
|
|
#filename parsing settings
|
|
|
|
self.parse_scan_info = False
|
|
|
|
|
2012-12-04 12:36:56 -08:00
|
|
|
# Comic Vine settings
|
2012-12-17 10:19:32 -08:00
|
|
|
self.use_series_start_as_volume = False
|
|
|
|
|
|
|
|
# CBL Tranform settings
|
|
|
|
|
2012-12-04 16:51:30 -08:00
|
|
|
self.assume_lone_credit_is_primary = False
|
2012-12-17 10:19:32 -08:00
|
|
|
self.copy_characters_to_tags = False
|
|
|
|
self.copy_teams_to_tags = False
|
|
|
|
self.copy_locations_to_tags = False
|
2013-01-07 12:15:17 -08:00
|
|
|
self.copy_notes_to_comments = False
|
|
|
|
self.copy_weblink_to_comments = False
|
2012-12-17 10:19:32 -08:00
|
|
|
self.apply_cbl_transform_on_cv_import = False
|
|
|
|
self.apply_cbl_transform_on_bulk_operation = False
|
|
|
|
|
|
|
|
# Rename settings
|
|
|
|
self.rename_template = "%series% #%issue% (%year%)"
|
|
|
|
self.rename_issue_number_padding = 3
|
|
|
|
self.rename_use_smart_string_cleanup = True
|
2013-01-20 17:07:45 -08:00
|
|
|
self.rename_extension_based_on_archive = True
|
2012-12-17 10:19:32 -08:00
|
|
|
|
2012-11-12 16:12:43 -08:00
|
|
|
def __init__(self):
|
|
|
|
|
2012-11-24 10:17:35 -08:00
|
|
|
self.settings_file = ""
|
|
|
|
self.folder = ""
|
|
|
|
self.setDefaultValues()
|
|
|
|
|
2013-02-24 11:08:14 -08:00
|
|
|
self.config = configparser.RawConfigParser()
|
2012-11-12 16:12:43 -08:00
|
|
|
self.folder = ComicTaggerSettings.getSettingsFolder()
|
|
|
|
|
|
|
|
if not os.path.exists( self.folder ):
|
|
|
|
os.makedirs( self.folder )
|
|
|
|
|
|
|
|
self.settings_file = os.path.join( self.folder, "settings")
|
|
|
|
|
|
|
|
# if config file doesn't exist, write one out
|
|
|
|
if not os.path.exists( self.settings_file ):
|
|
|
|
self.save()
|
|
|
|
else:
|
|
|
|
self.load()
|
|
|
|
|
|
|
|
# take a crack at finding rar exes, if not set already
|
|
|
|
if self.rar_exe_path == "":
|
|
|
|
if platform.system() == "Windows":
|
|
|
|
# look in some likely places for windows machine
|
|
|
|
if os.path.exists( "C:\Program Files\WinRAR\Rar.exe" ):
|
|
|
|
self.rar_exe_path = "C:\Program Files\WinRAR\Rar.exe"
|
|
|
|
elif os.path.exists( "C:\Program Files (x86)\WinRAR\Rar.exe" ):
|
|
|
|
self.rar_exe_path = "C:\Program Files (x86)\WinRAR\Rar.exe"
|
|
|
|
else:
|
|
|
|
# see if it's in the path of unix user
|
|
|
|
if utils.which("rar") is not None:
|
|
|
|
self.rar_exe_path = utils.which("rar")
|
|
|
|
if self.rar_exe_path != "":
|
|
|
|
self.save()
|
|
|
|
|
|
|
|
if self.unrar_exe_path == "":
|
|
|
|
if platform.system() != "Windows":
|
|
|
|
# see if it's in the path of unix user
|
|
|
|
if utils.which("unrar") is not None:
|
|
|
|
self.unrar_exe_path = utils.which("unrar")
|
|
|
|
if self.unrar_exe_path != "":
|
|
|
|
self.save()
|
2013-02-08 14:05:28 -08:00
|
|
|
|
|
|
|
# make sure unrar/rar program is now in the path for the UnRAR class to use
|
|
|
|
utils.addtopath(os.path.dirname(self.unrar_exe_path))
|
|
|
|
utils.addtopath(os.path.dirname(self.rar_exe_path))
|
2012-11-12 16:12:43 -08:00
|
|
|
|
2012-11-23 20:56:02 -08:00
|
|
|
def reset( self ):
|
|
|
|
os.unlink( self.settings_file )
|
|
|
|
self.__init__()
|
|
|
|
|
2012-11-12 16:12:43 -08:00
|
|
|
def load(self):
|
2013-04-05 12:48:49 -07:00
|
|
|
|
|
|
|
def readline_generator(f):
|
|
|
|
line = f.readline()
|
|
|
|
while line:
|
|
|
|
yield line
|
|
|
|
line = f.readline()
|
|
|
|
|
|
|
|
#self.config.readfp(codecs.open(self.settings_file, "r", "utf8"))
|
|
|
|
self.config.read_file(readline_generator(codecs.open(self.settings_file, "r", "utf8")))
|
2012-11-12 16:12:43 -08:00
|
|
|
|
|
|
|
self.rar_exe_path = self.config.get( 'settings', 'rar_exe_path' )
|
|
|
|
self.unrar_exe_path = self.config.get( 'settings', 'unrar_exe_path' )
|
2013-04-05 12:48:49 -07:00
|
|
|
if self.config.has_option('settings', 'check_for_new_version'):
|
|
|
|
self.check_for_new_version = self.config.getboolean( 'settings', 'check_for_new_version' )
|
2013-04-06 12:30:01 -07:00
|
|
|
if self.config.has_option('settings', 'send_usage_stats'):
|
|
|
|
self.send_usage_stats = self.config.getboolean( 'settings', 'send_usage_stats' )
|
|
|
|
|
|
|
|
if self.config.has_option('auto', 'install_id'):
|
|
|
|
self.install_id = self.config.get( 'auto', 'install_id' )
|
2013-01-18 13:12:23 -08:00
|
|
|
if self.config.has_option('auto', 'last_selected_load_data_style'):
|
|
|
|
self.last_selected_load_data_style = self.config.getint( 'auto', 'last_selected_load_data_style' )
|
|
|
|
if self.config.has_option('auto', 'last_selected_save_data_style'):
|
|
|
|
self.last_selected_save_data_style = self.config.getint( 'auto', 'last_selected_save_data_style' )
|
2012-11-23 14:05:56 -08:00
|
|
|
if self.config.has_option('auto', 'last_opened_folder'):
|
|
|
|
self.last_opened_folder = self.config.get( 'auto', 'last_opened_folder' )
|
2012-11-19 22:34:09 -08:00
|
|
|
if self.config.has_option('auto', 'last_main_window_width'):
|
|
|
|
self.last_main_window_width = self.config.getint( 'auto', 'last_main_window_width' )
|
|
|
|
if self.config.has_option('auto', 'last_main_window_height'):
|
|
|
|
self.last_main_window_height = self.config.getint( 'auto', 'last_main_window_height' )
|
|
|
|
if self.config.has_option('auto', 'last_main_window_x'):
|
|
|
|
self.last_main_window_x = self.config.getint( 'auto', 'last_main_window_x' )
|
|
|
|
if self.config.has_option('auto', 'last_main_window_y'):
|
|
|
|
self.last_main_window_y = self.config.getint( 'auto', 'last_main_window_y' )
|
2013-01-23 10:55:10 -08:00
|
|
|
if self.config.has_option('auto', 'last_form_side_width'):
|
|
|
|
self.last_form_side_width = self.config.getint( 'auto', 'last_form_side_width' )
|
|
|
|
if self.config.has_option('auto', 'last_list_side_width'):
|
|
|
|
self.last_list_side_width = self.config.getint( 'auto', 'last_list_side_width' )
|
2012-11-20 00:57:12 -08:00
|
|
|
|
|
|
|
if self.config.has_option('identifier', 'id_length_delta_thresh'):
|
|
|
|
self.id_length_delta_thresh = self.config.getint( 'identifier', 'id_length_delta_thresh' )
|
|
|
|
if self.config.has_option('identifier', 'id_publisher_blacklist'):
|
2012-12-17 10:19:32 -08:00
|
|
|
self.id_publisher_blacklist = self.config.get( 'identifier', 'id_publisher_blacklist' )
|
2012-11-20 14:38:10 -08:00
|
|
|
|
2013-04-11 21:49:08 -07:00
|
|
|
if self.config.has_option('filenameparser', 'parse_scan_info'):
|
|
|
|
self.parse_scan_info = self.config.getboolean( 'filenameparser', 'parse_scan_info' )
|
|
|
|
|
2012-11-20 14:38:10 -08:00
|
|
|
if self.config.has_option('dialogflags', 'ask_about_cbi_in_rar'):
|
|
|
|
self.ask_about_cbi_in_rar = self.config.getboolean( 'dialogflags', 'ask_about_cbi_in_rar' )
|
|
|
|
if self.config.has_option('dialogflags', 'show_disclaimer'):
|
|
|
|
self.show_disclaimer = self.config.getboolean( 'dialogflags', 'show_disclaimer' )
|
2013-04-05 12:48:49 -07:00
|
|
|
if self.config.has_option('dialogflags', 'dont_notify_about_this_version'):
|
|
|
|
self.dont_notify_about_this_version = self.config.get( 'dialogflags', 'dont_notify_about_this_version' )
|
2013-04-06 12:30:01 -07:00
|
|
|
if self.config.has_option('dialogflags', 'ask_about_usage_stats'):
|
|
|
|
self.ask_about_usage_stats = self.config.getboolean( 'dialogflags', 'ask_about_usage_stats' )
|
2013-04-05 12:48:49 -07:00
|
|
|
|
2012-12-17 10:19:32 -08:00
|
|
|
if self.config.has_option('comicvine', 'use_series_start_as_volume'):
|
|
|
|
self.use_series_start_as_volume = self.config.getboolean( 'comicvine', 'use_series_start_as_volume' )
|
|
|
|
|
|
|
|
if self.config.has_option('cbl_transform', 'assume_lone_credit_is_primary'):
|
|
|
|
self.assume_lone_credit_is_primary = self.config.getboolean( 'cbl_transform', 'assume_lone_credit_is_primary' )
|
|
|
|
if self.config.has_option('cbl_transform', 'copy_characters_to_tags'):
|
|
|
|
self.copy_characters_to_tags = self.config.getboolean( 'cbl_transform', 'copy_characters_to_tags' )
|
|
|
|
if self.config.has_option('cbl_transform', 'copy_teams_to_tags'):
|
|
|
|
self.copy_teams_to_tags = self.config.getboolean( 'cbl_transform', 'copy_teams_to_tags' )
|
|
|
|
if self.config.has_option('cbl_transform', 'copy_locations_to_tags'):
|
|
|
|
self.copy_locations_to_tags = self.config.getboolean( 'cbl_transform', 'copy_locations_to_tags' )
|
2013-01-07 12:15:17 -08:00
|
|
|
if self.config.has_option('cbl_transform', 'copy_notes_to_comments'):
|
|
|
|
self.copy_notes_to_comments = self.config.getboolean( 'cbl_transform', 'copy_notes_to_comments' )
|
|
|
|
if self.config.has_option('cbl_transform', 'copy_weblink_to_comments'):
|
|
|
|
self.copy_weblink_to_comments = self.config.getboolean( 'cbl_transform', 'copy_weblink_to_comments' )
|
2012-12-17 10:19:32 -08:00
|
|
|
if self.config.has_option('cbl_transform', 'apply_cbl_transform_on_cv_import'):
|
|
|
|
self.apply_cbl_transform_on_cv_import = self.config.getboolean( 'cbl_transform', 'apply_cbl_transform_on_cv_import' )
|
|
|
|
if self.config.has_option('cbl_transform', 'apply_cbl_transform_on_bulk_operation'):
|
|
|
|
self.apply_cbl_transform_on_bulk_operation = self.config.getboolean( 'cbl_transform', 'apply_cbl_transform_on_bulk_operation' )
|
2012-12-04 12:36:56 -08:00
|
|
|
|
2012-12-17 10:19:32 -08:00
|
|
|
if self.config.has_option('rename', 'rename_template'):
|
|
|
|
self.rename_template = self.config.get( 'rename', 'rename_template' )
|
|
|
|
if self.config.has_option('rename', 'rename_issue_number_padding'):
|
|
|
|
self.rename_issue_number_padding = self.config.getint( 'rename', 'rename_issue_number_padding' )
|
|
|
|
if self.config.has_option('rename', 'rename_use_smart_string_cleanup'):
|
|
|
|
self.rename_use_smart_string_cleanup = self.config.getboolean( 'rename', 'rename_use_smart_string_cleanup' )
|
2013-01-20 17:07:45 -08:00
|
|
|
if self.config.has_option('rename', 'rename_extension_based_on_archive'):
|
|
|
|
self.rename_extension_based_on_archive = self.config.getboolean( 'rename', 'rename_extension_based_on_archive' )
|
2012-12-17 10:19:32 -08:00
|
|
|
|
2012-11-12 16:12:43 -08:00
|
|
|
def save( self ):
|
|
|
|
|
|
|
|
if not self.config.has_section( 'settings' ):
|
|
|
|
self.config.add_section( 'settings' )
|
2013-04-05 12:48:49 -07:00
|
|
|
|
|
|
|
self.config.set( 'settings', 'check_for_new_version', self.check_for_new_version )
|
2012-11-12 16:12:43 -08:00
|
|
|
self.config.set( 'settings', 'rar_exe_path', self.rar_exe_path )
|
|
|
|
self.config.set( 'settings', 'unrar_exe_path', self.unrar_exe_path )
|
2013-04-06 12:30:01 -07:00
|
|
|
self.config.set( 'settings', 'send_usage_stats', self.send_usage_stats )
|
2012-11-12 16:12:43 -08:00
|
|
|
|
2012-11-19 22:34:09 -08:00
|
|
|
if not self.config.has_section( 'auto' ):
|
|
|
|
self.config.add_section( 'auto' )
|
|
|
|
|
2013-04-06 12:30:01 -07:00
|
|
|
self.config.set( 'auto', 'install_id', self.install_id )
|
2013-01-18 13:12:23 -08:00
|
|
|
self.config.set( 'auto', 'last_selected_load_data_style', self.last_selected_load_data_style )
|
|
|
|
self.config.set( 'auto', 'last_selected_save_data_style', self.last_selected_save_data_style )
|
2012-11-19 22:34:09 -08:00
|
|
|
self.config.set( 'auto', 'last_opened_folder', self.last_opened_folder )
|
|
|
|
self.config.set( 'auto', 'last_main_window_width', self.last_main_window_width )
|
|
|
|
self.config.set( 'auto', 'last_main_window_height', self.last_main_window_height )
|
|
|
|
self.config.set( 'auto', 'last_main_window_x', self.last_main_window_x )
|
|
|
|
self.config.set( 'auto', 'last_main_window_y', self.last_main_window_y )
|
2013-01-23 10:55:10 -08:00
|
|
|
self.config.set( 'auto', 'last_form_side_width', self.last_form_side_width )
|
|
|
|
self.config.set( 'auto', 'last_list_side_width', self.last_list_side_width )
|
2012-11-20 00:57:12 -08:00
|
|
|
|
|
|
|
if not self.config.has_section( 'identifier' ):
|
|
|
|
self.config.add_section( 'identifier' )
|
|
|
|
|
|
|
|
self.config.set( 'identifier', 'id_length_delta_thresh', self.id_length_delta_thresh )
|
|
|
|
self.config.set( 'identifier', 'id_publisher_blacklist', self.id_publisher_blacklist )
|
2012-11-20 14:38:10 -08:00
|
|
|
|
|
|
|
if not self.config.has_section( 'dialogflags' ):
|
|
|
|
self.config.add_section( 'dialogflags' )
|
|
|
|
|
|
|
|
self.config.set( 'dialogflags', 'ask_about_cbi_in_rar', self.ask_about_cbi_in_rar )
|
|
|
|
self.config.set( 'dialogflags', 'show_disclaimer', self.show_disclaimer )
|
2013-04-05 12:48:49 -07:00
|
|
|
self.config.set( 'dialogflags', 'dont_notify_about_this_version', self.dont_notify_about_this_version )
|
2013-04-06 12:30:01 -07:00
|
|
|
self.config.set( 'dialogflags', 'ask_about_usage_stats', self.ask_about_usage_stats )
|
2013-04-11 21:49:08 -07:00
|
|
|
|
|
|
|
if not self.config.has_section( 'filenameparser' ):
|
|
|
|
self.config.add_section( 'filenameparser' )
|
|
|
|
|
|
|
|
self.config.set( 'filenameparser', 'parse_scan_info', self.parse_scan_info )
|
2013-04-05 12:48:49 -07:00
|
|
|
|
2012-12-04 12:36:56 -08:00
|
|
|
if not self.config.has_section( 'comicvine' ):
|
|
|
|
self.config.add_section( 'comicvine' )
|
|
|
|
|
2012-12-17 10:19:32 -08:00
|
|
|
self.config.set( 'comicvine', 'use_series_start_as_volume', self.use_series_start_as_volume )
|
|
|
|
|
|
|
|
if not self.config.has_section( 'cbl_transform' ):
|
|
|
|
self.config.add_section( 'cbl_transform' )
|
|
|
|
|
|
|
|
self.config.set( 'cbl_transform', 'assume_lone_credit_is_primary', self.assume_lone_credit_is_primary )
|
|
|
|
self.config.set( 'cbl_transform', 'copy_characters_to_tags', self.copy_characters_to_tags )
|
|
|
|
self.config.set( 'cbl_transform', 'copy_teams_to_tags', self.copy_teams_to_tags )
|
|
|
|
self.config.set( 'cbl_transform', 'copy_locations_to_tags', self.copy_locations_to_tags )
|
2013-01-07 12:15:17 -08:00
|
|
|
self.config.set( 'cbl_transform', 'copy_notes_to_comments', self.copy_notes_to_comments )
|
|
|
|
self.config.set( 'cbl_transform', 'copy_weblink_to_comments', self.copy_weblink_to_comments )
|
2012-12-17 10:19:32 -08:00
|
|
|
self.config.set( 'cbl_transform', 'apply_cbl_transform_on_cv_import', self.apply_cbl_transform_on_cv_import )
|
|
|
|
self.config.set( 'cbl_transform', 'apply_cbl_transform_on_bulk_operation', self.apply_cbl_transform_on_bulk_operation )
|
2012-12-04 12:36:56 -08:00
|
|
|
|
2012-12-17 10:19:32 -08:00
|
|
|
if not self.config.has_section( 'rename' ):
|
|
|
|
self.config.add_section( 'rename' )
|
2012-12-04 12:36:56 -08:00
|
|
|
|
2012-12-17 10:19:32 -08:00
|
|
|
self.config.set( 'rename', 'rename_template', self.rename_template )
|
|
|
|
self.config.set( 'rename', 'rename_issue_number_padding', self.rename_issue_number_padding )
|
|
|
|
self.config.set( 'rename', 'rename_use_smart_string_cleanup', self.rename_use_smart_string_cleanup )
|
2013-01-20 17:07:45 -08:00
|
|
|
self.config.set( 'rename', 'rename_extension_based_on_archive', self.rename_extension_based_on_archive )
|
2012-12-17 10:19:32 -08:00
|
|
|
|
2013-02-24 11:08:14 -08:00
|
|
|
with codecs.open( self.settings_file, 'wb', 'utf8') as configfile:
|
2012-11-12 16:12:43 -08:00
|
|
|
self.config.write(configfile)
|
2012-12-04 12:36:56 -08:00
|
|
|
|
2013-02-13 13:52:02 -08:00
|
|
|
#make sure the basedir is cached, in case we're on windows running a script from frozen binary
|
|
|
|
ComicTaggerSettings.baseDir()
|