Interactively go through your bluesky follow graph and decide to keep or remove follow records
0
fork

Configure Feed

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

Explain what ANSI escape codes do and fix cursor save and restore

yemou 2a67206f 22f52091

+12 -10
+12 -10
main.go
··· 130 130 apiClient := session.APIClient() 131 131 dir := identity.DefaultDirectory() 132 132 133 + // Save and Restore cursor position 134 + fmt.Printf("\x1b7") 135 + defer fmt.Printf("\x1b8") 136 + 137 + // Enter alternate buffer 138 + fmt.Printf("\x1b[?1049h") 139 + defer fmt.Printf("\x1b[?1049l") 140 + 133 141 // TODO: add a cli flag that allows us to resume from a specific cursor 134 142 cursor := "" 135 143 for { ··· 147 155 148 156 cursor = *records.Cursor 149 157 150 - // TODO: Either put comments for what each of these do or create tiny little functions for them 151 - // Alternatively, I may want to find a terminal ui library and add other things like colors and bolded text 152 - fmt.Printf("\x1b[7") 153 - defer fmt.Printf("\x1b[8") 154 - fmt.Printf("\x1b[?1049h") 155 - defer fmt.Printf("\x1b[?1049l") 156 - fmt.Printf("\x1b[H") 157 - 158 158 for _, record := range records.Records { 159 + // Clear the screen and move cursor home 160 + fmt.Printf("\x1b[2J") 161 + fmt.Printf("\x1b[H") 162 + 159 163 followRecord := record.Value.Val.(*bsky.GraphFollow) 160 164 profileRecord, err := atproto.RepoGetRecord(ctx, apiClient, 161 165 "", ··· 276 280 goto user_input 277 281 } 278 282 279 - fmt.Printf("\x1b[2J") 280 - fmt.Printf("\x1b[H") 281 283 } 282 284 } 283 285 }