filetree_xml 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 934757547ddbd98597100f6cad2ef6578ec3bde8
4
+ data.tar.gz: 299dda8057705c93c35ce57c6be5c26ad9753b2d
5
+ SHA512:
6
+ metadata.gz: 363fd4ade162aa6e05e4faa4d4c304e7be66e0b24b1646172dc112ada9e672ecda1c838f4985831785c4e08577e7dabc949f99dc193851567926f4e482787f8f
7
+ data.tar.gz: 704979f6dcf8aeb00d3185312adcb092d8e23b6096616605a330a889aaa0c178a5905baecf6d697a97146eb950e4947338d80ea6d243d60fac0b4d43aacd367c
checksums.yaml.gz.sig ADDED
Binary file
data.tar.gz.sig ADDED
@@ -0,0 +1,2 @@
1
+ �w)���>�ߐj"��U<�٢��7��}�v'���Oa�f+Ϡm�\��M
2
+ r�Ϋך���ZR���Q��.K?O����'�s]�@^�����MXXB��x`�9b�̎d�����yB`~$�M>>(���[�e���a���$��&��p0x=�o�GT<��P(y�P��n�s��l��ئ�8yp�$# Mr1=x-�J���Aڭuel�؁W���8H�����#����淒 :ԩ>,|!�i�/�6�6���
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env ruby
2
+
3
+
4
+ # file: filetree_xml.rb
5
+
6
+
7
+ require 'polyrex'
8
+
9
+ class FileTreeXML
10
+
11
+
12
+ def initialize(x)
13
+
14
+ case x
15
+ when x[/^<?polyrex/]
16
+
17
+ @px = Polyrex.new
18
+
19
+ @px.import s
20
+ else
21
+ @px = Polyrex.new x
22
+
23
+ end
24
+
25
+ end
26
+
27
+ def ls(path='.')
28
+
29
+ a = path.split('/')
30
+
31
+ xpath = if a.length > 1 then
32
+ a.map {|x| "records/file[summary/title='%s']" % x }.join('/')
33
+ else
34
+ path
35
+ end
36
+
37
+ @px.xpath xpath + '/records/file/summary/title/text()'
38
+ end
39
+
40
+ end
metadata ADDED
@@ -0,0 +1,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: filetree_xml
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - James Robertson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
14
+ YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
15
+ 8ixkARkWAmV1MB4XDTE0MTIwNTIwMDU0NFoXDTE1MTIwNTIwMDU0NFowSDESMBAG
16
+ A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
17
+ EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
18
+ ggEBAKADKHITd+T/zauBZDZOlHb8jWKZLB46oVQ6GumbGoZz+TmndPMjy8X3h54k
19
+ BsKcNz8QuRVx8nzfPN+LJj4dXh+flda+7QRe6/0ZnHHWVcLatV2yQwSRCUtAl7H9
20
+ 3qOZZABN9QwAwaPmeXEsCqsgKFnkWt/O0L9jYdDh5dITmOgh9moURnSxL3Qnh04i
21
+ 7kxtMPtLQyBhQ0L6XBJ122pE16gqqiqaUj9oEM3vREWab4SKtY7j8ZwghjZ27gSt
22
+ u5GsucUP5iqe8e2EQj/9m4aPZOTW8VbdYiLCG3rVCLVocspMMZOku8aTyM30ABnt
23
+ KvDrbbstuh4yNUsQcrAKknARRpMCAwEAAaOBijCBhzAJBgNVHRMEAjAAMAsGA1Ud
24
+ DwQEAwIEsDAdBgNVHQ4EFgQUbvlDAV+GkO/WQ0/uC1DDBDsuQfowJgYDVR0RBB8w
25
+ HYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1h
26
+ c3RlckBqYW1lc3JvYmVydHNvbi5ldTANBgkqhkiG9w0BAQUFAAOCAQEAQzhu8Ynr
27
+ WXA0EUIuEERtMudK73WI88CAPZpan0O1Z135aYFRwK0TaiwlzNgc953thsSth7hW
28
+ XHRIs5dvrnPz7GnMinD1OqnMma/GVGca0S8koQx6MbOQa/hcWJh9FgizROHpRiXP
29
+ TE9M230Jnafy8NFu5Ilgh764/wU5b3W5ogAHQtsOw6CDjKHhHg/IUpKpdIOuKLZO
30
+ cC/vNX+gE+cs1Ih8GP6AjvZ908TFyZIXjIGoSi38z2An4qkK60QHXWb92qY3Sq86
31
+ eWaxnsFG/W70xEvBmUlmR1gNHD073KLCoiL9raXAwieV4XA5ezW8ph9nYDrf/lLY
32
+ PSXhbfB1igzLQg==
33
+ -----END CERTIFICATE-----
34
+ date: 2014-12-05 00:00:00.000000000 Z
35
+ dependencies:
36
+ - !ruby/object:Gem::Dependency
37
+ name: polyrex
38
+ requirement: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '0.9'
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: 0.9.12
46
+ type: :runtime
47
+ prerelease: false
48
+ version_requirements: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - "~>"
51
+ - !ruby/object:Gem::Version
52
+ version: '0.9'
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 0.9.12
56
+ description:
57
+ email: james@r0bertson.co.uk
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - lib/filetree_xml.rb
63
+ homepage: https://github.com/jrobertson/filetree_xml
64
+ licenses:
65
+ - MIT
66
+ metadata: {}
67
+ post_install_message:
68
+ rdoc_options: []
69
+ require_paths:
70
+ - lib
71
+ required_ruby_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ required_rubygems_version: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ requirements: []
82
+ rubyforge_project:
83
+ rubygems_version: 2.2.2
84
+ signing_key:
85
+ specification_version: 4
86
+ summary: Represents a file tree in a Polyrex document
87
+ test_files: []
metadata.gz.sig ADDED
Binary file