$ python manage.py shell
>>> from forum_modules.sximporter import importer
>>> from django.contrib.auth.models import User
>>> importer.sximport('/path/to/dir/with/xml/files/', {'authenticated_user': User.objects.get(id=1)})>>> importer.sximport('/tmp/se-import-data', {})>>> from forum_modules.sximporter import importer
>>> from south.db import db
>>> db.start_transaction()
>>> importer.sximport('/home/ramis/042012 Meta Server Fault', {})
['Users', 'Posts', 'Comments', 'Votes', 'Badges']
badges.xml
license.txt
posts.xml
users.xml$ python convert_to_sql.py /path/to/xml number_of_files$ python convert_to_sql.py /path/to/users.xml 4def escape(string):
return smart_unicode(escape_string(smart_str(string)))select * from forum_tag WHERE name LIKE 'cc.complexity-theory';id , name , created_by_id , created_at, used_count
'7', 'cc.complexity-theory', '1', '2012-11-16 18:47:40', '841'select count(*) from forum_node_tags where tag_id=7count(*)
'841'select count(*) from forum_node where tagnames like '%cc.complexity-theory%';count(*)
'841'To view this discussion on the web visit https://groups.google.com/d/msg/icqa/-/22Ntw_xtNOMJ.--
You received this message because you are subscribed to the Google Groups "iCQA" group.
To post to this group, send email to ic...@googlegroups.com.
To unsubscribe from this group, send email to icqa+uns...@googlegroups.com.
No. I don't have the StackOverflow data dump
mysql> select * from forum_tag where name like 'java';+----+------+---------------+---------------------+------------+| id | name | created_by_id | created_at | used_count |+----+------+---------------+---------------------+------------+| 70 | java | 1 | 2013-01-12 23:26:27 | 277652 |+----+------+---------------+---------------------+------------+1 row in set (0.11 sec)
mysql> select count(*) from forum_node_tags where tag_id=70;+----------+| count(*) |+----------+| 277651 |+----------+1 row in set (2.03 sec)
mysql> select count(*) from forum_node where tagnames rlike '[[:<:]]java[[:>:]]';+----------+| count(*) |+----------+| 286190 |+----------+1 row in set (27 min 33.82 sec)
I got an error like "ERROR : Duplicate entry ‘1’ for key ‘PRIMARY’"
Can someone help me?
Many thanks.
--
You received this message because you are subscribed to the Google Groups "iCQA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to icqa+uns...@googlegroups.com.
To post to this group, send email to ic...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/icqa/5f7b656f-0ef4-4b19-869a-082bacc7a91a%40googlegroups.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.