# Kaltura metadata to bulk upload converter


## Input data

The coverter expects a CSV file, which can be exported from the excel file generated by kaltura metadata downloader.
The CSV file should have headers, and the expected delimiter is `;`.

Any lines that cannot be processed due to containing bad characters will be added to `bad_rows.txt`.

Fields supported (needed in header):

- mediaType
- name
- description
- downloadUrl
- userId
- tags (comma seperated)
- categories (comma seperated)
- startDate
- endDate

Note: Bulk upload will create categories and tags if they do not exist

## Usage

```
python kaltura_bulk.py -h
```


## Bad rows

If a row is not utf-8 or ascii the row is marked as a bad row, and added to `bad_rows.txt`. 

An example of bad data is exporting data from xsl to csv on OSX. Excel on OSX will use `mac-roman` encoding which means special characters such as `øæåñ` will blow up during processing.

```
iconv -f MACROMAN -t UTF-8 bad_rows.txt >  bad_rows_UTF8.txt
```


## TODO

- Improve character decoding to avoid bad rows.


# Kaltura metadata to bulk upload converter


## Input data

The coverter expects a CSV file, which can be exported from the excel file generated by kaltura metadata downloader.
The CSV file should have headers, and the expected delimiter is `;`.

Any lines that cannot be processed due to containing bad characters will be added to `bad_rows.txt`.

Fields supported (needed in header):

- mediaType
- name
- description
- downloadUrl
- userId
- tags (comma seperated)
- categories (comma seperated)
- startDate
- endDate

Note: Bulk upload will create categories and tags if they do not exist

## Usage

```
python kaltura_bulk.py -h
```


## Bad rows

If a row is not utf-8 or mac-roman the row is marked as a bad row, and added to `bad_rows.txt`. 

This way you can try and correct the bad rows yourself.


Change definition of bad rows
Change definition of bad rows
