<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,15 +1,17 @@
 art_generators - Create &amp; manage the lifecycle of digital art projects
 ======================================================================
 
-NOT READY FOR USE YET.
+NOT READY FOR USE YET
+
+NOT ALL DESCRIBED FEATURES ARE IMPLEMENTED
 
 Currently only SVG-based projects are supported.
 
 Inspired by Ruby on Rails.
 
 
-Making a Project
-----------------
+Creating a Project
+------------------
 
 &gt; art_project project-name
 
@@ -21,9 +23,11 @@ Edit README to describe the project, and COPYING to describe the license terms o
 
 The Resources folder contains template.svg, which you can edit to set a default paper size and other features.
 
+If you specify a version control system as an option (e.g. --git), the project directory will be initialised for that system and the project scripts will try to work with it.
+
 
-Making a Work
--------------
+Creating a Work
+---------------
 
 In the project folder, type:
 
@@ -49,16 +53,73 @@ Specifying works to copy with a slash in the name will cause the work to be copi
 Changing a Work's Status
 ------------------------
 
-TODO
+&gt; script/status --final mywork.svg
+
+Copies the file mywork.svg from workspace directory to the final directory.
+
+If you are using git or svn to version control the project this command notifies them of the change.
 
 
 Creating a Release of a Project
 -------------------------------
 
-TODO
+&gt; script/release 0.1
+
+Creates an archive called project_name_0.1.tar.gz containing the final, discard and preparatory folders along with the LICENSE and README files.
 
 
 Creating a Web Page for a Project
 ---------------------------------
 
-TODO
+&gt;script/web
+
+Creates png images and thumbnails of the contents of the final directory and creates a web page containing them in the web directory.
+
+
+Example of Use
+--------------
+
+Create a project:
+
+&gt; art_project test
+
+Change to the project directory:
+
+&gt; cd test
+
+Create a work:
+
+&gt; script/work first.svg
+
+Edit it:
+
+&gt; inkscape preparatory/first.svg
+
+Create various other works and edit them:
+
+&gt; script/work -c first.svg workX.svg
+...
+
+Decide some are good and some are bad:
+
+&gt; script/status --final work1.svg
+&gt; script/status --discard work2.svg
+...
+
+Make a release archive:
+
+&gt; script/release 0.0.1
+
+make a web page:
+
+&gt; script/web
+
+Have a rest, then start making more works.
+
+
+Design Notes
+------------
+
+The directory structure and the tasks performed by the scripts come from the workflow Rob Myers developed for use in his own digital art projects.
+
+The idea of a system to generate a well-structured system of directories, files and scripts for use in a workflow comes from Ruby on Rails.</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,19 @@
+#    art_generators - create and manage digital art project directory structures
+#    Copyright (C) 2008 Rob Myers
+# 
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+# 
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+# 
+#    You should have received a copy of the GNU General Public License
+#    along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
+
 Gem::Specification.new do |s|
    s.name = %q{art_generators}
    s.version = &quot;0.0.1&quot;</diff>
      <filename>art_generators.gemspec</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,22 @@
 #!/usr/bin/env ruby
 
+#    art_generators - create and manage digital art project directory structures
+#    Copyright (C) 2008 Rob Myers
+# 
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+# 
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+# 
+#    You should have received a copy of the GNU General Public License
+#    along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
+
 bindir = File.dirname(__FILE__)
 rootdir = File.dirname(bindir) 
 
-require rootdir + '/generator/project.rb'
\ No newline at end of file
+require rootdir + '/generator/project.rb'</diff>
      <filename>bin/art_project</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,21 @@
 #!/usr/env ruby
 
+#    art_generators - create and manage digital art project directory structures
+#    Copyright (C) 2008 Rob Myers
+# 
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+# 
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+# 
+#    You should have received a copy of the GNU General Public License
+#    along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
+
 # == Synopsis
 #    Creates a directory structure for an SVG-based art project
 #    and populates it with useful resources and scripts.
@@ -18,6 +34,9 @@
 #   -v, --version       Display version number
 #   -a, --artist        Your name
 #   -l, --license       Set the Creative Commons license URL for the project
+#   -g, --git           Use the git version control system for the project
+#   -d, --date          The year(s) for the copyright message
+#
 #
 # == Author
 #    Rob Myers &lt;rob@robmyers.org&gt;
@@ -29,8 +48,9 @@
 
 require 'fileutils'
 require 'optparse' 
+require 'ostruct'
 require 'rdoc/usage'
-
+#require 'liblicense'
 
 class ArtProject
   VERSION = &quot;0.0.1&quot;
@@ -43,12 +63,7 @@ class ArtProject
     @source_dir = File.dirname(@generator_dir)
     @template_dir = @source_dir + '/templates'
     
-    @project_name = ''
-    @project_license_id = ''
-    @project_license_metadata = ''
-    @project_license_full_text = ''
-    @project_dir = ''
-    @project_artist = ''
+    initialize_project_details
   end
   
   def run
