Making clickable citations possible in notion
Making clickable citations possible in notion
My main goal is, to be able to click an annotation 3 times and open the Zotero editor
(See Attachment 1)
I have tested if it is possible to open the annotation in Zotero,
(as you can see in attachment 2) and it works beautifully.
In order to make this "automation" possible, I will need, to have a script that:
Scrip 1: reads the clipboard and subtracts only the application URL, and then runs it like in attachment 2.
(But obviously, I need to have the "annotation blocks" in notion first, So I can use the script 1 on them.)
Script 2: process the Zoteros extracted file (see attachment 3) and create a new one(or edit the same), So then I can copy/paste the content directly into Notion.
I think the conversion will be easy because every annotation is separated from each other with an empty line, and not much editing is needed (see example in attachment 3).
Any suggestion will help me a lot.
Do you think that this is going to be possible? (I think it is an easy task)
!Should I edit or create a new file every time?!
Do you know any function (like run in attachment 3), that I should use?
download/file.php?id=18745
download/file.php?id=18744
download/file.php?id=18742
(See Attachment 1)
I have tested if it is possible to open the annotation in Zotero,
(as you can see in attachment 2) and it works beautifully.
In order to make this "automation" possible, I will need, to have a script that:
Scrip 1: reads the clipboard and subtracts only the application URL, and then runs it like in attachment 2.
(But obviously, I need to have the "annotation blocks" in notion first, So I can use the script 1 on them.)
Script 2: process the Zoteros extracted file (see attachment 3) and create a new one(or edit the same), So then I can copy/paste the content directly into Notion.
I think the conversion will be easy because every annotation is separated from each other with an empty line, and not much editing is needed (see example in attachment 3).
Any suggestion will help me a lot.
Do you think that this is going to be possible? (I think it is an easy task)
!Should I edit or create a new file every time?!
Do you know any function (like run in attachment 3), that I should use?
download/file.php?id=18745
download/file.php?id=18744
download/file.php?id=18742
- Attachments
-
- Attachment 3
- notepad_41rIsvv7E9.png (191.87 KiB) Viewed 690 times
-
- Attachment 1
- mspaint_etD5KKrBme.png (155 KiB) Viewed 690 times
-
- Attachment 2
- notepad_wG2o8ERwvy.png (30.19 KiB) Viewed 690 times
Last edited by BoBo on 07 Aug 2022, 07:28, edited 1 time in total.
Re: Making clicable citations possible in notion
1st: Welcome
Hint: at least the script's content should be posted as code.
TBH, I (and probably a billion other supporters) aren't keen to use an OCR to get any sample code to work with from an image
Taken from the 2nd image - the path you wanna extract seems always (?) the trailing string after the least positioned colon, correct?
Hint: at least the script's content should be posted as code.
TBH, I (and probably a billion other supporters) aren't keen to use an OCR to get any sample code to work with from an image
Taken from the 2nd image - the path you wanna extract seems always (?) the trailing string after the least positioned colon, correct?
Code: Select all
!c::
clipboard:=""
Send ^c
ClipWait
MsgBox % StrSplit(clipboard,":").Count() ;Replace 'MsgBox' with 'Run' after testing.
return
Re: Making clickable citations possible in notion
Thank you for your corrections
Sorry, but I don't fully understand your question.
If you still want to help me,
This is where i am:
The script is going to be executed on different annotations every time,
but every time, at the end of EVERY annotation, is going to be the application URL
as you can see in attachment 1
For now, I was wondering if I could capture those URLs at the end of those different Annotations
maybe this could be done, if I was able to recognize the string "zotero://" and then capturing everything after this string
So, at the end, i could save the entire url in a variable temp
Sorry, but I don't fully understand your question.
If you still want to help me,
This is where i am:
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
^q::
myvariable := Clipboard
msgbox % myvariable
return
The script is going to be executed on different annotations every time,
but every time, at the end of EVERY annotation, is going to be the application URL
as you can see in attachment 1
For now, I was wondering if I could capture those URLs at the end of those different Annotations
maybe this could be done, if I was able to recognize the string "zotero://" and then capturing everything after this string
So, at the end, i could save the entire url in a variable temp
- Attachments
-
- chrome_bME2knaYDT.png (36.97 KiB) Viewed 601 times
Re: Making clickable citations possible in notion
here,
already found such a function.
already found such a function.
Re: Making clickable citations possible in notion
Code: Select all
str = xyzzotero://abc
url := SubStr(str, Instr(str, "zotero://"))
MsgBox, 64, URL, %url%
Re: Making clickable citations possible in notion
Thanks, to both of you.
I made the script that i wanted
I made the script that i wanted
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
XButton2::
Send ^c
ClipWait
myvariable := Clipboard
str := myvariable
url := SubStr(str, Instr(str, "zotero://"))
;MsgBox, 64, URL, %url%
Run, %url%
clipboard := ""
return
Re: Making clickable citations possible in notion
Good!
Could do:
Could do:
Code: Select all
XButton2::
Clipboard =
Send ^c
ClipWait, 0
If ErrorLevel
MsgBox, 48, Error, An error occurred while waiting for the clipboard.
Else Run, % SubStr(Clipboard, Instr(Clipboard, "zotero://"))
Return