progress-bar icon indicating copy to clipboard operation
progress-bar copied to clipboard

Calculate the percentage

Open ceccadroid opened this issue 3 years ago • 2 comments

Hi. I wonder if there's a way to automatically calculate the percentage of completion from note's frontmatter. In my case I have, with other keys,: Total: Seen: for the total number of episodes in my series and how many I've already seen. So I wish to pass to the progress bar the result of (round(seen/Total*100)) I hope you can understand what I mean Thanks in advance for any help

ceccadroid avatar Aug 31 '22 14:08 ceccadroid

Hello! I have never used frontmatter, but I will try to help. Is there any way to create a new variable with the value round(seen/Total*100)? Or maybe you can calculate it directly in the link: https://progress-bar.dev/{100*seen/Total}/ Let me know if any of these options work.

fredericojordan avatar Oct 25 '22 14:10 fredericojordan

Given that this would normally be expressed as a fraction, ie seen/total, maybe the most logical way would to handle redirection of the form https://progress-bar.dev/seen/Total

ie https://progress-bar.dev/15/20 would display a 75% progress bar if you've watched 15 out of 20 (or maybe it should show 15 in the left half of the bar and 20 in the right half?)

johnkershaw avatar Feb 21 '23 19:02 johnkershaw