paleolimbot / rbbt

R Interface to the Better BiBTex Zotero Connector
145 stars 26 forks source link

bbt_write_bib() searches files in the working directory that are named after the clipboard content #18

Closed florisvdh closed 4 years ago

florisvdh commented 4 years ago

To reproduce this behaviour, you need something in the clipboard (I didn't succeed to run this via a reprex). You need to do something locally like:

clipr::write_clip("something_in_the_clipboard") (or just copy something with ctrl-c)

Then, this will happen:

> library(rbbt)
> bbt_write_bib("rbbt-bibliography.json")
Detecting citations in clipboard contents...
Error: 'something_in_the_clipboard' does not exist in current working directory ('path/to/working/directory').

The same is true when a real citekey is in the clipboard (with Zotero open), e.g.:

> bbt_write_bib("rbbt-bibliography.json")
Detecting citations in clipboard contents...
Error: 'franklin_mapping_2009' does not exist in current working directory ('path/to/working/directory').
Session info ``` ─ Session info ────────────────────────────────────────────────────────────────────── setting value version R version 4.0.2 (2020-06-22) os Linux Mint 20 system x86_64, linux-gnu ui RStudio language nl_BE:nl collate nl_BE.UTF-8 ctype nl_BE.UTF-8 tz Europe/Brussels date 2020-09-13 ─ Packages ────────────────────────────────────────────────────────────────────────── package * version date lib source assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.0.2) bookdown 0.20 2020-06-23 [1] CRAN (R 4.0.2) cli 2.0.2 2020-02-28 [1] CRAN (R 4.0.2) clipr 0.7.0 2019-07-23 [1] CRAN (R 4.0.2) crayon 1.3.4 2017-09-16 [1] CRAN (R 4.0.2) digest 0.6.25 2020-02-23 [1] CRAN (R 4.0.2) dplyr 1.0.2 2020-08-18 [1] CRAN (R 4.0.2) ellipsis 0.3.1 2020-05-15 [1] CRAN (R 4.0.2) evaluate 0.14 2019-05-28 [1] CRAN (R 4.0.2) fansi 0.4.1 2020-01-08 [1] CRAN (R 4.0.2) generics 0.0.2 2018-11-29 [1] CRAN (R 4.0.2) glue 1.4.2 2020-08-27 [1] CRAN (R 4.0.2) hms 0.5.3 2020-01-08 [1] CRAN (R 4.0.2) htmltools 0.5.0 2020-06-16 [1] CRAN (R 4.0.2) INBOmd 0.4.9 2020-08-19 [1] Github (inbo/INBOmd@6a00c0b) knitr 1.29 2020-06-23 [1] CRAN (R 4.0.2) lifecycle 0.2.0 2020-03-06 [1] CRAN (R 4.0.2) magrittr 1.5 2014-11-22 [1] CRAN (R 4.0.2) pillar 1.4.6 2020-07-10 [1] CRAN (R 4.0.2) pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.0.2) purrr 0.3.4 2020-04-17 [1] CRAN (R 4.0.2) qrcode 0.1.2 2020-08-17 [1] Github (thierryo/qrcode@378d76b) R.methodsS3 1.8.1 2020-08-26 [1] CRAN (R 4.0.2) R.oo 1.24.0 2020-08-26 [1] CRAN (R 4.0.2) R.utils 2.10.1 2020-08-26 [1] CRAN (R 4.0.2) R6 2.4.1 2019-11-12 [1] CRAN (R 4.0.2) rbbt * 0.0.0.9000 2020-09-07 [1] Github (paleolimbot/rbbt@dd2ac57) Rcpp 1.0.5 2020-07-06 [1] CRAN (R 4.0.2) readr 1.3.1 2018-12-21 [1] CRAN (R 4.0.2) rlang 0.4.7 2020-07-09 [1] CRAN (R 4.0.2) rmarkdown 2.3 2020-06-18 [1] CRAN (R 4.0.2) rstudioapi 0.11 2020-02-07 [1] CRAN (R 4.0.2) sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.0.2) tibble 3.0.3 2020-07-10 [1] CRAN (R 4.0.2) tidyselect 1.1.0 2020-05-11 [1] CRAN (R 4.0.2) vctrs 0.3.4 2020-08-29 [1] CRAN (R 4.0.2) withr 2.2.0 2020-04-20 [1] CRAN (R 4.0.2) xfun 0.17 2020-09-09 [1] CRAN (R 4.0.2) yaml 2.2.1 2020-02-01 [1] CRAN (R 4.0.2) [1] /home/floris/lib/R/library [2] /usr/local/lib/R/site-library [3] /usr/lib/R/site-library [4] /usr/lib/R/library ```