diff --git a/xml2typo3/mysql_connect.py b/xml2typo3/mysql_connect.py index 81aecd2..8c942a8 100755 --- a/xml2typo3/mysql_connect.py +++ b/xml2typo3/mysql_connect.py @@ -29,6 +29,30 @@ class DataBase: print "latest uid for %s is: %i" % (type, j) return j + def prepare_new_month(self): + #TODO Monatsvorlage rekursiv kopieren + # IDs der Kategorien aus config + next_month = "Februar" + parentid = 34 + doktype = 254 + perms_user = 31 + perms_group = 27 + hidden = 1 + tx_rgmenu_special = 5 + tstamp = str(int(mktime(datetime.now().timetuple()))) + sqlqueue="INSERT INTO `pages` (`pid`, `title`, `doktype`, `tstamp`, `perms_user`, `perms_group`, `hidden`, `tx_rgmenu_special`) \ + VALUES (" \ + + "'" + parentid + "'" \ + + "'" + next_month + "'" \ + + "'" + doktype + "'" \ + + "'" + tstamp + "'" \ + + "'" + perms_user + "'" \ + + "'" + perms_group + "'" \ + + "'" + hidden + "'" \ + + "'" + tx_rgmenu_special + "'" \ + + "');" + c.execute(sqlqueue) + def prepare_event(self): '''hiermit wird eine neue Veranstaltung in passender Form fuer die VCE Extension vorbereitet''' diff --git a/xml2typo3/typo3_einstellungen.conf b/xml2typo3/typo3_einstellungen.conf new file mode 100644 index 0000000..233bebc --- /dev/null +++ b/xml2typo3/typo3_einstellungen.conf @@ -0,0 +1,12 @@ +[Kategorien] +## IDs der Kategorienvorlage +Monatsvorlage = 58 +Live = 67 +Sonstiges = 66 +Lesungen = 65 +Bar = 64 +Sport = 63 +Familie = 61 +Party = 60 +Kino = 59 +