<s> '''<STR_LIT>''' <EOL> def unpackEIS ( cntlr , eisFile , unpackToDir ) : <EOL> from arelle . FileSource import openFileSource <EOL> filesource = openFileSource ( eisFile , cntlr , checkIfXmlIsEis = True ) <EOL> if not filesource . isArchive : <EOL> cntlr . addToLog ( "<STR_LIT>" + eisFile ) <EOL> return <EOL> import os , io <EOL> unpackedFiles = [ ] <EOL> for file in filesource . dir : <EOL> fIn , encoding = filesource . file ( os . path . join ( eisFile , file ) ) <EOL> with open ( os . path . join ( unpackToDir , file ) , "<STR_LIT:w>" , encoding = encoding ) as fOut : <EOL> fOut . write ( fIn . read ( ) ) <EOL> unpackedFiles . append ( file ) <EOL> fIn . close ( ) <EOL> cntlr . addToLog ( "<STR_LIT>" + '<STR_LIT:U+002CU+0020>' . join ( unpackedFiles ) ) <EOL> def unpackSecEisMenuEntender ( cntlr , menu , * args , ** kwargs ) : <EOL> def askUnpackDirectory ( ) : <EOL> eisFile = cntlr . uiFileDialog ( "<STR_LIT>" , <EOL> title = _ ( "<STR_LIT>" ) , <EOL> initialdir = cntlr . config . setdefault ( "<STR_LIT>" , "<STR_LIT:.>" ) , <EOL> filetypes = [ ( _ ( "<STR_LIT>" ) , "<STR_LIT>" ) , ( _ ( "<STR_LIT>" ) , "<STR_LIT>" ) ] , <EOL> defaultextension = "<STR_LIT>" ) <EOL> if not eisFile : <EOL> return <EOL> from tkinter . filedialog import askdirectory <EOL> unpackToDir = askdirectory ( parent = cntlr . parent , <EOL> initialdir = cntlr . config . setdefault ( "<STR_LIT>" , "<STR_LIT:.>" ) , <EOL> title = '<STR_LIT>' ) <EOL> import os <EOL> cntlr . config [ "<STR_LIT>" ] = os . path . dirname ( eisFile ) <EOL> cntlr . config [ "<STR_LIT>" ] = unpackToDir <EOL> cntlr . saveConfig ( ) <EOL> try : <EOL> unpackEIS ( cntlr , eisFile , unpackToDir ) <EOL> except Exception as ex : <EOL> cntlr . addToLog ( "<STR_LIT>" + str ( ex ) ) ; <EOL> menu . add_command ( label = "<STR_LIT>" , <EOL> underline = <NUM_LIT:0> , <EOL> command = lambda : askUnpackDirectory ( ) ) <EOL> __pluginInfo__ = { <EOL> '<STR_LIT:name>' : '<STR_LIT>' , <EOL> '<STR_LIT:version>' : '<STR_LIT>' , <EOL> '<STR_LIT:description>' : "<STR_LIT>" , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : unpackSecEisMenuEntender , <EOL> } </s>
