Skip to content

creuserr/my-ttpd-song

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

status: running

📖 Under the hood

To calculate which song should be used, I used this implementation:

function seed(raw) {
  let res = 0;
  raw.toUpperCase().trim().split("").forEach(char => {
    res += Math.round(char.charCodeAt(0) / 5);
    if(res > 30) res -= 31;
  });
  if(res > 30) res -= 31;
  return res;
}

This function iterates the given name by character and increment the variable res by the rounded value of its character code divided by 5.

Whenever the variable res exceeds the total tracks, it decreases by 31.

🧪 Bulk name testing

For instant name testing, go to /bulk-test.

This includes the name informations, process, and the output.

⚖️ Disclaimer

my-ttpd-song only host the image files and not the audio. It relies on PyTube to play music.

For any DMCA requests of audio removal, please contact me.

About

The Tortured Poets Department: The Anthology

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published