git-ged 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE CHANGED
@@ -1,5 +1,4 @@
1
1
  Copyright (c) 2011, John Sumsion
2
- All rights reserved.
3
2
 
4
3
  Redistribution and use in source and binary forms, with or without
5
4
  modification, are permitted provided that the following conditions are met:
data/README.md CHANGED
@@ -9,20 +9,26 @@ GEDCOM plugin for Git. As a `git` subcommand, git-ged lets you import and
9
9
  manage GEDCOM files in a versioned, shareable way in a Git repository.
10
10
 
11
11
  It is also possible to attach to other repositories and fetch related
12
- genealogy from others who have imported it into their own repository.
12
+ genealogy data from others who have imported it into their own repository.
13
13
 
14
14
  As a library, git-ged lets you write programs that communicate genealogical
15
15
  data in the git-ged repository layout.
16
16
 
17
17
  As a repository implementation, git-ged also defines a repository
18
18
  specification that, if adhered to by alternate implementations will render
19
- all implementations data-compatible with each other.
19
+ all implementations to share repositories with each other.
20
20
 
21
21
  The genealogical data format for persons and relationships is yet to be
22
22
  decided. The first cut will be one that is largely one-to-one compatible
23
23
  with GEDCOM 5.5. I fully expect to change the format before this
24
24
  solidifies, and I'll use whatever is the commonly-accepted format.
25
25
 
26
+ NOTE: Although I started git-ged and have worked on it while being employed
27
+ by FamilySearch, this project is not endorsed and is not supported in any
28
+ way by FamilySearch. I work on it outside of work hours, and do not use
29
+ internal FamilySearch servers or data privileges. It is a personal endeavor
30
+ to enrich the genealogy data sharing ecosystem.
31
+
26
32
 
27
33
  ## Requirements
28
34
 
data/TODO CHANGED
@@ -4,17 +4,24 @@ Structure
4
4
  - commands
5
5
 
6
6
  Bootstrapping
7
- - integrate OptionParser (stdlib) and subcommand (gem) into git-ged commands
8
- - patch gem-man to read README{,.md} in lieu of any explicit manpage (gem man rib)
7
+ -------------
8
+ - use commandable for subcommand running
9
+ - hook up --verbose option => GitGed.debug
10
+ - move init's optparse initialization into init.rb
11
+
12
+ - use pwd and arg in init.rb to get full pathname to new git-ged repo and print in output
13
+ - make init.rb use grit to initialize (note: .../.git is what it expects for non-bare)
14
+ - add --bare option
15
+
16
+ - move layout.txt => LAYOUT down under lib/git-ged/data (leaving a symlink behind at root)
17
+ - create data/licenses subdir with licenses by short-name (see git-bup's SIGNED-OFF-BY for EULA ideas)
18
+ - populate LAYOUT under refs/heads/master during "init"
19
+ - add -l --license option to "init" that populates DEFAULT_LICENSE under refs/heads/master
9
20
 
10
- - create licenses subdir with data licenses by short-name
11
- - create templates area that refs/heads/master can be populated from during "git ged init"
12
- - create git-ged command that invokes git-ged-*
13
- - create lib/git-ged/init.rb that invokes git init + template population (normal or bare)
14
21
  - create lib/git-ged/ingest.rb that copies a GEDCOM in and assigns permaname (refs/local/gedcoms)
22
+ - copy DEFAULT_LICENSE => ged1.LICENSE or allow -l --license option to specify
15
23
  - ingest one of Hannah's small GEDCOMs
16
24
  - ingest one of Hannah's full GEDCOMs
17
- - get rib-git-ged plugin working
18
25
 
19
26
  - create living filter pipe for filtering GEDCOMs
20
27
  - create lib/git-ged/import.rb that copies a GEDCOM from refs/{local=>heads}/gedcoms with living filter
@@ -29,6 +36,15 @@ Bootstrapping
29
36
  - pick default person/family permaname generation logic based on whether the _UUIDs match up
30
37
  - create local/gedcoms history based on
31
38
 
39
+ - allow "init" to reinitialize an already-initialized repo and copy new DEFAULT_LICENSE/new LAYOUT
40
+
41
+ - pull living calculations and hash calculations out into json-select code (semver) under refs/heads/code
42
+ - put code version (semver + sha) into each entity on import/commit where a function was used (gedcom, person, family)
43
+
44
+ Ideas
45
+ -----
46
+ - patch gem-man to read README{,.md} in lieu of any explicit manpage (gem man rib)
47
+ - get rib-git-ged plugin working
32
48
 
33
49
  GUI:
34
50
  shoes
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
 
9
9
  s.name = 'git-ged'
10
10
  s.version = GitGed::VERSION
11
- s.date = '2012-01-09'
11
+ s.date = '2012-01-25'
12
12
 
13
13
  s.summary = "GEDCOM plugin for Git"
14
14
  s.description = "git-ged is a Ruby toolset for managing genealogical data (GEDCOM) inside a Git repository."
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
  s.extra_rdoc_files = %w[README.md LICENSE LICENSE.grit TODO layout.txt]
24
24
 
25
25
  s.add_dependency('grit', "~> 2.4.1")
26
- s.add_dependency('subcommand', "~> 1.0.6")
26
+ s.add_dependency('cli', "~> 1.1.0")
27
27
 
28
28
  s.add_development_dependency('mocha')
29
29
 
data/layout.txt CHANGED
@@ -3,22 +3,24 @@ GIT-GED CONCEPTS
3
3
 
4
4
  1) Git-ged commands
5
5
  [repo-level]
6
- - Init: populates refs/heads/{master,content,intent} with README, LICENSE_DEFAULT, etc. as specified by user
6
+ - Init: populates refs/heads/{master,content,intent/master} with README, LICENSE_DEFAULT, etc. as specified by user
7
7
  - Clone: same as git clone
8
8
  - Attach: same as git remote add, except that it allows the user to define the set of permanames of interest in the remote repo
9
9
  - Fetch: same as git fetch, except that only permanames that the user currently has are fetched (along with refs/heads/master)
10
10
  - Push: same as git push, except that only permanames that the remote repo has are updated
11
11
  [entity-state]
12
- - Intent: captures one-line user intent (separate from commit message)
12
+ - Intent: captures one-line user intent to capture large-scale project (separate from commit message on a single entity)
13
13
  - Ingest: populates refs/local/gedcoms/{permaname(s)} with a raw gedcom, adding new gedN files for permaname collisions
14
14
  - Filter: performs living filter and populates refs/heads/gedcoms/{permaname}
15
15
  - Import: creates any new persons/families and records import flag & new person/family permaname+state links in gedX.IMPORT
16
+ - Resolve: deals with multiple-record histories in a smart way (gedcoms/persons/families)
17
+ - Owner: establishes identity of the owner of the repo in refs/heads/content:/OWNER,
18
+ adds person for the user and allows specification of 'mpmmp' ancestor links to deceased horizon
16
19
  [interactive-use]
17
20
  - Workspace: (subcommands: checkout, update, reset)
18
21
  - checkout: grabs every specified person/family/gedcom permaname and puts it under the path repo/[persons|families|gedcoms]/{permaname} in a transient commit
19
22
  - update: grabs the head of every specified person/family/gedcom permaname and puts it under a new refs/heads/workspace commit
20
23
  - reset: warns if un-git-ged-committed refs/heads/workspace history, then nukes it and recreates a refs/heads/workspace commit with the same permanames as it had before
21
- - Resolve: deals with multiple-record histories in a smart way (gedcoms/persons/families)
22
24
  - Commit: creates commits on every separate permaname that has changed, using current intent as default commit subject plus details of all entities that changed
23
25
 
24
26
  2) Data Licenses
@@ -54,10 +56,10 @@ GIT-GED CONCEPTS
54
56
  - import is responsible for initially segmenting living vs. deceased, but after import the app is responsible for calculating living after edit and moving the record if necessary
55
57
  - the same living check & segmentation logic that import uses will be available on-demand for apps to use after edit
56
58
  - when a deceased record is made living, the deceased record's permaname gets a new commit that marks it as no-longer-visible (so that on subsequent fetch, other repositories can delete their records)
57
- - includes optional "supersedes", "superseded-by", "derived-from", "same-as", and "not-same-as" link attributes
58
- - see
59
- - the "derived-from", "supersedes", and "superseded-by" link attributes allow for proper history-aware
59
+ - includes optional "supersedes", "superseded-by", "derived-from", "descendant-of", "same-as", and "not-same-as" link attributes
60
+ - the "supersedes", "superseded-by", and "derived-from" link attributes allow for proper history-aware
60
61
  linkage across permanames for tracing merge or other complicated person record derivation
62
+ - the "descendant-of" attribute is for attaching non-descript living persons to their deceased horizon via "mpmmp" links
61
63
  - the "same-as" attribute is a loose identity link to an alternate history of a person
62
64
  determined to be the same historical person, it is a hint that a merge or other record derivation may be useful in the future
63
65
  - if the "not-same-as" attribute refers to a disconnected history of a *different* person under the same permaname,
@@ -123,28 +125,36 @@ GIT-GED REFS LAYOUT
123
125
  ===================
124
126
 
125
127
  refs/heads/*:
126
- - stuff that can be cloned/forked
128
+ - stuff that can be cloned/fetched
129
+ refs/heads/{gedcoms,persons,families/intents}/*
130
+ - data that can be cloned/fetched/forked piecemeal
127
131
  refs/local/*:
128
132
  - dispensible stuff that is used for local import actions (not needed for collaboration)
129
133
  - hidden stuff that should not be published on a clone/fork
130
134
 
131
135
  refs/heads/master (fetchable, but non-mergeable):
132
136
  - README: simple documentation of git-ged, with pointer to software to parse/use
137
+ - LAYOUT: this file containing details of git-ged structure
133
138
 
134
139
  refs/heads/content (fetchable, but non-mergeable):
135
140
  - META: last version of git-ged that wrote
136
- - INTENT: link to last intent
137
- - ROOTS: links to various person roots
138
- - ENTITIES: list of gedcom/person/family permaname+state links, may end up needing to be sharded for very large repos
141
+ - OWNER: the identity of the owner of this repo + OpenID URLs, blog URLs and/or email(s)
139
142
  - LICENSE_DEFAULT: default license for any new records added or imported into to this repository, defaults to Creative Commons Share-alike
140
- - [non-versioned] CHANGELOG: contains up to last 100 edits performed, updated by git-ged commit
141
-
142
- refs/heads/intent (fetchable, but non-mergeable):
143
- - INTENT: stores the user's identity, single-line intent message, and date in the tree itself to capture "why"
143
+ - ROOTS: links to various person permaname roots, to start tree navigation from
144
+ - ENTITIES: list of gedcom/person/family/intent permaname+state links, may end up needing to be sharded for very large repos
145
+ - INTENTS: list of last N intents & date & author
146
+ - CHANGELOG: contains up to last 100 edits performed, including list of entities changed, updated by git-ged commit
147
+ - LIMITS: maximum number of intents, etc.
148
+
149
+ refs/heads/intents/master (fetchable, but non-mergeable):
150
+ - INTENT: stores the user's git identity, date, and, single-line 140-char intent message in the tree itself to capture "why"
144
151
  - MUST exist: if no intent is explicitly stored, init/import/edit must stub one in that describes the largest-scope action being taken
145
- - able to be as fine-grained and meticulous as the user wants to be, while allowing the user
146
- the convenience of keeping the same intent over several small actions moving toward a large-time-scale goal
152
+ - able to cherry-pick an intent from some other user to show you're working toward the same goal as someone else
147
153
  - able to generate a feed of intents from here
154
+ - capped at 100 or so max commits (large limit)
155
+
156
+ refs/heads/intents/{permanames}:
157
+ - selective intents used to document why a certain change is made (linked from entities at commit)
148
158
 
149
159
  refs/heads/workspace (fetchable, but non-mergeable):
150
160
  - non-history-preserving workspace tree for pulling a subset of records into a filesystem for edit
@@ -158,8 +168,8 @@ refs/heads/gedcoms/{permanames}:
158
168
 
159
169
  refs/local/gedcoms/{permanames}:
160
170
  - *may* contain living data, populated without filtering by "ingest"
161
- - ged1.ged: the raw gedcom file renamed to a standard filename
162
- - gedN.ged: the raw gedcom file renamed to a standard filename
171
+ - ged1: the raw gedcom file renamed to a standard filename
172
+ - gedN: the raw gedcom file renamed to a standard filename
163
173
  - pre-existing permanames get forwarded up to the new tree (collisions, yay!)
164
174
  - new permanames get created, non-colliding permanames don't get forwarded (gc'd by some other mechanism)
165
175
  - if the gedcom contains no living data, "import" can delete the refs/local refs
@@ -23,7 +23,7 @@ require 'git-ged/init'
23
23
  # internal support classes
24
24
 
25
25
  module GitGed
26
- VERSION = '0.0.3'
26
+ VERSION = '0.0.4'
27
27
 
28
28
  class << self
29
29
 
@@ -1,52 +1,50 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'git-ged'
4
- require 'optparse'
5
- require 'subcommand'
6
4
 
7
5
  module GitGed
8
6
  class CLI
9
7
 
10
- include Subcommands
11
-
12
- # patch until subcommand 1.0.7 comes out
13
- attr_accessor :appname
14
- def print_actions
15
- super.sub(/See '.* help COMMAND'/, "See '#{appname} help COMMAND'")
16
- end
17
-
18
- def initialize
19
- @options = {}
20
-
21
- self.appname = "git ged"
22
- global_options do |opts|
23
- opts.banner = "Usage: #{appname} [options] [subcommand [options]]"
24
- opts.separator ""
25
- opts.separator "Global options are:"
26
- opts.on("-v", "--[no-]verbose", "Show git-ged & grit debug") do |v|
27
- GitGed.debug = v
28
- end
29
- end
30
- add_help_option
31
-
32
- command :init do |opts|
33
- opts.banner = "Usage: #{appname} init [-m msg] [repo]"
34
- opts.description = "Initializes a new git-ged repo"
35
- opts.separator ""
36
- opts.separator "Options:"
37
- opts.on "-m MESSAGE", "--message MESSAGE" do |msg|
38
- @options[:message] = msg
39
- end
40
- end
41
- end
8
+ # include Subcommands
9
+ #
10
+ # # patch until subcommand 1.0.7 comes out
11
+ # attr_accessor :appname
12
+ # def print_actions
13
+ # super.sub(/See '.* help COMMAND'/, "See '#{appname} help COMMAND'")
14
+ # end
15
+
16
+ # def initialize
17
+ # @options = {}
18
+ #
19
+ # self.appname = "git ged"
20
+ # global_options do |opts|
21
+ # opts.banner = "Usage: #{appname} [options] [subcommand [options]]"
22
+ # opts.separator ""
23
+ # opts.separator "Global options are:"
24
+ # opts.on("-v", "--[no-]verbose", "Show git-ged & grit debug") do |v|
25
+ # GitGed.debug = v
26
+ # end
27
+ # end
28
+ # add_help_option
29
+ #
30
+ # command :init do |opts|
31
+ # opts.banner = "Usage: #{appname} init -m msg [repo]"
32
+ # opts.description = "Initializes a new git-ged repo"
33
+ # opts.separator ""
34
+ # opts.separator "Options:"
35
+ # opts.on "-m INTENT", "--message INTENT" do |intent|
36
+ # @options[:intent] = intent
37
+ # end
38
+ # end
39
+ # end
42
40
 
43
41
  def run
44
- cmd = opt_parse()
45
- if cmd
46
- Repo.new.send cmd, ARGV, @options
47
- else
48
- puts global_options { |opts| opts }
49
- end
42
+ # cmd = opt_parse()
43
+ # if cmd
44
+ # Repo.new.send cmd, ARGV, @options
45
+ # else
46
+ # puts global_options { |opts| opts }
47
+ # end
50
48
  end
51
49
 
52
50
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-ged
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-09 00:00:00.000000000 Z
12
+ date: 2012-01-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: grit
16
- requirement: &23602420 !ruby/object:Gem::Requirement
16
+ requirement: &18492800 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,21 +21,21 @@ dependencies:
21
21
  version: 2.4.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *23602420
24
+ version_requirements: *18492800
25
25
  - !ruby/object:Gem::Dependency
26
- name: subcommand
27
- requirement: &23601940 !ruby/object:Gem::Requirement
26
+ name: cli
27
+ requirement: &18491340 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
31
31
  - !ruby/object:Gem::Version
32
- version: 1.0.6
32
+ version: 1.1.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *23601940
35
+ version_requirements: *18491340
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: mocha
38
- requirement: &23601560 !ruby/object:Gem::Requirement
38
+ requirement: &18488740 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *23601560
46
+ version_requirements: *18488740
47
47
  description: git-ged is a Ruby toolset for managing genealogical data (GEDCOM) inside
48
48
  a Git repository.
49
49
  email: jdsumsion@gmail.com
@@ -95,3 +95,4 @@ signing_key:
95
95
  specification_version: 2
96
96
  summary: GEDCOM plugin for Git
97
97
  test_files: []
98
+ has_rdoc: