myoutline 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +2 -0
- data/lib/myoutline.rb +41 -0
- data.tar.gz.sig +1 -0
- metadata +86 -0
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a7394a16eb83f29960b2ec4c950249cd179be991
|
4
|
+
data.tar.gz: e184d6afa6f2175956d3290f6923c01276b58691
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9458579e68f654698729272ba8e453f176374a25ecea51461a029ed072af8e3ea5b8a853b9475b5c77f33e07245bf04523b030da1d220f2147e43d975bdf9f0d
|
7
|
+
data.tar.gz: 5bc3e5646a49e7522cd05e8c28a9b4ac6bc9c32282d5bc56c6e4524757c42bb0773320677c7c852e10f880e2adfbe67e5a296a865dfbbfa7d75b1a8b5999ed02
|
checksums.yaml.gz.sig
ADDED
data/lib/myoutline.rb
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# file: myoutline.rb
|
4
|
+
|
5
|
+
require 'pxindex'
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
class MyOutline
|
10
|
+
|
11
|
+
def initialize(raw_s, debug: false)
|
12
|
+
|
13
|
+
# find the entries which aren't on the main index
|
14
|
+
s = raw_s.sub(/<[^>]+>\n/,'')
|
15
|
+
doc = LineTree.new(s, debug: debug).to_doc(encapsulate: true)
|
16
|
+
a = doc.root.xpath('entry/text()')
|
17
|
+
a2 = doc.root.xpath('entry//entry/text()')
|
18
|
+
a3 = a2 - a
|
19
|
+
|
20
|
+
# add the new entries to the main index
|
21
|
+
s << a3.join("\n")
|
22
|
+
|
23
|
+
s.prepend '<?ph schema="entries/entry[title]"?>
|
24
|
+
|
25
|
+
'
|
26
|
+
|
27
|
+
@pxi = PxIndex.new(s, debug: debug)
|
28
|
+
@px = @pxi.to_px
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
def save(filename=myoutline.txt)
|
33
|
+
File.write filename, @pxi.to_s
|
34
|
+
end
|
35
|
+
|
36
|
+
def to_s()
|
37
|
+
@pxi.to_s
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
|
data.tar.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
�"�S���IϿ�`��H@O;�Nd������c\�v�?B�zf���M��{A�rRy`��k�ӽ8ay�g�ɥG�X��R�!�p�`�ktB�nEҴhX�$�\��j�\�)�A|�c
|
metadata
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: myoutline
|
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
|
+
MIIDXjCCAkagAwIBAgIBATANBgkqhkiG9w0BAQUFADAsMSowKAYDVQQDDCFnZW1t
|
14
|
+
YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMTgwMzE2MDkzNzMyWhcN
|
15
|
+
MTkwMzE2MDkzNzMyWjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
|
16
|
+
cnRzb24vREM9ZXUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDmw8ez
|
17
|
+
0Fu54YodAyszPu1V/4n713Kj/PpK0ljLndPpYve04yZLTznWIgklk2iRSDhj1eco
|
18
|
+
r94LZm7c4Ev6nYqF5AGOcZRJE0/TbeOc8YijW19+epvYZDRXzxQBtl5m3N2tMx7o
|
19
|
+
TRDg2LARgEaGo1muHpJUeaIMHv/zHQf7wBTY31Pi/t6qE9GPlQzoDW5newihQ6PR
|
20
|
+
QgzHQaRgLW8JIjBi0b6EQjFC8MpXg+ZhLsgYPw+xqlLMrLyB9m02SqimIbek3hIF
|
21
|
+
Jy2kX+AOuQQ9dh+LRMdBLHHJyoIJk7CflwtpRNhsu/IaoDmoVgP0tqZo7R1IjTAi
|
22
|
+
S5l2XkJ/L4wuOtZDAgMBAAGjgYowgYcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
|
23
|
+
HQYDVR0OBBYEFMS1Y3RLQL7dg3mw6LVqg3BU4czgMCYGA1UdEQQfMB2BG2dlbW1h
|
24
|
+
c3RlckBqYW1lc3JvYmVydHNvbi5ldTAmBgNVHRIEHzAdgRtnZW1tYXN0ZXJAamFt
|
25
|
+
ZXNyb2JlcnRzb24uZXUwDQYJKoZIhvcNAQEFBQADggEBAJc2Wd+jJiB8pdwroE2e
|
26
|
+
cQCovaJIZnyK4FbTpOevdokOI2im0t2r6lhWhCQFRewbo4LX/XGGt22Z+5y5rT7q
|
27
|
+
1R18u75twc1BeZ4NkQYXoNVEbjPLndGEe9LCVEUYb2TWY0JsJ1IiqFVMpdf1Gz6k
|
28
|
+
abi7w/9EcIXEVg+GCgCgZdGbsL3bNBAfLzBMXrJQMigHa6fjfXHgNUKjoZDPTtk/
|
29
|
+
Y22/SEiQpELwc2kK/U150X4UGs9JmwI+9QkXXYYcld4S1SueK8gkqzS/FJ+fzdzT
|
30
|
+
DFhc5TDtqEkJYiaiznQFl34HUKeCAdeAHkmD8jP3fUC8O7zcLXq69EAXGMXw4efB
|
31
|
+
3Co=
|
32
|
+
-----END CERTIFICATE-----
|
33
|
+
date: 2018-03-16 00:00:00.000000000 Z
|
34
|
+
dependencies:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: pxindex
|
37
|
+
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0.1'
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: 0.1.3
|
45
|
+
type: :runtime
|
46
|
+
prerelease: false
|
47
|
+
version_requirements: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - "~>"
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0.1'
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.1.3
|
55
|
+
description:
|
56
|
+
email: james@jamesrobertson.eu
|
57
|
+
executables: []
|
58
|
+
extensions: []
|
59
|
+
extra_rdoc_files: []
|
60
|
+
files:
|
61
|
+
- lib/myoutline.rb
|
62
|
+
homepage: https://github.com/jrobertson/myoutline
|
63
|
+
licenses:
|
64
|
+
- MIT
|
65
|
+
metadata: {}
|
66
|
+
post_install_message:
|
67
|
+
rdoc_options: []
|
68
|
+
require_paths:
|
69
|
+
- lib
|
70
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
requirements: []
|
81
|
+
rubyforge_project:
|
82
|
+
rubygems_version: 2.6.13
|
83
|
+
signing_key:
|
84
|
+
specification_version: 4
|
85
|
+
summary: Helps build an outline from plain text.
|
86
|
+
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|