Hi Matt,
Sorry for the late answer, but i was away from my project for a couple of weeks to clear my head out. Thanks a lot for the pointer to Twill. Using it the creation of tickets worked just fine. CU Max Matt Good schrieb:
Jorge Bernal wrote: > El 16/12/2006, a las 6:33, Matt Good escribió: > > > > > koke wrote: > >> mb ha escrito: > >> > >>> Hi, > >>> > >>> is it possible to create tickets via script (if possible without > >>> python). > >>> > >>> Like so: wget http://TRACINSTALLATION/newticket?summary=Blah.... or > >>> similar > >>> > >>> Max > >> > >> This worked for me... > >> > >> curl https://projects.warp.es/projects/test/newticket --data > >> "summary=Test%201&description=test% > >> 20ticket&type=defect&[EMAIL PROTECTED]&action=create&status=ne > >> w" > > > > That site is running Trac 0.9.5. This will not work on Trac versions > > 0.10.1 or newer. POSTs are required to contain a unique token to > > prevent Cross Site Request Forgery attacks as addressed here: > > http://trac.edgewall.org/ticket/4049 > > Right, I though we were using the last version. Anyway this one works > for me... > > #!/bin/sh > > TRAC_SITE="http://www.hosted-projects.com/trac/TracDemo/Demo" > TMP_FILE=$( mktemp trac-ticket.XXXXXX ) > > curl -s -c ${TMP_FILE} "${TRAC_SITE}/newticket" > /dev/null > FORM_TOKEN=$( cat ${TMP_FILE} | grep "trac_form_token" | awk '{print > $7}' ) > DATA="summary=Test%201&description=test% > 20ticket&type=defect&[EMAIL PROTECTED]&action=create&status=new&_ > _FORM_TOKEN=${FORM_TOKEN}" > > curl "${TRAC_SITE}/newticket" --data "${DATA}" --cookie "${TMP_FILE}" > > rm ${TMP_FILE} This is the equivalent for twill: #!/usr/bin/env twill-sh setlocal trac_site http://www.hosted-projects.com/trac/TracDemo/Demo go ${trac_site}/newticket fv 2 reporter [EMAIL PROTECTED] fv 2 summary Test fv 2 type defect fv 2 description test submit "Submit ticket" -- Matt Good
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en -~----------~----~----~----~------~----~------~--~---
