[[PageOutline(2-5,Contents,pullout)]] = Remotely editing Trac using a command line interface == Description This script is a command line interface allowing the manipulation of Trac objects. It is a Python based interface to the most used Trac functions. For example, it can be used to script releases and help build release candidates. Key features: * reading wiki pages * editing wiki pages from the shell, commit message style * reading tickets or ticket attributes * creating tickets * updating ticket attributes A wrapper for editing wiki pages directly inside emacs is also included, though this is rudimentary. See the following examples: Getting a ticket: {{{#!sh $ traccmd.py ticket 1 1 status reopened 1 type defect 1 description Test patch 1 description 1 description Something went tits. Fix it! 1 reporter admin 1 cc 1 ticket_status sign off requested 1 component tech.homepage 1 summary Test patch 1 priority minor 1 owner nferrier 1 version 1 milestone 1 keywords 1 resolution fixed }}} Getting a ticket attribute: {{{#!sh $ traccmd.py ticketdetail 1 resolution #1 resolution: fixed }}} Getting a wiki page: {{{#!sh $ traccmd.py wiki TracGuide | head -n15 (:tracwikiproperties ( :comment "" :lastModified "20090410T15:29:13" :version "2" :name "TracGuide" :author "trac" )) = The Trac User and Administration Guide = [[TracGuideToc]] The TracGuide is meant to serve as a starting point for all documentation regarding Trac usage and development. The guide is a free document, a collaborative effort, and a part of the [http://trac.edgewall.org Trac Project] itself. == Table of Contents == Currently available documentation: * TracGuide (This page) -- Documentation starting point. }}} A more complex example is the use in a release candidate maker, where a number of repos in a distributed revision control system are pulled together to make a release candidate: {{{#!sh traccmd.py ticket $TICKETS \ | sed -rne 's,^([0-9]+).*[^h](http(s)*://hg.woome.com/[^] ]+).*,\1 \2,p' \ | awk '{print $2}' \ | xargs hg in }}} This shows incoming patches from hg repos mentioned in $TICKETS. == Bugs/Feature Requests Existing bugs and feature requests for TracCmdScript are [report:9?COMPONENT=TracCmdScript here]. If you have any issues, create a [/newticket?component=TracCmdScript new ticket]. [[TicketQuery(component=TracCmdScript&group=type,format=progress)]] == Download Download the zipped source from [export:traccmdscript here]. == Source You can check out TracCmdScript from [/svn/traccmdscript here] using Subversion, or [source:traccmdscript browse the source] with Trac. == Installation General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page. The xmlrpc support must be enabled by installing XmlRpcPlugin, as everything is done via xmlrpc. == Recent Changes [[ChangeLog(traccmdscript, 3)]] == Author/Contributors '''Author:''' [wiki:nicferrier] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:'''