forked from bluesky-social/feed-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main'
- Loading branch information
Showing
12 changed files
with
1,073 additions
and
586 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,3 +131,7 @@ dist | |
|
||
# Sqlite Database | ||
*.sqlite | ||
|
||
# intellij | ||
.idea/ | ||
*.iml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import dotenv from 'dotenv' | ||
import { AtpAgent, BlobRef } from '@atproto/api' | ||
import fs from 'fs/promises' | ||
import { ids } from '../src/lexicon/lexicons' | ||
import inquirer from 'inquirer' | ||
|
||
const run = async () => { | ||
dotenv.config() | ||
|
||
const answers = await inquirer | ||
.prompt([ | ||
{ | ||
type: 'input', | ||
name: 'handle', | ||
message: 'Enter your Bluesky handle', | ||
//default: 'l-tan.dolciss.net', | ||
default: 'l-tan.bsky.social', | ||
required: true, | ||
}, | ||
{ | ||
type: 'password', | ||
name: 'password', | ||
message: 'Enter your Bluesky password (preferably an App Password):', | ||
}, | ||
{ | ||
type: 'input', | ||
name: 'service', | ||
message: 'Optionally, enter a custom PDS service to sign in with:', | ||
default: 'https://bsky.social', | ||
required: false, | ||
}, | ||
{ | ||
type: 'input', | ||
name: 'recordName', | ||
message: 'Enter the short name for the record you want to delete:', | ||
default: 'rp-next-post', | ||
//default: 'rp-next-post-p', | ||
required: true, | ||
}, | ||
{ | ||
type: 'confirm', | ||
name: 'confirm', | ||
message: 'Are you sure you want to delete this record? Any likes that your feed has will be lost:', | ||
default: false, | ||
} | ||
]) | ||
|
||
const { handle, password, recordName, service, confirm } = answers | ||
|
||
if (!confirm) { | ||
console.log('Aborting...') | ||
return | ||
} | ||
|
||
// only update this if in a test environment | ||
const agent = new AtpAgent({ service: service ? service : 'https://bsky.social' }) | ||
await agent.login({ identifier: handle, password }) | ||
|
||
await agent.api.com.atproto.repo.deleteRecord({ | ||
repo: agent.session?.did ?? '', | ||
collection: ids.AppBskyFeedGenerator, | ||
rkey: recordName, | ||
}) | ||
|
||
console.log('All done 🎉') | ||
} | ||
|
||
run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.