Syncs atproto following list from a source of truth of one's choosing
0

Configure Feed

Select the types of activity you want to include in your feed.

basic instructions

+14 -4
+11 -1
README.md
··· 1 - meow 1 + # ATProto following sync 2 + 3 + Sync your following against the source of truth of your choice! Default: bsky 4 + 5 + How to run: 6 + 7 + - make an app password for your ATProto account 8 + - clone this repo 9 + - `BSKY_HANDLE=your.handle BSKY_PASSWORD=your-app-password bun run index.ts` (or other js engine of choice) 10 + - profit 11 +
+3 -3
index.ts
··· 125 125 sourceDids: Set<string> 126 126 ) => { 127 127 console.log(`\ndownstream target is ${targetAppName} (${targetCollection})`); 128 - 128 + 129 129 const currentTargetRecords = await fetchAllRecords(targetCollection); 130 130 let addedCount = 0; 131 131 let deletedCount = 0; ··· 144 144 145 145 if (SHOULD_DELETE && currentTargetRecords.size > 0) { 146 146 console.log(`found ${currentTargetRecords.size} orphans in ${targetAppName}, pruning...`); 147 - 147 + 148 148 let progress = 0; 149 149 for (const [did, rkey] of currentTargetRecords) { 150 150 progress++; ··· 179 179 }); 180 180 181 181 console.log(`\nSOURCE OF TRUTH: ${SOURCE_KEY} (${APPS[SOURCE_KEY]})`); 182 - 182 + 183 183 const sourceMap = await fetchAllRecords(APPS[SOURCE_KEY]); 184 184 const sourceDids = new Set(sourceMap.keys()); 185 185