Below is the result of the first planning game of the importer script. The "User stories" section list every possible interaction between the user and the script and the "Tasks" section list everything we will need to code to make all user stories possible. We made generic tasks that should be detailed before coding.
Feel free to contribute if you think we miss something.
Attached here there is a first draft of the importer class diagram. We still need to work on this diagram to reflect everything that is mentioned on this page.
User stories
- Access the importer system (message about the importance of doing a full database backup before using the importer)
- Choose which software to import from the list of supported softwares
- MediaWiki (need to have a XML file to import wiki pages and MediaWiki database access to import users)
- phpBB
- Others
- System print on the screen relevant information about what the user will to have to complete the importer process and the PHP configuration (upload_max_filesize, post_max_size, max_execution_time etc)
- Choose what types of information will be imported (each software importer has its own specific sets of things that are importable)
- Optional import contents:
- Images and attachments
- Number of page revisions to import (-1 for all revisions)
- What to do with page names that already exists in the TikiWiki installation:
- define a import prefix for page name
- override TikiWiki page content
- do not import
- Import categories
- Import user pages
- Import discussion pages
- Set default wiki home page
- Set site name
- What to do with users:
- Assume that the users have already been imported
- Define a single TikiWiki user that will be used as the author for all the imported content
- Create TikiWiki users based on the username from the other software (need access to the other software database for this option):
- Override if there is a user with the same name in TikiWiki
- Do not override
- User select the input data (might be a file to be uploaded or a path to an existing file on the file system).
- If users will be imported the information to connect with the database server.
- Press the import button:
- System validate data input, make de convertion and display errors if any.
- If the import was sucesful the script will print a brief report with the number of pages imported, number of revisions, number of users etc
Tasks
- Assign new permission to allow access to the importer
- Add link to the importer on Tiki menu
- Create an interface for the "importer classes"
- Create the select importer page (dropdown with the "importer classes")
- Create a wiki importer class (extends main importer class)
- Create an user interface for the wiki importer class
- Display relevant PHP system information:
- max_execution_time
- max_upload_filesize
- post_max_size
- Create an options page (that will display the generic and specific options)
- Create a feedback page (before importing) that validates the input that and display a button to start the import process
- Importer:
- Read input that and call the parser (Text_Wiki in the case of MediaWiki)
- Create content in TikiWiki according to class options
- Return information about the import process to display in the report page