3 import findrox
; findrox
.version(1, 9, 12)
4 import sys
, os
, formats
9 from rox
import g
, saving
10 __builtins__
._ = rox
.i18n
.translation(os
.path
.join(rox
.app_dir
, 'Messages'))
12 if len(sys
.argv
) != 2:
13 rox
.info(_("Drag a file or directory onto Archive to archive it. "
14 "Drag an archive onto it to extract."))
17 from box
import ArchiveBox
22 path
= rox
.get_local_path(path
)
24 rox
.croak(_('Sorry, I can only extract/archive local files.'))
25 path
= os
.path
.abspath(path
)
27 # Show the savebox, so at least the user knows something is happening...
29 savebox
= ArchiveBox()
33 if os
.path
.isdir(path
):
34 data
= formats
.DirData(path
)
36 data
= formats
.FileData(path
)
37 savebox
.set_data(data
)
43 rox
.report_exception()