Topic
Summary
1.How to Embed an online image AS “Poster”(F_poster01=Poster)?
2.How to Link a URL to F_poster01 AS “Poster2”?
3.How to Link an online image to F_poster01 AS “Poster3”?
4.How to Link an Obsidian note to F_poster01 AS “Poster4”?
Test
Summary
- dataview: v0.5.41
Input
Summary
dictionary files
- Location: “100_Project/02_dataview/Q94_Embed/Q94_test_data/0[3-4]”
03
- filename :
dic_20070301
---
Date: 2007-03-01
---
#movie
title:: "F9: The Fast Saga"
director :: "Justin Lin"
poster:: https://m.media-amazon.com/images/M/MV5BMjI0NmFkYzEtNzU2YS00NTg5LWIwYmMtNmQ1MTU0OGJjOTMxXkEyXkFqcGdeQXVyMjMxOTE0ODA@._V1_SX300.jpg
04
- filename :
dic_20070401
---
Date: 2007-04-01
# copied from https://www.omdbapi.com/
Movie: {"Title":"F9: The Fast Saga","Year":"2021","Rated":"PG-13","Released":"25 Jun 2021","Runtime":"143 min","Genre":"Action, Crime, Thriller","Director":"Justin Lin","Writer":"Daniel Casey, Justin Lin, Alfredo Botello","Actors":"Vin Diesel, Michelle Rodriguez, Jordana Brewster","Plot":"Dom and the crew must take on an international terrorist who turns out to be Dom and Mia's estranged brother.","Language":"English","Country":"United States","Awards":"2 wins & 11 nominations","Poster":"https://m.media-amazon.com/images/M/MV5BMjI0NmFkYzEtNzU2YS00NTg5LWIwYmMtNmQ1MTU0OGJjOTMxXkEyXkFqcGdeQXVyMjMxOTE0ODA@._V1_SX300.jpg","Ratings":[{"Source":"Internet Movie Database","Value":"5.2/10"},{"Source":"Rotten Tomatoes","Value":"59%"},{"Source":"Metacritic","Value":"58/100"}],"Metascore":"58","imdbRating":"5.2","imdbVotes":"128,405","imdbID":"tt5433138","Type":"movie","DVD":"30 Jul 2021","BoxOffice":"$173,005,945","Production":"N/A","Website":"N/A","Response":"True"}
---
#movie
DQL10_display_a_image_with_a_link_where_poster
Summary
4.1. Main DQL
Code Name | Data type | Group By | Purposes | Remark |
---|---|---|---|---|
DQL10_display_a_image _with_a_link_where_poster |
an online image or a link | no | 1.Embed an online image AS “Poster”(F_poster01=Poster) 2.Link a URL to F_poster01 AS “Poster2” 3.Link an online image to F_poster01 AS “Poster3” 4.Link an Obsidian note to F_poster01 AS “Poster4” |
FLATTEN “!(” + poster + “)” as F_poster01 =>To break up multiple poster Dataview inline fields in a file into individual poster field in a file AND create an alias F_poster01 for the new field by using FLATTEN PS. poster : a stringPS. F_poster01 : a string |
Notes
Summary
to modify(M1)
Your Example
- The condition such as “and Everything Database/Films” will not be occur.
from #movie OR #series and "Everything Database/Films"
Correct Example:
from (#movie OR #series) and "Everything Database/Films"
FLATTEN
Q: What does the following DQL statement mean?
FLATTEN “!(” + poster + “)” as F_poster01
FLATTEN “![image|200](” + poster + “)” as F_poster02
A:
1.To break up multiple
poster
Dataview inline fields in a file into individualposter
field in a file AND create an aliasF_poster01
for the new field by usingFLATTEN
PS.poster
: a string
PS.F_poster01
: a string2.To create an alias
F_poster02
for the new"![image|200](" + poster + ")"
field variable by usingFLATTEN
Code DQL10_display_a_image_with_a_link_where_poster
Summary_code
title: DQL10_display_a_image_with_a_link_where_poster => 1.Embed an online image AS "Poster"(F_poster01=Poster) 2.Link a URL to F_poster01 AS "Poster2" 3.Link an online image to F_poster01 AS "Poster3" 4.Link an Obsidian note to F_poster01 AS "Poster4"
collapse: close
icon:
color:
```dataview
TABLE WITHOUT ID
F_poster01 AS "Poster",
link(file.name, title) AS "Title",
"["+ F_poster01 + "](https://forum.obsidian.md/u/jijii)" AS "Poster2",
"["+ F_poster01 + "](" + poster + ")" AS "Poster3",
"["+ F_poster01 + "](" + file.path + ")" AS "Poster4",
director as "Director"
FROM "100_Project/02_dataview/Q94_Embed/Q94_test_data/03" AND (#movie OR #series)
WHERE poster != null
FLATTEN "![](" + poster + ")" as F_poster01
FLATTEN "![image|200](" + poster + ")" as F_poster02
```
Screenshots(DQL10)
DQL20_display_a_image_with_a_link_where_YAML_Movie
Summary
Main DQL
Code Name | Data type | Group By | Purposes | Remark |
---|---|---|---|---|
DQL20_display_a_image_with _a_link_where_YAML_Movie |
an online image or a link | no | 1.Embed an online image AS “Poster”(F_poster01=Poster) 2.Link a URL to F_poster01 AS “Poster2” 3.Link an online image to F_poster01 AS “Poster3” 4.Link an Obsidian note to F_poster01 AS “Poster4” |
1.FLATTEN Movie AS M =>To break up multiple Movie YAML fields in a file into individual Movie field in a file AND create an alias M for the new field by using FLATTEN PS. Movie : a hashPS. M : a hash2.'“!(” + M.Poster + “)” as F_poster01 =>To create an alias F_poster01 for the new "![](" + M.Poster + ")" field by using FLATTEN |
Notes
Summary
Q: What does the following DQL statement mean?
FLATTEN Movie AS M
FLATTEN “!(” + M.Poster + “)” as F_poster01
FLATTEN “![image|200](” + M.Poster + “)” as F_poster02
A:
1.To break up multipleMovie
YAML fields in a file into individualMovie
field in a file AND create an aliasM
for the new field by usingFLATTEN
PS.Movie
: a hash
PS.M
: a hash2.To create an alias
F_poster01
for the new"![](" + M.Poster + ")"
field by usingFLATTEN
3.To create an alias
F_poster02
for the new"![image|200](" + M.Poster + ")"
field by usingFLATTEN
Code DQL20_display_a_image_with_a_link_where_YAML_Movie
Summary_code
title: DQL20_display_a_image_with_a_link_where_YAML_Movie =>1.Embed an online image AS "Poster"(F_poster01=Poster) 2.Link a URL to F_poster01 AS "Poster2" 3.Link an online image to F_poster01 AS "Poster3" 4.Link an Obsidian note to F_poster01 AS "Poster4"
collapse: close
icon:
color:
```dataview
TABLE WITHOUT ID
F_poster01 AS "Poster",
link(file.name, M.Title) AS "Title",
"["+ F_poster01 + "](https://forum.obsidian.md/u/jijii)" AS "Poster2",
"["+ F_poster01 + "](" + M.Poster + ")" AS "Poster3",
"["+ F_poster01 + "](" + file.path + ")" AS "Poster4",
M.Director as "Director"
FROM "100_Project/02_dataview/Q94_Embed/Q94_test_data/04" AND (#movie OR #series)
WHERE Movie
FLATTEN Movie AS M
FLATTEN "![](" + M.Poster + ")" as F_poster01
FLATTEN "![image|200](" + M.Poster + ")" as F_poster02
WHERE M.Poster != null
```