Skip to content

Ability to run on entire vault and fix linking within web-links#23

Open
pulinagrawal wants to merge 1 commit into
perkinsben:masterfrom
pulinagrawal:master
Open

Ability to run on entire vault and fix linking within web-links#23
pulinagrawal wants to merge 1 commit into
perkinsben:masterfrom
pulinagrawal:master

Conversation

@pulinagrawal

Copy link
Copy Markdown

Hi,

Thanks for creating this script. I have been able to make my vault much better with this script. It is almost a plugin for me after I started using this with Shell Command plugin. I hope to keep improving it in future.

Added a flag '-v' to run on the entire vault.
Fix linking within web-links. Web links are now ignored while generating linked text.
Refactored code to make it more modular.

@perkinsben perkinsben self-assigned this Aug 22, 2022
@perkinsben perkinsben self-requested a review August 22, 2022 11:48
@perkinsben perkinsben removed their assignment Aug 22, 2022
@perkinsben

Copy link
Copy Markdown
Owner

Hi Pulin,

Thanks for your contributions.

Can you give examples of how linking web-links was not working and how it's been corrected?

I've been hesitant since the beginning to introduce modificiations to vaults through this script. If someone ran the script against their vault and an error occured, it could cause unrecoverable changes to their data. My instinct is that this feature should exist on a branch or at least protected behind some very scary "running this code against your vault could result in data loss" messaging that the user should accept before execution.

if last_sep == -1:
last_sep = 0
if len(list( re.finditer("https://|file://|ftp://|www\.", updated_txt[last_sep:m.start()+offset]) )):
continue

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is where I fixed the web links thing. Sorry, I am unable to provide a detailed response at this time because I got a little obsessed with this code so have made so many changes to suit my needs that I have forgotten many things about the original changes I made that I put up for pull request.

I totally understand your sentiment about not modifying the whole vault. That could cause irreversible damage.

@dxcore35

Copy link
Copy Markdown

Fork. That is running one entire vault.

https://github.com/dxcore35/obs_batch-linkr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants