summaryrefslogtreecommitdiffstats
path: root/tasks/notes.rake
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-05-26 18:22:10 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-05-26 18:22:10 +0200
commitd23181c138e8f0258641308ffd34370d3b132e8e (patch)
treef0e28aa0fed6b3093f091d12260637fbcc551c47 /tasks/notes.rake
downloadzorglub-d23181c138e8f0258641308ffd34370d3b132e8e.zip
zorglub-d23181c138e8f0258641308ffd34370d3b132e8e.tar.gz
initial commit
Diffstat (limited to 'tasks/notes.rake')
-rw-r--r--tasks/notes.rake27
1 files changed, 27 insertions, 0 deletions
diff --git a/tasks/notes.rake b/tasks/notes.rake
new file mode 100644
index 0000000..7f7ee79
--- /dev/null
+++ b/tasks/notes.rake
@@ -0,0 +1,27 @@
+# -*- coding: UTF-8 -*-
+#
+if HAVE_BONES
+
+desc "Enumerate all annotations"
+task :notes do |t|
+ id = if t.application.top_level_tasks.length > 1
+ t.application.top_level_tasks.slice!(1..-1).join(' ')
+ end
+ Bones::AnnotationExtractor.enumerate(PROJ, PROJ.notes.tags.join('|'), id, :tag => true)
+end
+
+namespace :notes do
+ PROJ.notes.tags.each do |tag|
+ desc "Enumerate all #{tag} annotations"
+ task tag.downcase.to_sym do |t|
+ id = if t.application.top_level_tasks.length > 1
+ t.application.top_level_tasks.slice!(1..-1).join(' ')
+ end
+ Bones::AnnotationExtractor.enumerate(PROJ, tag, id)
+ end
+ end
+end
+
+end # if HAVE_BONES
+
+# EOF