obsidian-dataview
obsidian-dataview copied to clipboard
Queries for Non-markdown files
Can you add a feature to include non-markdown files for basic stuff like file name. It would be nice to choose in the query this option as I understand that this could disrupt other types of searches.
Thanks
Would also like to see this, as I would love to query for specific attachments based on date uploaded, or a string in a filename.
Agreed - definitely a pretty basic and useful feature to support.
I would also like this feature, i want to find orphans inside my notes
I have a workflow where I dump PDFs in a folder (most converted from web pages I'm reading). So I need a query to show my queue of PDF articles to read and annotate. I wonder if there's any other way to do this?
Non markdown files have minimal metadata like creation time, modification time, etc but getting a list of them requires DVJS and the Obsidian API.
Related (I think): I would love a way to get something like the obsidian search results. Like what you get with
```query
path:"SD Content/Attachments"
```
but similar to:
```dataviewjs
const pages=dv.pages('"SD Content/Attachments"')
```
maybe
```dataviewjs
const pages=dv.search('path:"SD Content/Attachments"')
```
They probably still could use the page object for real pages, but just basic information for the other files.
This way, it would be possible to create image grids or even a listing of attached files for notes with dataviewjs.
Note: I am new to dataview and obsidian and on the search on how to get to the filenames of the attachments in that folder. The images in there are stable diffusion grids with results for different queries by author. The authors names are in the filenames like sd-grid-H. R. Giger.jpg
and I would like to have a page where all the results show up. I could write that as a script outside of obsidian, but I think it would be nicer to do it "on the fly".
Should we close this in favor of #234 ?
With that hint from #234 I actually got my problem solved like in this example and be fine with it:
```dataviewjs
var images=this.app.vault.getFiles("SD Content").filter(t=>t.name.substring(0,13)=="Artists-Grid-");
images.sort(function (l,u) {
return l.name.toLowerCase().localeCompare(u.name.toLowerCase());
});
let adapter = app.vault.adapter;
let basePath = adapter.getBasePath()
for (let file of images) {
dv.el("img","test",{ attr: {"src" :
"app://local"+basePath+"/"+file.path.replace(/ /g,"%20")+"?"+Date.now() }});
}
It did not work well with just using ![[]]
embedding, though.
Good to hear! Feel free to reopen if that diverges from this issue