Skip to content

Commit e41724b

Browse files
committed
fix dataviewjs
1 parent f945428 commit e41724b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

HTB/Index.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

2-
*Your vault summary has the following instances
2+
*Your vault summary has the following instances*
33

44
## Machines in vault
55

66
```dataviewjs
77
const {fieldModifier: f} = this.app.plugins.plugins["metadata-menu"].api;
8-
8+
const vault_path = this.app.vault.adapter.basePath
99
dv.table(['Name', 'Avatar','Difficulty','Stars','OS'],
1010
dv.pages("#machine")
1111
.filter(p => p.file.path.includes("Machine"))
@@ -16,7 +16,7 @@ dv.table(['Name', 'Avatar','Difficulty','Stars','OS'],
1616
'<img style="max-width:70px" src="https://www.hackthebox.com/'+p.avatar+'">',
1717
f(dv,p,"difficulty_text"),
1818
'<p> ⭐️ '+ p.stars+'</p>',
19-
'<img style = "max-width:30px" src = "app://local//home/axel/Escritorio/HTNotes/HTB/.res/'+ p.os +'.png">'
19+
'<img style = "max-width:30px" src = "app://local//'+vault_path+'/.res/'+ p.os +'.png">'
2020
2121
]).sort(b => b.created )
2222
)
@@ -36,6 +36,7 @@ dv.table(['Name', 'Avatar','Difficulty','Stars','OS'],
3636
.filter(p => !p.file.path.includes("fileClass"))
3737
.filter(p => !p.file.path.includes("templates"))
3838
.filter(p => !p.root_flag)
39+
.filter(p => p.user_flag)
3940
.map(p => [
4041
p.file.link,
4142
'<img style="max-width:70px" src="https://www.hackthebox.com/'+p.avatar+'">',

HTB/⚡ Start Machine ⚡.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11

22
## Script Workflow for - Create Machine Note
33

4-
*This is simple button that will automate the creation of starting notes that will improve your quality of pwn. Just click on it and select the name of the machine you would like to be compromised.
4+
*This is simple button that will automate the creation of starting notes that will improve your quality of pwn. Just click on it and select the name of the machine you would like to compromise.
55

66

77
```mermaid
88
flowchart TB
9-
A["Button Action"] --> B["Search folder name"]
10-
9+
A["Button Action"] -- machine_name --> J["API Request"]
10+
J -- Not found --> N["Exit"]
11+
J -- Found Machine --> B["Search folder name"]
1112
B -- Found --> E["Just update the machine info"]
1213
B -- Not Found --> C["Create folder structure"]
1314
C --> F["00-index"]
@@ -30,7 +31,7 @@ color blue
3031

3132
---------------------
3233

33-
## Script Workflow for - Update Machine info
34+
## Script Workflow for - Update Machines info
3435
*As you can see in the diagram below, you can update the machine info of all the machines that has its folder name under /Machines folder*
3536

3637
```mermaid
@@ -57,5 +58,3 @@ Custom Class custom-buttom
5758

5859

5960

60-
61-

0 commit comments

Comments
 (0)