2024-11-01 08:57
- Add linkding searching
- Fixed deploy script
2024-11-01 07:34
- Fix compile script and update services
2024-11-01 07:09
- Linkding search
- Safari history results ignore DuckDuckGo search pages
- Add global SL.site_search shortcut
2024-08-11 07:52
- % will always get title added
- Execution of script search from plugin directory
2024-08-10 12:20
- Set
complete_bare: true
in config to add markup and titles to "bare" urls - Script Search API to allow search plugins to be written in any language, as long as they return an appropriate JSON or YAML response
- Various fixes for bookmark search
2024-08-09 12:06
- Browser history and bookmark searches search all profiles in browsers that support them
- Arc history and bookmark search
2024-08-09 08:05
- Deploy automation, maybe
2024-08-09 07:56
- Missing rake task
2024-08-09 07:54
- Code cleanup, backwards compatibility
- Remove rexml dependency
2024-01-16 12:40
- Cache path missing element
- Update search spec test for recent results
- Rename #scrub method to #scrubup to avoid conflicts
2024-01-11 09:22
- Update the tokens for GH access from Services version
2023-12-29 12:06
- Lyrics embed can use !lyricjs to embed Genius.com lyrics with annotations
- #scrub method removes non-breaking spaces
- Array type search definitions throwing error
- API path missing /songs in lyrics.rb
2023-12-25 17:02
2023-12-25 16:50
- Plugins can use an array of possible search shortcut matches which will be displayed in help and used for matching search descriptions in notifications, so you can specify %w[weather, wea] and both will provide a description
- Move config file to ~/.config/searchlink/config.yaml. Old location still recognized for backward compatibility
- Move plugin location to ~/.config/searchlink/plugins. Old location still recognized for backward compatibility
- Move cache storage to ~/.config/searchlink
2023-12-25 16:09
2023-12-25 16:05
198f64715f6401cb149815990e8ceaa9348c542f
2023-12-13 14:02
- !img search to return the first image on the located page as a Markdown image tag
- Abstract all curl commands to classes
- New classes HTMLCurl and JSONCurl to handle using curl for getting web page contents, will help plugin developers handle all of the edge cases when using curl
- "Which" class to locate the exact binary for curl operations
- Update all searches to use new Curl classes
- Option to symbolize names when curling JSON
- Use a hash for headers on curl calls instead of an array of strings
- Docs update, fix tests
- Curl library improvements
- Update tests
- GitHub gist embed failure
2023-11-07 17:37
- Automatically trim ^ and $ from start/end of trigger definitions to avoid conflicts with custom plugins
- Rename URL.get_title to URL.title
- Add Util.curlHTML and Util.curlJSON methods
- Lyrics embed in example plugin
2023-11-06 12:45
- Unable to retrieve app titles from Mac App Store and iTunes
- Parsing of title tags
2023-11-06 11:26
- !g search not falling back to DuckDuckGo
- DuckDuckGo fallback infinite loop and timeout
2023-11-06 09:55
- Custom searches were returning a list of plugins instead of URL
2023-11-05 16:09
2023-11-01 10:27
2023-10-30 12:35
- Add browser id header to curl command when fetching title to avoid 502 errors
2023-10-29 17:31
- Fix for recent DuckDuckGo changes
2023-03-15 06:01
- YouTube embed error
2023-02-27 11:27
- Refactoring and code cleanup
- Remove calls to gather as certain titles weren't being retrieved properly
!yt <ID>
will return a valid watch url
- Errant dash in version check
2023-01-31 06:55
- Apple Music search
- Update mechanism not returning valid data
2023-01-31 06:36
- Code cleanup
2023-01-31 06:47
2023-01-30 13:01
- Code cleanup
- Test disambiguation of zero-click results
- Code cleanup
- Accomodate missing secret tokens so gem can compile and run on other systems
- Partial removal of HTML tags from !def definition title
- SearchLink File service returning blank file
- Unprintable characters in titles
2023-01-25 08:41
- Nil object in get_safari_bookmarks
2023-01-24 06:29
- Auto-update mechanism
2023-01-24 06:04
- Surround a section of text in angle brackets to require an exact phrase match
- Searches now have a timeout of 15 seconds by default, can be adjusted with the
timeout:
setting in config
- All searches allow starting with a single quote to perform an exact string match (case-insensitive)
2023-01-24 06:27
2023-01-23 13:11
!ghu USER
to link a GitHub user's homepage, can also search by
- Switch GitHub searching to using the GitHub API
!gh
can now search by language, readme contents, and more.
2023-01-23 08:31
- Detect encoded m-dash when removing SEO elements from titles
- Browser history and bookmark fixes
2023-01-22 10:44
2023-01-22 09:37
- Search for custom plugins
- StackOverflow accepted answer search
- More tests
- Gist search fixes
- Chromium bookmark search not returning most relevant result
- Path to Microsoft Edge history file
2023-01-21 17:19
- Add GitHub search
- Lyrics search and embed with !lyrics !lyricse
- Refactor all searches as plugins
2023-01-20 09:06
- Code refactoring
- More code refactoring
- Updated amazon affiliate linking format
- More tests
- Social handle expansion
2023-01-19 15:39
- Allow search terms in !hook searches to have words in any order
- Remove Instant Answers check from !def, use wordnik instead to put definition in title attribute
- !hook returning invalid search
2023-01-19 11:44
- GitHub gist search and embed (!gist/!giste)
- If you pass a gist url or [user/]id[#filename] string to !giste, create a valid embed for the gist'
2023-01-18 16:18
- Removing workflows from repo to avoid expiring GitHub token
2023-01-18 16:10
- Attempting to fix update mechanism
- GitHub token being committed to repo
2023-01-18 15:32
- Code refactoring, shouldn't have cause usability changes
2023-01-18 12:30
- Move GitHub token to secrets file
2023-01-18 08:37
- Set
remove_seo: true
in config to have page titles parsed and cleaned up, removing things like site name and url
- Bad GitHub token, and silent failure when authentication fails
2023-01-18 15:35
2023-01-18 07:56
- Authenticate GitHub update checks to avoid rate limit
2023-01-17 11:35
- When returning a file from Spotlight, url encode spaces so the link works in Markdown previews
2023-01-17 09:55
- Don't unencode URLs from DDG searches, leave spaces and other characters properly encoded
2023-01-17 08:49
!bl
will shorten a link or search result using Bit.ly. Requires access token in config.
- Better scoring for matching Safari bookmarks
2023-01-17 06:30
!file SPOTLIGHT_QUERY
will search for a local file and output afile://
link with the filename as title
2023-01-17 06:29
!file SPOTLIGHT_QUERY
will search for a local file and output afile://
link with the filename as title
2023-01-16 16:43
- Run on "version" to get the current SearchLink version
- Run SearchLink on the word "update" or "upgrade" to automatically install the latest version (if needed)
- Check for newer versions when running version commands
- Run a quick version check every time and notify of updates available
- Remove extra spaces from titles
- Plist library version overriding SeachLink version constant
- Overly broad regex for matching !z search types
2023-01-16 16:42
- Run on "version" to get the current SearchLink version
- Run SearchLink on the word "update" or "upgrade" to automatically install the latest version (if needed)
- Check for newer versions when running version commands
- Run a quick version check every time and notify of updates available
- Remove extra spaces from titles
- Plist library version overriding SeachLink version constant
- Overly broad regex for matching !z search types
2023-01-16 08:22
- Zip download incomplete
2023-01-16 08:21
- Zip download incomplete
2023-01-16 07:27
- You can now pass a direct YouTube link (full or shortened) to !yte to convert to embed
2023-01-16 06:45
- Pass a tweet url to
!te
to create a Twitter embed
2023-01-15 16:52
- Use
!yte SEARCH
to create a YouTube embed iframe
- Point help links to wiki, add wiki/docs command
2023-01-15 13:23
- Add Arc history and bookmark search
- De-slugify reference titles when pulled from URL path, remove extensions
- Fallback title when gather fails to get a page title
- Method misspelling for brave and edge bookmark search
- Creating reference title when URL has no path
2023-01-15 10:47
- Allow space before per-document meta keys to allow nesting in YAML headers
- Refine software (!s) search. Ignore apple.com links, don't include "mac" in search terms
2023-01-15 07:27
- Add DuckDuckGo Zero Click search
- Add Firefox history and bookmark search
- Add Edge and Brave history and bookmark search
- Run SearchLink on a single fully-qualified URL to turn it into a Markdown link with the page title as linked text
- Run SearchLink on a url ending in : to turn it into a reference link with title generated from hostname and/or url path
- Add !yt YouTube search
- Testing deploy automation
- Fix Pinboard caching
- Fix Safari history and bookmark search
- Mastodon profile link conversion
- Pinboard query/matching improvements
- Fall back to including extended description search if Pinboard title/tags search has no results
- Add The Movie Database searching
- Fix for DuckDuckGo returning gzipped data
- Fix embed urls for iTunes searches
- Allow aspell to be discovered on M1 Macs running homebrew
- Code refactoring
- Fix missing !lsong search
- Fix for handling empty search types, e.g.
[brett terpstra]()
- throttle rapid requests when there are more than 5 searches
- handle nil result error
- Add
s
modifier to custom search replacements to slugify all search terms
- Add !hook search for searching Hook.app bookmarks
- Code cleanup
- Fix for space encoding in returned links
- Remove old Bing references
- Fix for social linking
- Fix for DuckDuckGo server changes
- More handling for social handles (Instagram, LinkedIn)
- Templating for social handle output
- Hotfix for search results returning raw DuckDuckGo links
- Skip SEO crud removal from titles until the script is more reliable
- Restore functionality allowing empty link text to be replaced with page title
- Config option
empty_uses_page_title:
- If link text is '%', force using page title (
[%](!g SearhLink)
)
- Fix for changes in DuckDuckGo
- Add advanced option to Jump To SearchLink Error service to allow only jumping to line, not character position or selection. (significantly faster in most cases)
- Update Apple Music embed code for responsive embed
- Fix output when running an Apple Music embed search using naked syntax
- Avoid running a search when parens do not contain a bang search, e.g.
[this search](should not run)
- Count
#fragment
links as urls and don't run search
- Restored "Jump to SearchLink Error" Service in download
- Skipped a few increments in version numbering. Feature, not bug
- !imov search for iTunes store movie links
- Added
aspell
feature for !spell searches - Switched
!def
(definition) searches using Wordnik - Pinboard bookmark search
- Wikipedia API was erroring out on Sierra due to Ruby 2.0 SSL handling, replaced with a curl/scrape hack
- Replaced Bing search with DuckDuckGo, as Bing has now deprecated their search api as well
- Updated Amazon affiliate linking format
- Apple Music search and affiliate linking
- Running a single-line search on just an @username turns it into a twitter link
- Convert to a Facebook username with
- Single line:
!@fb username
- Link format:
[username](!@fb)
- Single line:
- Fix for wiki searches
- Select just the word "help" for a list of available searches (and custom searches)
- Bing search fallback due to deprecated (4 years ago) Google APIs potentially being shut down soon
- Can be forced with
!b
- Can be forced with
- quotes no longer required around additional search terms
- if search terms in parenthesis start with a "+", they're appended to the link text for the search, otherwise they replace it
- A tilde (~) at the end of a single-string search with no bracket syntax checks the clipboard for a url and wraps the selected text with it if found
-
can be used with the
:
syntax at the end to create a reference with the selected text as the title -
ignores and strips
!!
(link only) and^
syntax# with "http://www.tuaw.com/tag/howto/" in the clipboard TUAW how-to~ => [TUAW how-to](http://www.tuaw.com/tag/howto/) TUAW how-to:~ (or "TUAW how-to~:") => [TUAW how-to]: http://www.tuaw.com/tag/howto/
-
- !example.com searches become site-specific web searches
- for single-line searches, text in parenthesis is searched (as additional search terms) but not included in the link text
- in single line searches without
[]()
format, text surrounded in quotes becomes the link text!g "Six Barrel Shotgun" black rebel
is the same as!g Six Barrel Shotgun (black rebel)
- !spell search replaces selection with most relevant spelling correction
- works on entire blocks of text
- you can use a colon in a bracketed search and if it's alone on a line it will create a reference link definition
- if an identical link results in future searches, it will re-use the id of the generated reference definition
- if the resulting link already exists, any defined reference id will be replaced with the existing definition's id
- the reference definition will be moved to the end of the document
- create footnotes with
[id](^footnote text)
- if id isn't specified, one is generated
- footnotes are collected at the end and added with line breaks surrounding
!h
for searching your own web history-
configure search types in ~/.searchlink
history_types: - chrome_history - chrome_bookmarks - <del>safari_bookmarks</del> (currently broken) - <del>safari_history</del> (currently broken)
-
use
!h[sc][hb]
to configure on the fly- !hsb only searches (s)afari (b)ookmarks
- !hsbh searches safari bookmarks and history
- !chsb searches chrome history and safari bookmarks
- !h searches all configured types from ~/.searchlink
-
- ~/.searchlink
- config option to validate links (validate_links)
- custom search definitions with a value starting with http or / and including $term in the string will simply have the value returned with the $term replaced with the input
$termd
lowercases the text in the replacement string- More than one
$term
can be used by adding numbers after them$term1
,$term2
- the search terms given are separated by a space
- if there are more terms than tokens, the additional terms are appended to the last token
$term1d
works for lowercasing- replacements are URL encoded
report
option outputs verbose info on multi-line searches
- set configuration options with MMD metadata (per document) or flags (per link)
-
The following headers can be set in MMD: debug, country_code, inline, prefix_random, include_titles, validate_links
- headers set at the top of the document
key: value
- e.g.
debug: true
- Headers set in MMD metadata are global (unless overridden by a flag) and not removed from the output
-
The following can be switched per link with
--(no-)key
: inline, include_titles, validate_links- flags are removed from the search and the output
- values changed by flags are restored after processing each link
-
flags can be used in custom search engine definitions
-
flags in definitions are overridden by flags in the input
-
use this for applications such as never validating links of a certain type:
# In ~/.searchlink: custom_site_searches # lowercases the query and never validates tag: http://brettterpstra.com/topic/$termd/ --no-validate_links $ !btt markdown => [markdown](http://brettterpstra.com/topic/markdown/)
-
-
Shortcuts are available for some flags.
-
debug =
d
, inline =i
, include_titles =t
, and validate_links =v
-
Enable options with
++[options]
, disable with--[options]
. -
Multiple options can be grouped together
-
both
++
and--
can be used in the same link -
only the first appearance of a flag is used, repeats are ignored
-
example:
# do a google search for the link text # additional (+) search terms appended to query # no link validation (--v) # create an inline link with a title (++it) [Martha Stewart](!g --v ++it) => [Martha Stewart](http://www.marthastewart.com/ "Martha Stewart - Recipes, DIY, Home Decor & Crafts")
-
-
- link format only forces inline if a single line (no newlines) is selected
- groups new reference definitions with any existing definitions at end of selection to keep full-document selections looking tidy
- detects existing random prefix and continues pattern for easier search and replace
- duplicate urls properly re-use existing reference titles
- links in code blocks (indented or fenced) are ignored
- reports and errors are removed and replaced when running on a full document
- Jump to SearchLink Error service accepts a highlighted error line and jumps to its position in the document, highlighting the offending match
- can run on a file if path(s) are passed as an argument (SearchLink File service)
- set
SL_SILENT=false
on the command line for verbose output -debug
flag to output html comment at end of selection showing any errors- at end of line for single line searches
- block format for multi-line searches
-version
-help
-stdout
outputs to STDOUT when using on files as CLI- default is to overwrite the file,
-stdout
cancels this out
- default is to overwrite the file,
-no-backup
- default is to create a *.bak file when overwriting
- copy config options to
~/.searchlink
to preserve across upgrades- Config file is created on first run if it doesn't exist
- allows
[aawerg]()
for google search - allows custom site search definitions
- allows
[](search terms)
(inserts title as link text) - allows
[me](brett terpstra)
as google search - better cleaning of titles