Giter VIP home page Giter VIP logo

bear-utils's Introduction

Utilities for Bear App

This repository contains some utilities I am using with Bear App.

Bear Search

Bear Search is an action for LaunchBar which allows you to search quickly from Bear notes without opening Bear first. The action connects directly to Bear's SQLite database and provides realtime search results. Selecting a result opens the note in Bear.

Screenshot 2021-03-19 at 7 23 48

Search criteria

The search always targets the Title and the Text of the note. By default, all notes matching any of the keywords are returned. A minimum of 3 characters must be typed. You can use keyword AND in the beginning of the search to change the behaviour to require a match for all criteria. Keywords AND and OR can also be used between search criteria.

Examples

  • AND ansible update -> all notes matching ansible and update
  • ansible update -> all notes matching ansible or update
  • ansible update AND #secops -> all notes matching ansible or update and #secops
  • AND ansible update OR #secops -> all notes matching ansible and update or #secops

The search is case-insensitive.

wiki-links.pl

Collects any [[wiki links]] found in Markdown files within the defined directory and adds or updates a ## Backlinks -section containing all links pointing to the file.

Links are kept in order, so we do not need to update any files unless there has been changes in links.

Screenshot 2021-03-19 at 7 24 18

References

Requirements

Perl

Usage

$ perl wiki-links.pl
usage: ./wiki-links.pl -d /path/to/directory [-b /path/to/backup_directory] [-v] [-r] [-l title|name] [-hs char]
-v = verbose output
-r = recursive search from defined folder. Default is to search 1 level only.
-l   defines if we should read the link target from filename or the title of the document
     defaults to 'title'
-hs  defines a separator character for sub heading links. Defaults to '/'

If backup directory is defined with -b, any file that would be updated is first copied to the backup directory. If backup fails, changes are ignored.

Use -v to get output from the script. Errors are always printed to STDERR.
Use -r for a recursive search in the defined directory. The default is to search one level only.

Note!

While this has been working well for me with the notes exported from Bear App, I highly recommend taking a backup of your files first!

Known issues

When using the wiki-links -script with Bear Note export / import, sync conflicts may occur if you are updating a note for which the Backlinks are being updated at the same time. These will be displayed in Bear and you need to manually resolve.

bear-utils's People

Contributors

tkjt avatar

Watchers

 avatar

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.