@@ -62,16 +77,29 @@ class ArtProject
   
   protected
   
+  def initialize_project_details
+    @project = OpenStruct.new
+    @project.name = ''
+    @project.license_id = ''
+    @project.license_metadata = ''
+    @project.license_full_text = ''
+    @project.dir = ''
+    @project.artist = ''
+    @project.use_git = false
+    @project.use_svn = false
+  end
+  
   def parsed_options?
     opts = OptionParser.new       
     opts.on('-v', '--version')  { output_version ; exit 0 }
     opts.on('-h', '--help')     { output_help }
-    opts.on('-l', '--license')  do |license|
-      @project_license_id &lt;&lt; license || ''
-    end       
-    opts.on('-a', '--artist')  do |artist|
-      @project_artist &lt;&lt; artist || ''
-    end       
+    opts.on(&quot;-g&quot;, &quot;--git&quot;)      {|git| @project.use_git &lt;&lt; git}
+    #opts.on(&quot;-s&quot;, &quot;--svn&quot;)     {|svn| @project.use_svn &lt;&lt; svn}
+    #opts.on('-l LICENSE', '--license LICENSE')  do |license|
+    #  @project.license_id &lt;&lt; license
+    #end 
+    opts.on('-a', '--artist')  { |artist| @project.artist &lt;&lt; artist }
+    opts.on(&quot;-d DATE&quot;, &quot;--date DATE&quot;) {|date| @project.date &lt;&lt; date}
     # This consumes matched arguments from @arguments
     opts.parse!(@arguments) rescue return false
     process_options
@@ -92,13 +120,17 @@ class ArtProject
     if @arguments[0] == nil
       return false
     end
+    #if @project.git &amp;&amp; @project.svn
+    #  puts &quot;Both git and svn specified. Please one or the other, not both.&quot;
+    #  return false
+    #end
     #TODO Check the licence id is valid
     true
   end
   
   def process_arguments
-    @project_name = @arguments[0] # nil if unsupplied
-    @project_dir = Dir.pwd + &quot;/&quot; + @project_name
+    @project.name = @arguments[0] # nil if unsupplied
+    @project.dir = Dir.pwd + &quot;/&quot; + @project.name
   end
   
   def output_help
@@ -120,17 +152,20 @@ class ArtProject
   end
   
   def make_directories
-    FileUtils.mkdir_p @project_dir
-    FileUtils.mkdir_p @project_dir + &quot;/discard&quot;
-    FileUtils.mkdir_p @project_dir + &quot;/final&quot;
-    FileUtils.mkdir_p @project_dir + &quot;/preparatory&quot;
-    FileUtils.mkdir_p @project_dir + &quot;/releases&quot;
-    FileUtils.mkdir_p @project_dir + &quot;/resources&quot;
-    FileUtils.mkdir_p @project_dir + &quot;/script&quot;
+    if File.exists? @project.dir
+      die &quot;Cannot create project. Directory named {@project.dir} already exists. Please rename or move the existing directory.&quot;
+    end
+    FileUtils.mkdir_p @project.dir
+    FileUtils.mkdir_p @project.dir + &quot;/discard&quot;
+    FileUtils.mkdir_p @project.dir + &quot;/final&quot;
+    FileUtils.mkdir_p @project.dir + &quot;/preparatory&quot;
+    FileUtils.mkdir_p @project.dir + &quot;/releases&quot;
+    FileUtils.mkdir_p @project.dir + &quot;/resources&quot;
+    FileUtils.mkdir_p @project.dir + &quot;/script&quot;
   end
   
   def make_script_link(name)
