This file contains hidden or 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
| #!/usr/bin/env python3 | |
| """ | |
| redditcli - pull your own saved/upvoted Reddit listings to local NDJSON. | |
| Strictly read-only. Touches only these endpoints, all scoped to the | |
| authenticated user's own account: | |
| POST /api/v1/access_token OAuth2 password grant | |
| GET /user/{me}/saved the user's own saved posts/comments | |
| GET /user/{me}/upvoted the user's own upvoted posts |
This file contains hidden or 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
| tell application "Notes" | |
| -- The Notes account type here (Google, iCloud, etc..) | |
| set noteAccount to "iCloud" | |
| repeat with currentNote in notes of account noteAccount | |
| log "Processing note: " & (name of currentNote) | |
| set noteTitle to name of currentNote | |
| set noteContent to body of currentNote | |
| -- Sanitize filename (remove slashes, etc.) | |
| set safeTitle to do shell script "echo " & quoted form of noteTitle & " | tr / - | tr ':' '_' " |
This file contains hidden or 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
| tell application "Notes" | |
| -- The Notes account type here (Google, iCloud, etc..) | |
| set noteAccount to "iCloud" | |
| repeat with currentNote in notes of account noteAccount | |
| log "Processing note: " & (name of currentNote) | |
| set noteTitle to name of currentNote | |
| set noteContent to body of currentNote | |
| -- Sanitize filename (remove slashes, etc.) | |
| set safeTitle to do shell script "echo " & quoted form of noteTitle & " | tr / - | tr ':' '_' " |