summaryrefslogtreecommitdiff
path: root/scripts/anki.sh
blob: f592b6c6680329940e89037c499511c8a58ea3b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash

NEW=$(curl -s http://127.0.0.1:8765 -H "Content-Type: application/json" -d '{
  "action":"findCards",
  "version":6,
  "params":{
    "query":"is:new"
  }
}')

DUE=$(curl -s http://127.0.0.1:8765 -H "Content-Type: application/json" -d '{
  "action": "findCards",
  "version": 6,
  "params": {
    "query": "is:due"
  }
}')

DONE=$(curl -s http://127.0.0.1:8765 -H "Content-Type: application/json" -d '{
  "action": "getNumCardsReviewedToday",
  "version": 6
}')


echo "new:$(echo $NEW | jq '.result | length') due:$(echo $DUE | jq '.result | length') done:$(echo $DONE | jq '.result')"