Skip to content

Commit 5432b7e

Browse files
authored
Common structure for search websites (#23)
* API work to impose a common structure across websites. * Remove plural * Fix vignette index name * Update NEWS * Stage environment
1 parent 7ff1ddb commit 5432b7e

File tree

3 files changed

+38
-2
lines changed

3 files changed

+38
-2
lines changed

NEWS.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@
88

99
## Changes
1010

11-
- Default options added.
11+
- Default options added:
1212
- `searcher.launch_delay` controls how long the user remains in _R_ prior
1313
to the browser opening. Default is `0.5` seconds.
1414
- `searcher.use_rstudio_viewer` specifies whether RStudio's viewer pane should
1515
open the link instead of a web browser. Default is `FALSE` until the issue
1616
is resolved..
1717

18+
## Fixes
19+
20+
- Fixed vignette index name.
1821

1922
# searcher 0.0.4
2023

R/searcher-environment.R

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
keyword_default = function() {
2+
keyword_entry("r programming", "tidyverse")
3+
}
4+
5+
keyword_entry = function(base, tidyverse = base) {
6+
list(base = base, tidyverse = tidyverse)
7+
}
8+
9+
site_entry = function(url, keywords = keyword_default(), suffix = NULL) {
10+
list("url" = url,
11+
"keywords" = keywords,
12+
"suffix" = suffix)
13+
}
14+
15+
searcher_properties =
16+
list(
17+
"google" = site_entry("https://github.com/search?q="),
18+
"bing" = site_entry("https://bing.com/search?q="),
19+
"duckduckgo" = site_entry("https://duckduckgo.com/?q="),
20+
"startpage" = site_entry("https://startpage.com/do/dsearch?query="),
21+
"stackoverflow" = site_entry("https://stackoverflow.com/search?q=",
22+
keyword_entry("[r]", "[tidyverse]")
23+
),
24+
"rstudio community" = site_entry("https://community.rstudio.com/search?q=",
25+
NULL),
26+
"github" = site_entry("https://github.com/search?q=",
27+
keyword_entry("language:r type:issue"),
28+
"&type=Issues"
29+
),
30+
"bitbucket" = site_entry("https://bitbucket.com/search?q=",
31+
keyword_entry("lang:r"))
32+
)
33+

vignettes/search-patterns.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: "James Joseph Balamuta"
44
date: "`r Sys.Date()`"
55
output: rmarkdown::html_vignette
66
vignette: >
7-
%\VignetteIndexEntry{search-patterns}
7+
%\VignetteIndexEntry{Search Patterns}
88
%\VignetteEngine{knitr::rmarkdown}
99
%\VignetteEncoding{UTF-8}
1010
---

0 commit comments

Comments
 (0)