File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
opengever/maintenance/browser Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 104104 permission =" cmf.ManagePortal"
105105 />
106106
107+ <browser : page
108+ for =" *"
109+ name =" repository_analyse"
110+ class =" .repository_analyser.RepositoryAnalyser"
111+ permission =" cmf.ManagePortal"
112+ />
113+
107114</configure >
Original file line number Diff line number Diff line change 1+ from Products .Five .browser import BrowserView
2+ from opengever .maintenance .scripts .repository_migration_analyse import RepositoryExcelAnalyser
3+ from opengever .maintenance .scripts .repository_migration_analyse import RepositoryMigrator
4+
5+
6+ class RepositoryAnalyser (BrowserView ):
7+ """Test view for the analyser, easier/faster than a script.
8+ """
9+
10+ def __call__ (self ):
11+ self .diff_xlsx_path = '/Users/flipsi/Documents/GEVER/SG/hba_migration/hba_os_migration.xlsx'
12+ self .analyse_xlsx_path = '/Users/flipsi/Documents/GEVER/SG/hba_migration/analyse.xlsx'
13+
14+ import transaction
15+ # transaction.doom()
16+
17+ from plone .protect .interfaces import IDisableCSRFProtection
18+ from zope .interface import alsoProvides
19+ alsoProvides (self .request , IDisableCSRFProtection )
20+ analyser = RepositoryExcelAnalyser (self .diff_xlsx_path ,
21+ self .analyse_xlsx_path )
22+ analyser .analyse ()
23+ analyser .export_to_excel ()
24+
25+ migrator = RepositoryMigrator (analyser .analysed_rows )
26+ migrator .run ()
27+
28+ return 'DONE'
You can’t perform that action at this time.
0 commit comments