-    script=@project_dir + &quot;/script/&quot; + name
+    script=@project.dir + &quot;/script/&quot; + name
     File.open(script, 'w') {|f| 
       f.puts(&quot;#!/usr/bin/env ruby&quot;)
       f.puts(&quot;$project_dir=File.dirname(File.dirname(File.expand_path(__FILE__)))&quot;)
@@ -145,14 +180,19 @@ class ArtProject
   end
   
   def make_files
-    File.open(@project_dir + &quot;/resources/license.xml&quot;, 'w') {|f| 
-      f.write(@project_license_metadata) }
-    File.open(@project_dir + &quot;/COPYING&quot;, 'w') {|f| 
-      f.write(@project_license_full_text) }
-    File.open(@project_dir + &quot;/README&quot;, 'w') {|f| 
-      f.write(@project_name + &quot; by &quot; + @project_artist +
+    File.open(@project.dir + &quot;/resources/license.xml&quot;, 'w') {|f| 
+      f.write(@project.license_metadata) }
+    File.open(@project.dir + &quot;/COPYING&quot;, 'w') {|f| 
+      f.write(@project.license_full_text) }
+    File.open(@project.dir + &quot;/README&quot;, 'w') {|f| 
+      f.write(@project.name + &quot; by &quot; + @project.artist +
               &quot;.\nSee COPYING for license.\n&quot;) }
-    FileUtils.cp(@template_dir + &quot;/template.svg&quot;, @project_dir + &quot;/resources&quot;)
+    FileUtils.cp(@template_dir + &quot;/template.svg&quot;, @project.dir + &quot;/resources&quot;)
+  end
+  
+  def initialize_version_control
+    Kernel.system('git-init') if @project.use_git
+    #Kernel.system('svn-init') if @project.use_svn
   end
   
   def process_command
@@ -160,6 +200,7 @@ class ArtProject
     make_directories
     make_script_links
     make_files
+    initialize_version_control
   end
 end
 </diff>
      <filename>generator/project.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,21 @@
 #!/usr/env ruby
 
+#    art_generators - create and manage digital art project directory structures
+#    Copyright (C) 2008 Rob Myers
+# 
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+# 
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+# 
+#    You should have received a copy of the GNU General Public License
+#    along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
+
 require 'optparse' 
 require 'rdoc/usage'
 </diff>
      <filename>generator/release.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,21 @@
 #!/usr/env ruby
 
+#    art_generators - create and manage digital art project directory structures
+#    Copyright (C) 2008 Rob Myers
+# 
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+# 
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+# 
+#    You should have received a copy of the GNU General Public License
+#    along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
+
 #TODO: Ruby port of the web page creator
 
 require 'optparse' </diff>
      <filename>generator/web.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,21 @@
 #!/usr/env ruby
 
+#    art_generators - create and manage digital art project directory structures
+#    Copyright (C) 2008 Rob Myers
+# 
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+# 
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+# 
+#    You should have received a copy of the GNU General Public License
+#    along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
+
 require 'fileutils'
 require 'optparse' 
 require 'rdoc/usage'
@@ -56,9 +72,9 @@ class ArtWork
   
   def parsed_options?
     opts = OptionParser.new       
-    opts.on('-v', '--version')  { output_version ; exit 0 }
-    opts.on('-h', '--help')     { output_help }
-    opts.on('-c FILE', '--copy FILE')     do |source|
+    opts.on('-v', '--version')        { output_version ; exit 0 }
+    opts.on('-h', '--help')           { output_help }
+    opts.on('-c FILE', '--copy FILE') do |source|
       @source_work_name = &quot;#{@work_dir}/#{source}&quot; || 
         &quot;#{@resource_dir}/template.svg&quot;
     end
@@ -100,13 +116,35 @@ class ArtWork
     puts &quot;#{File.basename(__FILE__)} version #{VERSION}&quot;
   end
   
-  def make_work
+  def make_work_file
     FileUtils.cp(@source_work_name, 
                  @destination_work_name)
   end
-  
+   
+  def using_git?
+    File.exists?(&quot;#{@project_path}/.git&quot;)
+  end
+   
+  def using_svn?
+      File.exists?(&quot;#{@project_path}/.svn&quot;)
+  end
+
+  def add_work_to_version_control
+    if using_git?
+      Kernel.system(&quot;git add  #{@destination_work_name}&quot;)
+    end
+    if using_svn?
+      Kernel.system(&quot;svn add  #{@destination_work_name}&quot;)
+    end
+  end
+
   def process_command
-    make_work
+    if File.exists? @destination_work_name
+      puts &quot;File already exists #{@destination_work_name}&quot;
+      exit 1
+    end
+    make_work_file
+    add_work_to_version_control
   end
 end
 </diff>
      <filename>generator/work.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,20 @@
 #!/bin/bash
 
+#    art_generators - create and manage digital art project directory structures
+#    Copyright (C) 2008 Rob Myers
+# 
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+# 
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+# 
+#    You should have received a copy of the GNU General Public License
+#    along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
+
 gem build art_generators.gemspec
 </diff>
      <filename>make_gem</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,21 @@
 #!/bin/bash
 
+#    art_generators - create and manage digital art project directory structures
+#    Copyright (C) 2008 Rob Myers
+# 
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+# 
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+# 
+#    You should have received a copy of the GNU General Public License
+#    along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
+
 # Utility function
 
 die(){</diff>
      <filename>test_gem</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4936fe4cdbdea34e451659dab9fc588615d7caaa</id>
    </parent>
  </parents>
  <author>
    <name>Rob Myers</name>
    <email>rob@robmyers.org</email>
  </author>
  <url>http://github.com/robmyers/art_generators/commit/4302916f80ba9b2beffb121f097ea6f91c19e9f1</url>
  <id>4302916f80ba9b2beffb121f097ea6f91c19e9f1</id>
  <committed-date>2008-08-29T14:26:31-07:00</committed-date>
  <authored-date>2008-08-29T14:26:31-07:00</authored-date>
  <message>Added GPL3 header to files, tidied up code, added some git support, fleshed out README.</message>
  <tree>5be463834569d9165e06856dcb88f47e3de44338</tree>
  <committer>
    <name>Rob Myers</name>
    <email>rob@robmyers.org</email>
  </committer>
</commit>
