Advertisement
Guest User

dataview cards with progress bars

a guest
Mar 31st, 2025
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.22 KB | None | 0 0
  1. ````tabs
  2.  
  3. tab: Currently Reading
  4. ```dataview
  5. TABLE WITHOUT ID
  6. ("![](" + image + ")") as cover,
  7. title,
  8. "Author: " + author as author,
  9. "Genres: " + join(genres, ", ") as genre,
  10. "<progress value='" + (lastRead/pages*100) + "' max='100' />" as progressbar,
  11. lastRead + " of " + pages + " pages" + " (" + round(lastRead/pages*100) + "%)" as progress,
  12. "Rating: " + rating as rating,
  13. truncate(plot, 200) as plot
  14. FROM #BOOKS
  15. WHERE contains(status, "READING")
  16. FLATTEN "[[" + file.path + "|" + truncate(file.name, 27) + "]]" as title
  17. SORT title ASC
  18. ```
  19.  
  20. tab: Want to Read
  21. ```dataview
  22. TABLE WITHOUT ID
  23. ("![](" + image + ")") as cover,
  24. title,
  25. "Author: " + author as author,
  26. "Genres: " + join(genres, ", ") as genre,
  27. "<progress value='" + (current/total*100) + "' max='100' />" as progressbar,
  28. current + " of " + total + " chapters" + " (" + round(current/total*100) + "%)" as progress,
  29. "Rating: " + rating as rating,
  30. truncate(plot, 200) as plot
  31. FROM #BOOKS
  32. WHERE contains(status, "TO READ")
  33. FLATTEN "[[" + file.path + "|" + truncate(file.name, 27) + "]]" as title
  34. SORT title ASC
  35. ```
  36.  
  37. tab: Finished Reading
  38. ```dataview
  39. TABLE WITHOUT ID
  40. ("![](" + image + ")") as cover,
  41. title,
  42. "Author: " + author as author,
  43. "Genres: " + join(genres, ", ") as genre,
  44. "<progress value='" + (current/total*100) + "' max='100' />" as progressbar,
  45. current + " of " + total + " chapters" + " (" + round(current/total*100) + "%)" as progress,
  46. "Rating: " + rating as rating,
  47. truncate(plot, 200) as plot
  48. FROM #BOOKS
  49. WHERE contains(status, "FINISHED")
  50. FLATTEN "[[" + file.path + "|" + truncate(file.name, 27) + "]]" as title
  51. SORT title ASC
  52. ```
  53.  
  54. tab: Abandoned Reading
  55. ```dataview
  56. TABLE WITHOUT ID
  57. ("![](" + image + ")") as cover,
  58. title,
  59. "Author: " + author as author,
  60. "Genres: " + join(genres, ", ") as genre,
  61. "<progress value='" + (current/total*100) + "' max='100' />" as progressbar,
  62. current + " of " + total + " chapters" + " (" + round(current/total*100) + "%)" as progress,
  63. "Rating: " + rating as rating,
  64. truncate(plot, 200) as plot
  65. FROM #BOOKS
  66. WHERE contains(status, "ABANDONED")
  67. FLATTEN "[[" + file.path + "|" + truncate(file.name, 27) + "]]" as title
  68. SORT title ASC
  69. ```
  70.  
  71. ````
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement