| ## Exporter settings for the SMF Exporter |
| |
| ## Class that handles the export - Don't change this |
| exporter.class=com.atlassian.uwc.exporters.SMFExporter |
| |
| ## Database settings - Set These to your database settings. |
| ## url = networking connection to your database |
| ## name = your database's name |
| ## user/pass = your login credentials to this database |
| db.url=jdbc:mysql://localhost:3306 |
| db.name= |
| db.user= |
| db.pass= |
| ## Your jdbc driver class. |
| ## If you're using something other than Mysql: |
| ## -- Set this to the correct class, and |
| ## -- add the driver jar to the lib directory before starting the UWC |
| jdbc.driver.class=com.mysql.jdbc.Driver |
| |
| ## Output dir - Set this to wherever you want the export to go |
| output.dir=/Users/laura/tmp |
| |
| ## SQL - Set these as necessary |
| |
| ## The character encoding that you want the data to export to. |
| ## This should probably match whatever your database was already doing. |
| db.encoding=utf-8 |
| |
| ## You will probably need to update table or column names. |
| ## To see the table names in your database, try this SQL or something similar: |
| ## $sql-shell$ show tables; |
| ## To see the column names for any table, try this SQL or something similar: |
| ## $sql-shell$ show columns from [table]; |
| ## You can also customize each SQL statement by adjusting the db.sql.xyz |
| ## properties. |
| ## Depending on your SMF, you may need to use different |
| ## SQL statements and settings, although the SQL has been generalized as much as possible. |
| ## Note: You can (but you don't have to) use column property names in the SQL. |
| ## It looks like this: select {column.property.name}... |
| ## This makes multiple references to the same column easier to change. |
| |
| ## Category SQL: |
| ## Finds the id and name for categories that should be exported |
| db.col.cat.id=id_cat |
| db.col.cat.name=name |
| db.table.cat=smf_categories |
| db.sql.cat=select {db.col.cat.id},{db.col.cat.name} from {db.table.cat}; |
| |
| ## Board SQL: |
| ## Finds the id, category id, child level, parent id, parent "type" (brd or cat), name, and description of each board that should be exported |
| db.col.board.id=id_board |
| db.col.board.cat=id_cat |
| db.col.board.level=child_level |
| db.col.board.parent=id_parent |
| db.col.board.parenttype=parenttype |
| db.col.board.name=name |
| db.col.board.desc=description |
| db.table.board=smf_boards |
| db.sql.board=select {db.col.board.id},{db.col.board.cat},{db.col.board.level},{db.col.board.parent},{db.col.board.name},{db.col.board.desc},(case when {db.col.board.parent}='0' then 'cat' else 'brd' end) as {db.col.board.parenttype} from {db.table.board}; |
| |
| ## Message SQL: |
| ## Finds the id, topic id, board id, user id, username, user's email, post time, subject, body, and whether the message is the first in the topic or not (a reply) for each message should be exported |
| db.col.msg.id=m.id_msg |
| db.col.msg.topic=m.id_topic |
| db.col.msg.board=m.id_board |
| db.col.msg.userid=m.id_member |
| db.col.msg.username=m.poster_name |
| db.col.msg.useremail=m.poster_email |
| db.col.msg.time=m.poster_time |
| db.col.msg.title=m.subject |
| db.col.msg.content=m.body |
| db.col.msg.isfirst=is_first |
| db.col.msg.firstid=t.id_first_msg |
| db.table.msg=smf_messages |
| db.sql.messages=select {db.col.msg.id},{db.col.msg.topic},{db.col.msg.board},{db.col.msg.userid},{db.col.msg.username},{db.col.msg.useremail},{db.col.msg.time},{db.col.msg.title},{db.col.msg.content},{db.col.msg.firstid},(case when m.id_msg=t.id_first_msg then 'true' else 'false' end) as {db.col.msg.isfirst} from {db.table.msg} as m left join smf_topics as t on (m.id_topic = t.id_topic); |
| |
| ## Attachment SQL: |
| ## Finds each attachment id, thumb id (points to orig attachment id, if is a thumbnail), message id, filename, and file hash (if necessary, see below) for each attachment that should be exported |
| ## NOTE: Different SMFs use different naming conventions for the attachment filenames. |
| ## We accomodate two types here: |
| ## Default: Hash Saved in Database. This has the following properties: |
| ## - the filehash is a column in the attachments table |
| ## - attachments on the file system have names like: 1_1369c5b06a8394704b9bd20d8e6e9191eda82494 |
| ## ALTERNATE: Hash generated from md5 of filename. This has the folllowing properties: |
| ## - there is no filehash column in the attachments table |
| ## - attachments on the file system have names like: 2_filename_jpg5e8509b45f7d472fdc99042f64270ff4 |
| ## If your database is following the alternate model, uncomment the ALTERNATE settings and |
| ## comment the default ones. |
| db.col.att.id=id_attach |
| db.col.att.thumb=id_thumb |
| db.col.att.message=id_msg |
| db.col.att.name=filename |
| db.col.att.hash=file_hash |
| ## ALTERNATE: |
| ## db.col.att.hash=notusing |
| db.table.att=smf_attachments |
| db.sql.att=select {db.col.att.id},{db.col.att.thumb},{db.col.att.message},{db.col.att.name},{db.col.att.hash} from {db.table.att}; |
| ## ALTERNATE: |
| ## db.sql.att=select {db.col.att.id},{db.col.att.thumb},{db.col.att.message},{db.col.att.name},(case when 1 then "false" end) as {db.col.att.hash} from {db.table.att}; |
| db.att.hashInSQL=true |
| ## ALTERNATE: |
| ## db.att.hashInSQL=false |