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
| const fs = require("fs"); | |
| const sqlite3 = require("sqlite3"); | |
| const glob = require("glob"); | |
| const os = require("os"); | |
| const { open } = require("sqlite"); | |
| const username = os.userInfo().username; | |
| const ANNOTATION_DB_PATH = `/users/${username}/Library/Containers/com.apple.iBooksX/Data/Documents/AEAnnotation/`; | |
| const BOOK_DB_PATH = `/users/${username}/Library/Containers/com.apple.iBooksX/Data/Documents/BKLibrary/`; | |
| const annotationsFiles = glob.sync(`${ANNOTATION_DB_PATH}/*.sqlite`); |
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
| # In order to use this script, you must replace 'YOURUSERNAMEHERE' with your Spotify username. | |
| # Execute this script like so: 'osascript alarm_clock_spotify.scpt' (without single-quotes obviously) | |
| # Full explanation here: http://www.nikhilgopal.com/2011/08/show-and-tell-applescript-spotify-alarm.html | |
| # If you would like to specify a playlist, please refer to this gist: https://gist.github.com/3344118 | |
| set volume 2 | |
| open location "spotify:user:YOURUSERNAMEHERE:playlist:muzic" | |
| tell application "Spotify" | |
| set the sound volume to 0 | |
| play |