Curious why my previous post was flagged and hidden - are ChatGPT mentions not welcome?
Yeah why the hell was that comment flagged and hidden? I demand an explanation
This is correct. We have had to deal with numerous instances of people trying to be helpful by copying and pasting false info from LLMs. Then other users take that and run with it, causing all sorts of trouble.
Please donât do it. Thanks for understanding!
Iâll just add, while this is a fairly simple Python snippet that you can read and understand, youâve posted a code snippet that you donât necessarily understand (I donât know you or your skill level with code). A snippet that traverses multiple directories and modifies files.
This is relatively safe. But in unskilled hands, and for someone who doesnât have good backups, it could mangle a vault. Itâs not our job as moderators to do code reviews. So yes, hallucinated GPT answers are not encouraged.
Furthermore as a Python developer, let me give some specific feedback:
-
Why is glob imported? Because you are running code that has been blindly mushed together from multiple sources.
-
Do you know what
f.read()
does? It reads the entire file into a string. On most notes this would be perfectly fine. On an enormous file, this could cause memory issues. True, it would have to be pretty huge.
A better Python pattern would be to iterate over the lines:
with open() as note:
for line in note:
# do your loop on each line
- Do you understand what the IGNORECASE flag does? Itâs pretty clear by reading it that it would ignore case, right?
replaces all instances of " ProGuides " with " [[ProGuides]]
No. That is false. It would replace all instances of ProGuides, proguides, PROGUIDES or PrOGuIdEs with [[ProGuides]].
It would also replace OhWhoopsyDoodleProGuides with OhWhoopsyDoodle[[ProGuides]].
Which in this one specific example is pretty safe. But if someone was trying to replace a fairly generic word, or an easily-stemmed word, again they could mangle their vault. This wasnât bug-tested. This wasnât thought through. You didnât seem to understand the code you posted.
So if you donât know the answer to something, please donât post a hallucinated auto-generated answer.
Did that satisfy your concerns?
I ran the code and it worked fine. The search string includes whitespace before and after the string so it wouldnât replace OhWhoopsyDoodleProGuides as you suggest, as it specifically searches for the whitespace as well as the text string. Iâm not an expert coder and I was just trying to help. I donât have a problem with the post being removed and understand your policy and why you are enforcing it, but I have to say I found your reply really hostile and condescending.
No problem
Apologies to you, I can see what you mean. Most of the tone of my reply was directed at obsequious âdemandingâ an explanation; not at you.
Iâm not trying to belittle your skill or insult you. Iâm explaining why we donât encourage GPT answers like this in general. There are consequences and potential bugs one doesnât consider when they post code they havenât written.
All good, no worries.
Ryanâs reply was sufficient.
I donât know if your answer was rude, but the censoring of Chrisâs comment without explanation was rude, IMO. And Ryan addressed my concern.
Anyway, thanks.
hi,
indeed i want to start my post by saying:
time flies, now i am empowered by GPXXâŚ, thus i can make the topic happen by myself.
HOWEVER, now i found that is not a good idea.
i got many notes, and if every item was backlinked, sometimes it make
- too many backlinks,
OR 2. it become out of focus: suppose you got [[hypoparathyroidism]] and [[pseudohypoparathyroidism]], the plugin wont know how should it back link to, for a text of ââhypoparathyroidismââ
so, manually backlink is a fine tune, is a preferred method for me now.
but it wont hurt if there is a button that backlink all.
Iâd be interested in a command to wrap all instances of a selected word with double square brackets without the need to manually write it in search & replace.
So the command could be added to a button somewere or a shortcut, using the editing toolbar plugin or commander or whatever else.
It would enable you to select a word, and with the click of a button, link all instances of that word.