bibtex-search
Advanced tools
Comparing version 0.1.0 to 0.1.1
10
index.js
@@ -11,2 +11,3 @@ #!/usr/bin/env node | ||
const clipboardy = require('clipboardy'); | ||
const chalk = require('chalk'); | ||
@@ -26,3 +27,3 @@ const MAX_ARTICLES = 10; | ||
const articleSelector = selector(article); | ||
const link = articleSelector.find('.title > a'); | ||
const link = articleSelector.find('.title > a[href^=citation]'); | ||
const title = link.text(); | ||
@@ -70,3 +71,3 @@ const authors = articleSelector | ||
value: id, | ||
name: `${title} (${authors})` | ||
name: `${title} ${chalk.dim(`(${authors})`)}` | ||
})); | ||
@@ -99,2 +100,7 @@ | ||
if (!articles.length) { | ||
spinner.info(`No results found for query '${query}'.`); | ||
process.exit(0); | ||
} | ||
const questions = buildQuestions(articles); | ||
@@ -101,0 +107,0 @@ const { article } = await inquirer.prompt(questions); |
{ | ||
"name": "bibtex-search", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Search for BibTeX references", | ||
@@ -30,2 +30,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"chalk": "^2.3.0", | ||
"cheerio": "^1.0.0-rc.2", | ||
@@ -32,0 +33,0 @@ "clipboardy": "^1.2.2", |
@@ -1,2 +0,2 @@ | ||
# bibtex-search [](https://travis-ci.org/ekmartin/bibtex-search) | ||
# bibtex-search [](https://travis-ci.org/ekmartin/bibtex-search) | ||
@@ -3,0 +3,0 @@ > Command-line interface for retrieving BibTeX references |
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
54720
9
103
7
1
80
+ Addedchalk@^2.3.0