I have a transcript with timestamps, want to add a same url before all timestamps and add ‘]’ after all timestamps, yeah I try to make timestamps as a markdown link.
it seems not working, do I need some special settings?
the result for me is ‘(timestamp) [https://www.xxxxx.com=1]’, the original timestamp was replaced by ‘1’.
Only find this post, but my case is more complicated.
I would like an action, first let me input ‘url’,
then find all timestamps,
then combine these strings, ‘[this post](’ + ‘url’ + ‘#=’ + ‘timestamp’ +‘]’,
then replace every timestamps with combined strings.
I try to use GPT to write the script but too difficult for me to adjust the code, could someone help?
Things are a little unclear certainly. In your first post you describe a format for what you want, then make a passing reference to Markdown links (which the format you described was not - look at where the different brackets are). You have switched them around in your latest description, but what Gregg suggested matches against your original example.
So, I think that’s where one problem lies. Check where your square brackets and round brackets (Parentheses) go.
Next, in your replacement, rather than using \1, try using $1 instead as the token for the matched timestamp.
I think that should solve the timestamp being substituted for the character 1.
I’m not in a position to do much testing on this just this moment, but off the top of my head I would try the following replace with the “Use regular expressions” option enabled.
In the find:
\d\d:\d\d:\d\d
In the replace:
[timestamp](https://www.xxxxx.com#t=$1)
Take a backup, give it a try and let us know if that works for you.