Tutorials

From EpiMedDat
Jump to navigation Jump to search

Basic understanding of MediaWiki

What is a page?

What is a template?

What is a category?

Basic setup

Configuring the editor

The default setup of the editor is currently WikiEditor in combination with the additional extension CodeMirror.

Any user can change the default setup by disable the WikiEditor. By disabling, the WikiEditor toolbar will disappear.


What are WikiEditor and CodeMirror? What do they do?

The WikiEditor is the toolbar appearing on the upper side while editing an article or a template. Compared with other editors WikiEditor was kept very simple. It helps the user to add special characters as well as inputting basic codes for bold, italics, simple tables and so on. Those functions can be extended by the server owner, the repertory of special characters can be enlarged as well.

The CodeMirror extension is a subextension for the WikiEditor. It highlights the codes within your text with designated colors. This makes it easier to distinguish the codes from the actual content. The extension appears in the WikiEditor tool bar as a pen and can be enabled and disabled by clicking on it.


I don't want the WikiEditor. How do I disable it?

In case you decide to disable the editor, please go to Special pages on the left side bar, scroll down to Users and rights and click on Preferences. Next, click on Editing on the upper bar, scroll down and uncheck Enable the editing toolbar. Don't forget to save your preferences and you are done. You can change your preferences whenever you like.

Basic usage

How to create a new page?

How to create a new template?

Advanced usage

Where can I see which extensions are installed and activated?

Installed extensions are only visible from the backend, thus only for the server owner. Activated extensions can be seen in Specials:Version

How to import a XML / CSV / Spreadsheet file?

Currently,the import function is only available for the administrator. EpiMedDat uses the extension Data Transfer to import files. Refer to Special:ImportXML, Special:ImportCSV or Special:ImportSpreadsheet.

Preparing a Citavi-File for an XML/CSV import

Export from Citavi

Follow the next steps to obtain a XML dump of your Citavi database. Step 1 and step 3 must be done using Citavi itself. For extracting the zip files, use any available unzipper on your PC. For Step 1-4 you can refer to this site.

Step 1) Create an archive copy of your Citavi database by clicking File > This project > Archive project) You now have obtained a ctv6archive file as a zip file.

Step 2) Unzip the zip file. The folder u have extracted contains a file with the extension .ctv6. You only need this file since the database is stored there.

Step 3) Open the extracted .ctv6 in Step 2) with Citavi. Create a backup of this file by clicking File > This project > Create backup The created backup file is another zip file. The location is defined in Tools > Options > Folders

Step 4) Unzip the file you have obtained in Step 3. You will then get a ctv6 file which works as XML.

Extracting data from Citavi-XML file

The XML file you have obtained by following the previous steps contains all sort of data. Only some of them represent the raw material (source texts and similar information) you actually need. A big part of the XML data are codes - those are categories and options you could have used in Citavi, but you didn't. Thus they are blank. To seperate the needed and the unneeded part, we will use Python scripts. The following shows how to prepare and run the scripts by using the open source program Pycharm.

Step 5) Create a new project in Pycharm and load your xml file - from here on, lets call the xml file source-data (you can rename your file according to it to make things easier). Alternatively, in order to load a xml file, right click on the left bar under your project folder > New > New Scratch File > XML and copy-paste your XML code.

Since the database of Citavi is separated in Reference (information about the literature used) and Knowledgeitem (sources you have extracted from the literature), we will tackle the problem separatedly.

Step 6) Knowledgeitem: Remove the Reference-part in your XML file and clean up and rename the tree until you get

<?xml version="1.0" encoding="utf-8"?>
<metadata>
        <KnowledgeItem id="...">
        
        ...
        
        </KnowledgeItem>
</metadata>
<metadata>
        <KnowledgeItem id="...">
        
        ...
        
        </KnowledgeItem>
</metadata>

...

Step 6) Now load the following Python script, similar to Step 5 when XML was loaded.

import xml.etree.ElementTree as ET
mytree = ET.parse ('source-data.xml')
myroot = mytree.getroot()
for x in myroot.findall ('KnowledgeItem'):
    CoreStatement=x.find('CoreStatement').text
    Text = x.find('Text').text
    ReferenceID = x.find('ReferenceID').text
    PageRangeNumber = x.find('PageRangeNumber').text
    print(CoreStatement,Text,ReferenceID,PageRangeNumber)

Step 7) Run the script.

How to export in XML / CSV file?

Currently,the export function is only available for the administrator. EpiMedDat uses the extension Data Transfer to export files.

Troubleshooting

The source states only a season, not an exact date

The source states only a month, not an exact date