Advertisement
dhniceday

Untitled

Sep 1st, 2023
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. ---
  3. aliases:
  4. tags: ['studytopic', 'toStudy']
  5. title: '{{title}}'
  6. date-created: {{date:YYYY-MM-DD}}
  7. date-modified: {{date:YYYY-MM-DD}}
  8. studytopic: '%{{title}}%'
  9. ---
  10.  
  11. ##### Notes
  12.  
  13. ```dataview
  14. LIST WITHOUT ID
  15. "- [b] " + link(file.name)
  16. FROM ""
  17. WHERE contains(studytopic, this.studytopic)
  18. AND file.name != this.file.name
  19. ```
  20.  
  21. ##### Articles
  22.  
  23. ```dataview
  24. LIST WITHOUT ID
  25.     "- [b] **" + collection + "** " + link(file.name) + " [💬](" + sourceURL + ") <br>*(" + dateformat(file.ctime, "yyyy-MM-dd") + ")*" + " *" + type + "*"
  26. FROM
  27.     "50 - Raindrop"
  28. WHERE
  29.     contains(tags, this.studytopic)
  30.     AND collection != "YouTube"
  31.     AND done = "no"
  32. ```
  33.  
  34. ##### Videos
  35.  
  36. ```dataview
  37. LIST WITHOUT ID
  38.     "- [b] **" + collection + "** " + link(file.name) + " [💬](" + sourceURL + ") <br>*(" + dateformat(file.ctime, "yyyy-MM-dd") + ")*" + " *" + type + "*"
  39. FROM
  40.     "50 - Raindrop"
  41. WHERE
  42.     contains(tags, this.studytopic)
  43.     AND collection = "YouTube"
  44.     AND done = "no"
  45. ```
  46.  
  47. ##### Pdf
  48.  
  49. ``` dataviewjs
  50.  
  51. let pg = dv.current()
  52. let studytopic = pg.studytopic.replace(/[%]+/g,'');
  53.  
  54. const allPdf = app.vault.getFiles().filter(file => file.extension == 'pdf' && file.path.includes(studytopic));
  55.  
  56. let myList = allPdf.map(file => dv.fileLink(file.path));
  57.  
  58. for (let line of myList) {
  59.     dv.paragraph('- [b] ' + line);
  60. }
  61. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement