Comments (5)
According to the format I think this shouldn't be a problem to implement for simple cases, but I'm not too sure how this work if, for example, two notes share the exact same title.
from bear.
I tried it and even bear can't deal with duplicate titles, so there is no real solution to this. On the other hand I can implement a solution that would work in other cases (I feel like duplicate title is the only hard case).
If you have two notes with title Note A
bear link will not be tight to either of those but instead to the most recently modified. I think I can reproduce this behaviour.
from bear.
I've updated the code in the wikilinks branch so we try it out.
Here is what it would look like (I added the strange behaviour we would have with two notes sharing the same title).
If you want to try it out, you need to switch to the test branch in your local copy of this repository:
# depending on where you installed it, this should be the default:
cd ~/.github/bear/back-references
git fetch
git checkout -t remotes/origin/wikilinks
python insert_backreferences.py
from bear.
Awesome, works like a charm!
Two things I'd love to improve (might be translated into separate issues/features)
- remove the
/
at the end of a backlink if in main section. I'd expect the slash only to appear if the link comes from a sub-section. - Add option to auto-execute or schedule the script. I will temporarily set up an Alfredo workflow to execute via shortcut. Might include an auto-backup before executing as well.
from bear.
Actually, 1. already works, you can use the environment variable BEAR_ROOT_SECTION_TEXT
to define your own label (here an empty one) for the root section:
BEAR_ROOT_SECTION_TEXT='' \
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/cglacet/bear/master/install.sh)"
Or, since you probably work with the python script directly:
BEAR_ROOT_SECTION_TEXT='' \
python insert_backreferences.py
Other available options are documented here. I should add an option to modify the "note - section" separator too.
I also think 2. would be nice, not sure how to do it yet :). This would also help to solve other problems (like modification dates of notes).
from bear.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bear.