ardour_git 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,30 @@
1
+ ardour-git-cli
2
+ ==============
3
+
4
+ ardour-git is a plugin for ardour to commit and push automatically to a git repository.
5
+ This project is part of the Audio-git project which aims to enable people to freely share the "source code" for audio projects.
6
+
7
+ REQUIREMENTS
8
+ ------------
9
+
10
+ * Ruby 1.9
11
+
12
+ USAGE
13
+ -----
14
+
15
+ * ardour-git --create name_of_project : create a new project
16
+ * ardour-git --save : save current ardour session and files
17
+ * ardour-git --clone project_url : clone an existing project
18
+ * ardour-git --watch : watch session for changes
19
+ * ardour-git --publish name_of_version : publish a version
20
+ * ardour-git --show : show published versions
21
+
22
+ TODO
23
+ ----
24
+
25
+ * First run: Create git repository if not created
26
+ * First run: ask for remote repository
27
+ * (First run: if not provided, create automatically remote repository => later?)
28
+ * Add required files according to session file (Ardour xml files + others)
29
+ * Watch for change in Ardour xml file => include session files by parsing Ardour xml file
30
+ * Publish a new version to public (=create a tag)
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'trollop'
4
+ require_relative '../lib/ardour_git'
5
+
6
+ opts = Trollop::options do
7
+ opt :init, 'Initialize a new repository for current Ardour project'
8
+ opt :save, 'Save the current session'
9
+ end
10
+
11
+ ArdourGit.new.command(opts)
@@ -0,0 +1,22 @@
1
+ require_relative 'ardour_git/ardour_files'
2
+ require_relative 'ardour_git/git_repository'
3
+
4
+ class ArdourGit
5
+ def command(opts)
6
+ if opts[:init]
7
+ create
8
+ elsif opts[:save]
9
+ save
10
+ end
11
+ end
12
+
13
+ def create
14
+ GitRepository.create
15
+ end
16
+
17
+ def save
18
+ files = ArdourFiles.list
19
+ GitRepository.add(files)
20
+ GitRepository.commit('test')
21
+ end
22
+ end
@@ -0,0 +1,14 @@
1
+ require_relative 'session_parser'
2
+ require_relative 'session_finder'
3
+
4
+ class ArdourFiles
5
+ def self.list
6
+ files = []
7
+ session_files = SessionFinder.list
8
+ files.concat(session_files)
9
+ session_files.each do |session|
10
+ files.concat(SessionParser.list_audio_files(session))
11
+ end
12
+ files
13
+ end
14
+ end
@@ -0,0 +1,17 @@
1
+ require 'git'
2
+
3
+ class GitRepository
4
+ def self.create
5
+ Git.init
6
+ end
7
+
8
+ def self.add(files)
9
+ g = Git.open('.')
10
+ g.add(files)
11
+ end
12
+
13
+ def self.commit(message)
14
+ g = Git.open('.')
15
+ g.commit_all(message)
16
+ end
17
+ end
@@ -0,0 +1,5 @@
1
+ class SessionFinder
2
+ def self.list
3
+ Dir.glob('*.ardour')
4
+ end
5
+ end
@@ -0,0 +1,12 @@
1
+ require 'rexml/document'
2
+
3
+ class SessionParser
4
+ def self.list_audio_files(xml)
5
+ doc = REXML::Document.new xml
6
+ audio_files = []
7
+ doc.elements.each('Session/Sources/Source') do |element|
8
+ audio_files << element.attributes['name']
9
+ end
10
+ audio_files
11
+ end
12
+ end
metadata ADDED
@@ -0,0 +1,52 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ardour_git
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Merouane Atig
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-06-25 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Version Ardour projects with git
15
+ email: merouane.atig@gmail.com
16
+ executables:
17
+ - ardour_git
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - lib/ardour_git/session_parser.rb
22
+ - lib/ardour_git/ardour_files.rb
23
+ - lib/ardour_git/session_finder.rb
24
+ - lib/ardour_git/git_repository.rb
25
+ - lib/ardour_git.rb
26
+ - bin/ardour_git
27
+ - README.md
28
+ homepage: https://github.com/AMMD/ardour-git
29
+ licenses: []
30
+ post_install_message:
31
+ rdoc_options: []
32
+ require_paths:
33
+ - lib
34
+ required_ruby_version: !ruby/object:Gem::Requirement
35
+ none: false
36
+ requirements:
37
+ - - ! '>='
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ required_rubygems_version: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ requirements: []
47
+ rubyforge_project:
48
+ rubygems_version: 1.8.22
49
+ signing_key:
50
+ specification_version: 3
51
+ summary: Ardour git
52
+ test_files: []