Add miku + small fixes to small issues

Added limited Miku: around 400 songs from 4-27-26 to now.

update to makefortune fetch date so we dont miss songs
small fix to updater (it'll update Gumi now)
added command reference.
This commit is contained in:
2026-05-13 00:39:49 -04:00
parent 23c931c1dd
commit b572219679
6 changed files with 3293 additions and 6 deletions
+6 -1
View File
@@ -6,7 +6,9 @@
# download custom fortunes and config file # download custom fortunes and config file
echo "Updating tetosong..." echo "Updating tetosong..."
# check if the config file exists, if not download it and prompt the user for options. # check if the config file exists, if not download it and prompt the user for options.
if [ ! -f ~/.local/share/tetosong/tetosong.config ]; then echo "Config file not found, downloading default..." # check if the config file exists, if not download it
curl -sLo ~/.local/share/tetosong/tetosong.config https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/main/tetosong.config
fi
#### remove files from old version #### remove files from old version
rm -rf ~/.local/share/tetosong/fortunes/ rm -rf ~/.local/share/tetosong/fortunes/
# add new files # add new files
@@ -14,6 +16,9 @@ mkdir -p ~/.local/share/tetosong
mkdir -p ~/.local/share/tetosong/vocafortunes mkdir -p ~/.local/share/tetosong/vocafortunes
mkdir -p ~/.local/share/tetosong/vocafortunes/vocadb mkdir -p ~/.local/share/tetosong/vocafortunes/vocadb
curl -sLo ~/.local/share/tetosong/vocafortunes/vocadb/140308 https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/main/vocafortunes/vocadb/140308 curl -sLo ~/.local/share/tetosong/vocafortunes/vocadb/140308 https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/main/vocafortunes/vocadb/140308
if [ -f ~/.local/share/tetosong/vocafortunes/vocadb/3 ]; then echo "Gumi found, updating Gumi songs..." # update Gumi
curl -sLo ~/.local/share/tetosong/tetosong.config https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/main/vocafortunes/vocadb/3
fi
AUDIO="$(. ~/.local/share/tetosong/tetosong.config; echo $AUDIO)" AUDIO="$(. ~/.local/share/tetosong/tetosong.config; echo $AUDIO)"
if [ "$AUDIO" = "YES" ]; then if [ "$AUDIO" = "YES" ]; then
curl -sLo ~/.local/share/tetosong/SOTD.zip https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/main/audio/teto/SOTD.zip curl -sLo ~/.local/share/tetosong/SOTD.zip https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/main/audio/teto/SOTD.zip
+1 -1
View File
@@ -1 +1 @@
{ "lastDate": "2026-04-27T00:00:00Z" } {"lastDate": "2026-05-13T00:00:00Z"}
+1 -3
View File
@@ -16,7 +16,6 @@ echo "vsynth: $vsynth"
echo "ARTIST: $ARTIST" echo "ARTIST: $ARTIST"
echo "ART: $ART" echo "ART: $ART"
#ARTIST=140308 # 116 is Kasane Teto
CHILDREN="true" # If we want child voicebanks, we do so we can get all songs from utau, sv, and sv2 CHILDREN="true" # If we want child voicebanks, we do so we can get all songs from utau, sv, and sv2
START=0 # Start at the beginning of the recordset. if i wanted to make the file in chunks to use the api less i would use this and max to get the songs in chunks. They say dont use it "thousands of times a day", getting every teto song is 280 times. I think I'm ok. maybe. START=0 # Start at the beginning of the recordset. if i wanted to make the file in chunks to use the api less i would use this and max to get the songs in chunks. They say dont use it "thousands of times a day", getting every teto song is 280 times. I think I'm ok. maybe.
RESULTS=100 # Max results. Limit is 100. RESULTS=100 # Max results. Limit is 100.
@@ -25,9 +24,8 @@ if [ ! -f dates/${ARTIST}var.json ]; then # var.json has our latest date, we use
echo '{"lastDate": "2000-04-21T00:00:00Z"}' > dates/${ARTIST}var.json # if it doesn't exist, we create it with a default date back in 2000. echo '{"lastDate": "2000-04-21T00:00:00Z"}' > dates/${ARTIST}var.json # if it doesn't exist, we create it with a default date back in 2000.
fi fi
PREVDATE=$(jq -r '.lastDate' dates/${ARTIST}var.json) PREVDATE=$(jq -r '.lastDate' dates/${ARTIST}var.json)
AFTERDATE=$(date -u -d "$PREVDATE + 1 Second" +"%Y-%m-%dT%H:%M:%SZ") AFTERDATE=$(date -u -d "$PREVDATE -1 Day" +"%Y-%m-%dT%H:%M:%SZ") # i made it so it can process duplicate songs, and that does seem to actually work, so i moved the fetch time back a day just to make sure we dont miss songs when we update.
echo "Result: $AFTERDATE" echo "Result: $AFTERDATE"
#rm tetofortunes var.json tetofortunes.dat # during testing we will remove everything, or if we want to regenerate the fortune file from scratch.
# setting the latest date. just pulling the latest song from the api and setting the createDate as the latest date in var.json for use when we update the fortune file again, dont want to add the same songs twice. idk how I'll handle broken links and such, maybe just regenerate the whole thing periodically. # setting the latest date. just pulling the latest song from the api and setting the createDate as the latest date in var.json for use when we update the fortune file again, dont want to add the same songs twice. idk how I'll handle broken links and such, maybe just regenerate the whole thing periodically.
CURLURL="https://vocadb.net/api/songs?songTypes=Original&afterDate=${AFTERDATE}&&artistId%5B%5D=${ARTIST}&childVoicebanks=${CHILDREN}&onlyWithPvs=true&status=Finished&start=0&maxResults=1&sort=PublishDate&fields=PVs" CURLURL="https://vocadb.net/api/songs?songTypes=Original&afterDate=${AFTERDATE}&&artistId%5B%5D=${ARTIST}&childVoicebanks=${CHILDREN}&onlyWithPvs=true&status=Finished&start=0&maxResults=1&sort=PublishDate&fields=PVs"
echo "CURLURL: $CURLURL" echo "CURLURL: $CURLURL"
+37
View File
@@ -0,0 +1,37 @@
tetosong has the following options:
-u : Update Tetosong
-h : display a help message
-p : set a singer prest. Currently supports:
- Teto (the default preset)
- Gumi
- Miku (limited songs rn)
########################################
makefortune.sh has the following options:
-s : Define singer based on vocadb artistid (1 for Miku, 3 For Gumi, 14308 for Teto, etc.)
-a : Define ascii/emoji art
-n : Define singer name in caps (TETO, GUMI, MIKU, etc)
-p : Preset option choice. Currently supports:
- Teto
- Gumi
- Miku
########################################
vocafortune has the following options:
-l : specify the directory vocafortune should look for fortunes
-f : specify a file for vocafortune to read
Vocafortune does not technically need to be used just for vocaloid songs.
It works similar to a fortune program in that it reads a text file with a delimiter and then returns an entry from that text file. Forune uses %, I use backtick (`) because many more vocaloid songs use % in the title than do backtick. Because there are *some* songs that do use the backtick, it's not a 100% perfect solution, but literally every character I could find to use as a delimeter is used in vocaloid song names
########################################
tetosong.config supports the following options at this time:
AUDIO : tells tetosong if it should play audio or not. Default on.
AUTOUPDATE : tells the installer/updater whether to install and enable systemd user service. Default off.
+1 -1
View File
@@ -3,7 +3,7 @@
# Updated 5-1-26 to use new vocafortune script and not require fortune/misfortune. # Updated 5-1-26 to use new vocafortune script and not require fortune/misfortune.
# Updated 5-2-26 to add Miku and Gumi presets and shorten what i can just to see if i could. # Updated 5-2-26 to add Miku and Gumi presets and shorten what i can just to see if i could.
# #
# argument handling # argument handling ################# NEED TO UPDATE HELP
while [[ $# -gt 0 ]]; do case $1 in while [[ $# -gt 0 ]]; do case $1 in
-u|--update) echo "Downloading tetosong updater..." && bash <(curl -s https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/main/autoupdater/updater.sh) && exit 0 ;; # update tetosong -u|--update) echo "Downloading tetosong updater..." && bash <(curl -s https://raw.githubusercontent.com/eric5949/tetosong/refs/heads/main/autoupdater/updater.sh) && exit 0 ;; # update tetosong
-h|--help) echo -e " --- TETOSONG HELP ---\n -h | display this message \n -u | update script and fortunes \n -p SINGER | set singer preset (Teto, Gumi)"; exit 0 ;; # tetosong help -h|--help) echo -e " --- TETOSONG HELP ---\n -h | display this message \n -u | update script and fortunes \n -p SINGER | set singer preset (Teto, Gumi)"; exit 0 ;; # tetosong help
File diff suppressed because it is too large Load Diff