remove test stuff

This commit is contained in:
Astra 2025-07-03 18:10:35 +01:00
parent be8b787c52
commit dbc89e5b95

41
main.go
View file

@ -139,47 +139,6 @@ func main() {
log.Fatalf("failed to create client: %v", err)
}
// ------------------------------------------------------------------------------
// file, err := os.Open("posts.json")
// if err != nil {
// fmt.Printf("Error opening file: %v\n", err)
// return
// }
// defer file.Close()
// byteValue, err := io.ReadAll(file)
// if err != nil {
// fmt.Printf("Error reading file: %v\n", err)
// return
// }
// var posts = struct {
// Records []struct {
// URI string `json:"uri"`
// CID string `json:"cid"`
// Value *bsky.Post `json:"value"`
// } `json:"records"`
// }{}
// // 4. Unmarshal (decode) the JSON data into the struct
// err = json.Unmarshal(byteValue, &posts)
// if err != nil {
// fmt.Printf("Error unmarshaling JSON: %v\n", err)
// return
// }
// for _, post := range posts.Records {
// log.Printf("post: %s\n", post.Value.ProcessFacets(h.bsky.Bluesky.FetchAliases()))
// s, _ := json.Marshal(post.Value)
// h.ProcessPost(&models.Event{Did: bskyClient.Bluesky.Cfg.DID, Commit: &models.Commit{
// Record: s,
// RKey: strings.Split(post.URI, "/")[4],
// CID: post.CID,
// Collection: "app.bsky.feed.post",
// }})
// time.Sleep(time.Second * 2)
// }
// return
// ------------------------------------------------------------------------------
cursor := time.Now().UnixMicro()
restartCount := 0
loop: