-
Notifications
You must be signed in to change notification settings - Fork 754
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,18 @@ | ||
//TODO | ||
import { cropText } from '../../../utils' | ||
|
||
export default { | ||
inputQuery: async () => { | ||
try { | ||
const title = document.querySelector('.title')?.textContent.trim() | ||
const authors = document.querySelector('.authors')?.textContent | ||
const abstract = document.querySelector('blockquote.abstract')?.textContent.trim() | ||
|
||
return await cropText( | ||
`Below is the paper abstract from a preprint site, summarize the key findings, methodology, and conclusions, especially highlight the contributions.` + | ||
`${title}\n${authors}\n${abstract}`, | ||
) | ||
} catch (e) { | ||
console.log(e) | ||
} | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters