linkedin-sequence-check 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 53a1a8035f2c122a765f3fd40cd4981de302c0dfd34304be2b64e563c2365f8b
4
+ data.tar.gz: 6c0ae986edab3961a37ed2cf052a2fd97c77d77cab463f1fa3d8f64a53cbe796
5
+ SHA512:
6
+ metadata.gz: 12737c9f3034a09bb5dbd6b0584eb5c9a86b3fb9d23cde623340e953056315d263bf086ea059c2cf07310ca686a398ec96b5ea353afe8d65624b60e03ba79d18
7
+ data.tar.gz: 39a3ef24f55e51b639931d8bab47cf0eddbe1566e9da23d4d196e2c6e499edf3bf321e52e6dff88b4dda8c69df9fd25f0a3ed994a85d23da3fbf631628bc7ae2
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 OneGTMLab
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
data/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # linkedin-sequence-check
2
+
3
+ Checks one LinkedIn outreach sequence (JSON) against the rules of the OneGTMLab LinkedIn outreach playbook before it goes
4
+ to a sender account. The sequence has five branches: a **connection note**, a message **on acceptance**, a message for
5
+ **existing connections**, an **InMail** for people who do not accept, and a short **generic fallback**. Ruby 2.7+,
6
+ standard library only.
7
+
8
+ ```bash
9
+ ruby bin/linkedin-sequence-check examples/sequence.json
10
+ ruby bin/linkedin-sequence-check --note-limit 200 my_sequence.json
11
+ ```
12
+
13
+ What it flags: a missing branch, a message over about 70 words, stray braces or unresolved variables, em dashes, a link in
14
+ the connection note, a message to an existing connection that opens by remarking on the connection, a message that introduces
15
+ the sender by name, and a hook that is a quote or a bare reshare rather than something the person wrote (hook posts are
16
+ labelled `original`, `quote` or `reshare`). The character limit for the note is not assumed: pass `--note-limit` with your own
17
+ figure. Exit code 1 when anything is flagged. `examples/sequence.json` is invented sample text.
18
+
19
+ ## Test
20
+
21
+ ```bash
22
+ ruby test/test_check.rb
23
+ ```
24
+
25
+ ## Source of the rules
26
+
27
+ [LinkedIn Outreach Playbook](https://www.onegtmlab.dev/growth-playbooks/linkedin-outreach), steps "Label every post",
28
+ "Write the five branches" and "Voice and sign as the sender". MIT licensed.
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'json'
5
+ require_relative '../lib/linkedin_sequence_check'
6
+
7
+ limit = nil
8
+ args = ARGV.dup
9
+ if (i = args.index('--note-limit'))
10
+ limit = Integer(args[i + 1])
11
+ args.slice!(i, 2)
12
+ end
13
+ if args.empty?
14
+ warn 'usage: linkedin-sequence-check [--note-limit N] sequence.json [more.json ...]'
15
+ exit 2
16
+ end
17
+ bad = 0
18
+ args.each do |path|
19
+ seq = JSON.parse(File.read(path))
20
+ issues = LinkedinSequenceCheck.check(seq, note_limit: limit)
21
+ puts "#{path}: #{issues.empty? ? 'ok' : "#{issues.size} issue(s)"}"
22
+ issues.each { |i| puts " #{i.branch}: #{i.message}" }
23
+ bad += issues.size
24
+ end
25
+ exit(bad.zero? ? 0 : 1)
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'json'
4
+
5
+ # Checks a LinkedIn outreach sequence (five branches) against the rules of the OneGTMLab LinkedIn outreach playbook.
6
+ module LinkedinSequenceCheck
7
+ BRANCHES = %w[connection_note on_acceptance existing_connection inmail generic_fallback].freeze
8
+ MAX_WORDS = 70 # "messages stay under about 70 words"
9
+ POST_LABELS = %w[original quote reshare].freeze
10
+
11
+ Issue = Struct.new(:branch, :message)
12
+
13
+ def self.words(text)
14
+ text.to_s.split(/\s+/).reject(&:empty?).size
15
+ end
16
+
17
+ # seq: { "sender" => "Name", "connection_note" => "...", ... , "hook" => { "text" => "...", "label" => "original" } }
18
+ def self.check(seq, note_limit: nil)
19
+ issues = []
20
+ BRANCHES.each do |b|
21
+ issues << Issue.new(b, 'branch is missing or empty') if seq[b].to_s.strip.empty?
22
+ end
23
+ BRANCHES.each do |b|
24
+ t = seq[b].to_s
25
+ next if t.strip.empty?
26
+ issues << Issue.new(b, "#{words(t)} words, over the #{MAX_WORDS} word guide") if words(t) > MAX_WORDS
27
+ issues << Issue.new(b, 'contains a stray brace or unresolved variable') if t =~ /[{}]|%\w+%|\[\[|\]\]/
28
+ issues << Issue.new(b, 'contains an em dash') if t.include?("—")
29
+ end
30
+ note = seq['connection_note'].to_s
31
+ issues << Issue.new('connection_note', 'connection note must not contain a link') if note =~ %r{https?://|www\.}i
32
+ if note_limit && note.length > note_limit
33
+ issues << Issue.new('connection_note', "#{note.length} characters, over your limit of #{note_limit}")
34
+ end
35
+ ex = seq['existing_connection'].to_s
36
+ if ex =~ /\b(thanks for connecting|great to be connected|since we(?:'re| are) connected|we(?:'re| are) connected)\b/i
37
+ issues << Issue.new('existing_connection', 'opens by remarking on the connection; open with substance')
38
+ end
39
+ sender = seq['sender'].to_s.strip
40
+ issues << Issue.new('sender', 'sender name is missing') if sender.empty?
41
+ unless sender.empty?
42
+ BRANCHES.each do |b|
43
+ t = seq[b].to_s
44
+ next if t.strip.empty?
45
+ # "do not introduce the sender by name"
46
+ issues << Issue.new(b, 'introduces the sender by name') if t =~ /\b(?:i am|i'm|my name is)\s+#{Regexp.escape(sender.split.first)}\b/i
47
+ end
48
+ end
49
+ hook = seq['hook']
50
+ if hook && !hook['text'].to_s.strip.empty?
51
+ label = hook['label'].to_s
52
+ issues << Issue.new('hook', "post label must be one of #{POST_LABELS.join(', ')}") unless POST_LABELS.include?(label)
53
+ issues << Issue.new('hook', "a #{label} is not something the person wrote; use the generic opener") if %w[quote reshare].include?(label)
54
+ end
55
+ issues
56
+ end
57
+ end
metadata ADDED
@@ -0,0 +1,48 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: linkedin-sequence-check
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Jainendra Ojha
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ description: "Ruby CLI that checks a five-branch LinkedIn outreach sequence: missing branches, length, braces, links in the note, existing-connection openers and hook labels."
13
+ email:
14
+ - account@onegtmlab.dev
15
+ executables:
16
+ - linkedin-sequence-check
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - LICENSE
21
+ - README.md
22
+ - bin/linkedin-sequence-check
23
+ - lib/linkedin_sequence_check.rb
24
+ homepage: "https://www.onegtmlab.dev/growth-playbooks/linkedin-outreach"
25
+ licenses:
26
+ - MIT
27
+ metadata:
28
+ source_code_uri: "https://github.com/jaizendra-netizen/linkedin-sequence-check"
29
+ rdoc_options: []
30
+ require_paths:
31
+ - lib
32
+ required_ruby_version: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ -
35
+ - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: "2.7"
38
+ required_rubygems_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ -
41
+ - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ requirements: []
45
+ rubygems_version: 4.1.0
46
+ specification_version: 4
47
+ summary: "Ruby CLI that checks a five-branch LinkedIn outreach sequence: missing branches, length, braces, links in the note, existing-connection open"
48
+ test_files: []