@nitrimandylis/leftonread 0.0.0-stage → 0.3.1

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.
Files changed (5) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +116 -2
  3. package/dist/lor.js +2185 -0
  4. package/man/lor.1 +126 -0
  5. package/package.json +47 -4
package/man/lor.1 ADDED
@@ -0,0 +1,126 @@
1
+ .TH LOR 1 "2026-12-03" "leftonread 0.3.1" "User Commands"
2
+ .SH NAME
3
+ lor \- turn an Instagram export into a Wrapped, a reel archive and a keepsake
4
+ .SH SYNOPSIS
5
+ .B lor
6
+ .I command
7
+ .RI [ options ]
8
+ .SH DESCRIPTION
9
+ .B lor
10
+ reads the JSON Instagram export into a local SQLite database, then writes
11
+ self-contained HTML pages and opens them in the browser.
12
+ Nothing leaves the machine, except that the reels and backlog pages load
13
+ Instagram's embed script to show each reel.
14
+ .SH COMMANDS
15
+ .TP
16
+ .B ingest \fIzip|folder\fR...
17
+ Read one or more export zips (all parts of a split export) or extracted folders.
18
+ Messages already stored are skipped, so running it again is safe.
19
+ Zips are read with
20
+ .BR unzip (1).
21
+ .TP
22
+ .B chats
23
+ List every chat with its message count, largest first.
24
+ .TP
25
+ .B wrapped
26
+ Write a per-chat Wrapped: who texts first, reply time each way, peak hour,
27
+ longest streak, words only the two of you use, reel balance, reactions.
28
+ A group chat ranks its members instead: who talks most, who starts,
29
+ who sends the most reels and reactions.
30
+ Each slide is a 9:16 image with a Save PNG button.
31
+ .TP
32
+ .B reels
33
+ Write every shared reel ranked by reactions (laughing emoji weigh more),
34
+ laugh replies within 30 minutes, and how many chats it was sent to, with a
35
+ search box over caption, creator, chat, person and month.
36
+ .TP
37
+ .B keepsake \-\-chat \fIname\fR
38
+ Write an editable booklet of one chat: firsts, the moments that got the most
39
+ reactions and laughs, where each inside joke started, and one photo a month.
40
+ Keep or drop moments, reorder chapters and add captions (saved in the browser),
41
+ then print to an A5 PDF. Photos are read from the export ingest was given,
42
+ so keep it where it was.
43
+ .TP
44
+ .B taste
45
+ Write each person's top creators, how many of each friend's creators you send
46
+ too, and who got whom into a creator.
47
+ .TP
48
+ .B backlog
49
+ Write the shared reels and saved posts worth acting on, sorted into recipe,
50
+ place, experience, product, workout and tip by English and Greek keyword rules.
51
+ Saved-post captions are read with
52
+ .BR yt-dlp (1),
53
+ one every 2 seconds, cached.
54
+ .SH OPTIONS
55
+ .TP
56
+ .BI \-\-db " path"
57
+ Database file. Default
58
+ .IR ~/.config/leftonread/data.db .
59
+ .TP
60
+ .BI \-\-out " path"
61
+ Where the command writes its HTML. Default
62
+ .IR ~/.config/leftonread/ ,
63
+ in a file named after the command.
64
+ .TP
65
+ .BI \-\-chat " name"
66
+ wrapped, keepsake: the chat whose title contains
67
+ .IR name ,
68
+ the other person's first name or a group's title.
69
+ .TP
70
+ .B \-\-no\-open
71
+ Write the HTML without opening the browser.
72
+ .TP
73
+ .B \-\-anon
74
+ Replace other people's names with "them"
75
+ ("person 1", "person 2" in a group) and chat titles with numbers.
76
+ .TP
77
+ .B \-\-llm
78
+ backlog: send the public captions the rules could not place to Claude by running
79
+ .B claude \-p
80
+ (Claude Code, logged in) in batches of 100, and cache its labels.
81
+ .TP
82
+ .B \-\-json
83
+ Print one JSON value on stdout instead of the summary.
84
+ Does not open the browser.
85
+ .TP
86
+ .BR \-h ", " \-\-help
87
+ Show help.
88
+ .TP
89
+ .BR \-v ", " \-\-version
90
+ Show the version.
91
+ .SH JSON OUTPUT
92
+ .TP
93
+ .B ingest
94
+ {db, files, chats, messages, added, reels, saved, owner}
95
+ .TP
96
+ .B chats
97
+ [{id, title, isGroup, total, mine}]
98
+ .TP
99
+ .B wrapped
100
+ {path, overview, chats} or, with \-\-chat, {path, chat}.
101
+ A chat is {id, them, isGroup, members, since, until, total, sent, starts,
102
+ replyMinutes, peakHour, hours, months, streak, words, reels, reactions}.
103
+ In a group, them is the title and the "them" side of each count is
104
+ everyone else.
105
+ members holds {name, sent, starts, reels, reactions, emoji} per person.
106
+ replyMinutes values are null when no opening message got an answer.
107
+ .TP
108
+ .B reels
109
+ {path, total, top}, where top holds the 20 best
110
+ {code, caption, creator, ts, month, from, chats, senders,
111
+ reactions, laughs, score}.
112
+ .TP
113
+ .B keepsake
114
+ {path, title, chapters: [{chapter, moments}]}
115
+ .TP
116
+ .B taste
117
+ {path, people, friends}
118
+ .TP
119
+ .B backlog
120
+ {path, counts, unplaced, items}
121
+ .SH EXIT STATUS
122
+ 0 on success, 1 on a runtime error, 2 on a usage error.
123
+ .SH FILES
124
+ .TP
125
+ .I ~/.config/leftonread/
126
+ Database and generated pages.
package/package.json CHANGED
@@ -1,6 +1,49 @@
1
1
  {
2
2
  "name": "@nitrimandylis/leftonread",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.3.1",
4
+ "description": "Turn your Instagram data export into a per-chat Wrapped and a ranked archive of every reel you traded. Runs locally.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "bin": {
8
+ "lor": "dist/lor.js"
9
+ },
10
+ "files": [
11
+ "dist",
12
+ "man",
13
+ "README.md",
14
+ "LICENSE"
15
+ ],
16
+ "man": [
17
+ "man/lor.1"
18
+ ],
19
+ "engines": {
20
+ "node": ">=24"
21
+ },
22
+ "keywords": [
23
+ "instagram",
24
+ "export",
25
+ "wrapped",
26
+ "reels",
27
+ "dm",
28
+ "cli"
29
+ ],
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/nitrimandylis/leftonread.git"
33
+ },
34
+ "publishConfig": {
35
+ "access": "public"
36
+ },
37
+ "scripts": {
38
+ "build": "bun build leftonread.ts --target=node --format=esm --outfile dist/lor.js",
39
+ "prepack": "bun run build",
40
+ "test": "bun test",
41
+ "typecheck": "tsc --noEmit",
42
+ "compile": "bun build --compile leftonread.ts --outfile ~/.bun/bin/lor && mkdir -p $(brew --prefix)/share/man/man1 && cp man/lor.1 $(brew --prefix)/share/man/man1/ && ([ -d ~/.claude/skills ] && cp -R leftonread-cli ~/.claude/skills/ || true)"
43
+ },
44
+ "devDependencies": {
45
+ "@types/bun": "^1.3.14",
46
+ "@types/node": "^24",
47
+ "typescript": "^5"
48
+ }
49
+ }