Giter VIP home page Giter VIP logo

obs_tools's People

Contributors

perkinsben avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

obs_tools's Issues

-w wikiflag for paragraph

May I ask if it is possible to implement -w for paragraph base also? (currently as I understand the implementation is on page/note based)
Use case: For user who will do note refactoring after running this script.

Add options to ignore certain lines

For example do not link words in:

  • Heading 1

  • Heading 2

  • Heading 3

  • Heading 4

  • Quotes

  • Strikout
  • ==Highlights==

This will be amazing time saver so you can highlight whole file and not to worry that for example headings get screw-up with links.

combine obs-unlinkr.py code into obs-linkr.py for stripping and re-creating the links

I wrote a bash script to first run obs-unlinkr.py and then obs-linkr.py as in 99 of 100 cases the intent for existing use is to update the contents. And for that clearing the markup in the clipboard is the first phase.

Could you combine this code into obs-linkr.py with a special flag so it's opt-in? This way there's only one case of launching the (heavy) python runtime rather than twice, to save cycles?

UTF-8 replacement issues

Are the search regex strings and string variables configured for UTF-8? I could see cases where a right Markdown file is not picked up by the forward linker:

-rw-r--r--@ 1 ksandvik  CORP\Domain Users   56 Mar 21 14:56 KSDict/སྟོང་པ.md

(master) ~> python3 obs-linkr.py /Volumes/Work/Tibworkspace/ -r
Empty alias (will be ignored): aliases
----------------------
linked རྣམ་པར་ཤེས་པ
linked སྟོང
linked རྣམས
----------------------
linked text copied to clipboard

(master) ~> python3 --version
Python 3.9.2

Clipboard contents:

རྣམ་པར་ཤེས་པ་རྣམས་སྟོང་པའོ།།

Note that the word is part of the grammatical construct སྟོང་པའོ , འོ means ending means genitive.
Note that the regex didn't pick up སྟོང་པ.md, rather སྟོང . This is in Tibetan but it's standard UTF-8. Worst case it's just a python3 regex UTF-8 bug not properly handling rune combinations.

Having an option to specify the minimum number of words for forward linking

I have a few single-word file/concept, for example, space, time, precision, accuracy. Most of the time, I don't want to link them. They are general concepts that I occasionally link when something really sticks out. Generally, I only need to search for and link longer words/phrases. It would be useful to have an option to specify the minimum number of words to search for forward linking.

Search and replace orders

Thank you for sharing this.
When i use this tool, sometimes it would shows that the word have been processed many times
Such as if i have keywords on team, learning and team learning episode:

  1. [[Team [[Learning|learning]] episode|team [[Learning|learning]] episode]] instead of [[Team learning episode|team learning episode]]
  2. [[Team [[Learning|learning]] episode|Learning Episode]] instead of [[Team learning episode|Learning Episode]]
    So i would suggest to prioritized long words over short words, then if the words is between the double bracket already then do not replace

support for suffixes

Hi!

Very nice of you to make this script. I was looking to build something myself, but now I'm at least gonna wait for 3d party plugin support. :D

If you have time, and find it a suitable addition, then I'd like to see support for basic suffixes.

Example:

With a file names Apple

Text with apples. 

Would be formatted to:

Text with [[apple|apples]]. 

Would be nice if this matching is non-specific and handles any word endings, and not just s. (To handle multiple languages out of the box.)

[suggestion/request] auto-run the linker tool on existing notes

Hi, would it be possible to enable the Auto-Linker to automatically go through existing notes and link words that are already found in another note, or words specified?

For example, I have a note that's an index where I store every note that I'd consider something I might want to revisit to remind myself of a concept. Would it be possible for the Auto-Linker to go through other notes and link the words/aliases found in those, to the notes found in the index?

Sorry if my explanation was poor, I'm not a native speaker.

python module dependency

Looks like the latest python frontmatter can't use the latest pyyml, so maybe the README instructions should show the exact versions at this point of time to get this working properly at initial install.

Script optimisation

I have 7000 notes, and the script is running already 3 hours in my Macbook 12". It runs just one core on 98%...
It will be amazing if you can optimise speed a little bit... Add some subprocesses....

Unexpected behavior

Pulled the repo to test it.

Either
py obs-linkr.py "C:\Users\kinla\Downloads\obs_tools-master\obs_tools-master\forward_linker"py obs-linkr.py "C:\Users\kinla\Downloads\obs_tools-master\obs_tools-master\forward_linker"
or
py obs-linkr.py "C:\Users\kinla\Downloads\obs_tools-master\obs_tools-master\forward_linker\test-vault"

does not work.

Is there any problem in my trial?

Thank you

Ignore Obsidian .trash folder

Can you please update the script to ignore any .md files inside the Obsidian .trash folder? Currently it picks up aliases from deleted files too.
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.