You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+37-17Lines changed: 37 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,14 @@
1
1
# Publication Figure Retrieval Tool
2
2
3
-
This tool provides a method for scraping through NCBI's [PMC](https://www.ncbi.nlm.nih.gov/labs/pmc/) publications and retrieving (downloading) the figures from open access and publicly available publications.
3
+
This tool provides a method for retrieving figures from NCBI's [PMC](https://www.ncbi.nlm.nih.gov/labs/pmc/) publications using the Entrez API.
4
4
5
5
[](https://twitter.com/alexjsully)
Please note that as of August 20, 2024, scraping figures from PMC (PubMed Central) publications is no longer permitted under their Copyright Notice ([https://www.ncbi.nlm.nih.gov/pmc/about/copyright/](https://www.ncbi.nlm.nih.gov/pmc/about/copyright/)). Attempting to do so may result in a 403 error and an IP ban from NIH/PMC. Users are fully responsible for ensuring their use of this tool complies with current PMC policies and applicable laws. Use at your own risk.
12
-
13
-
This code is maintained for educational and historical reference purposes only. While it remains functional, it is not intended for use in scraping PMC data, as this is no longer allowed under current policies. The tool was originally developed for academic research, but due to these policy changes, it is not recommended for use in this capacity anymore.
11
+
This code is maintained for educational and historical reference purposes only. The tool was originally developed for academic research. Please note that the use of this tool for retrieving figures from PMC publications is subject to NCBI's policies. Use at own risk.
14
12
15
13
## Requirements
16
14
@@ -20,25 +18,41 @@ This code is maintained for educational and historical reference purposes only.
20
18
21
19
## Installation & Setup
22
20
23
-
If you would like to run or modify the publication figure web scraping tool locally, clone the repository with git by running the following command:
21
+
If you would like to run or modify the publication figure retrieval tool locally, clone the repository with git by running the following command:
Then run `npm install` then `npm start`. This tool runs within your node environment. On Windows, this script needs to run in an administrator mode.
39
+
This tool runs within your Node.js environment. On Windows, this script may need to run in administrator mode.
40
+
41
+
### Usage
30
42
31
-
The images are downloaded then downloaded locally within this containing directory under [src/data/figures/{species}/{PMC ID}](./src/data/figures).
43
+
The images are downloaded locally within the `build/processor/output` directory.
32
44
33
-
If you would like to run against commercial use publications, you will need to download [`oa_comm_use_file.list.txt`](https://ftp.ncbi.nlm.nih.gov/pub/pmc/oa_comm_use_file.list.txt) from [ftp://ftp.ncbi.nlm.nih.gov/pub/pmc/](https://ftp.ncbi.nlm.nih.gov/pub/pmc/) then run `npm run process`. Once that is done, set [index.js](./src/index.js) init function to true (`await init(true);`)
45
+
### API Key
34
46
35
-
The publication figure scraper will resume where you last left off. If you would like to reset the scraper, empty [species-pmid-list.json](./src/data/species-pmid-list.json), [data-retrieved.json](./src/data/data-retrieved.json) and [data-empty-pubs.json](./src/data/data-empty-pubs.json) to contain only just an empty JSON object (`{}`).
47
+
If you have an API key, create a `.env` file in the root directory and add your API key as follows:
36
48
37
-
If you would like to add more species support for publications to be scraped, add the species to [species.json](./src/data/species.json) and then run `npm start`. Currently, this JSON includes species' common aliases which are not currently being used but may be useful in the future. If you would like to scrape a single species, then change `speciesList` in [index.js](./src/index.js) to an array of species scientific name(s) to scrape. For example: `speciesList = ['Arabidopsis thaliana']; // Or whatever species name(s) you would like to scrape`. Currently, it is set to scrape all species within the [species.json](./src/data/species.json) file.
49
+
```bash
50
+
NCBI_API_KEY=your_api_key_here
51
+
```
38
52
39
-
If in the instance that you do not have an internet connection/speed greater than 7mb/s, you will need to change all the Axios request timeouts in [data-retrieval.js](./src/scripts/data-retrieval.js) to a value of at least half of your speed (e.g. down speed of 10mb/s, set timeout to 5s).
53
+
With an API key, the tool can retrieve up to 10 calls per second instead of 3. Details on obtaining an API key can be found [here](https://ncbiinsights.ncbi.nlm.nih.gov/2017/11/02/new-api-keys-for-the-e-utilities/).
40
54
41
-
## Known issues
55
+
## Known Issues
42
56
43
57
We aim to make this tool as perfect as possible but unfortunately, there may be some unforeseen bugs. If you manage to find one that is not here, feel free to create a bug report so we can fix it.
44
58
@@ -48,6 +62,12 @@ We aim to make this tool as perfect as possible but unfortunately, there may be
48
62
49
63
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for more details.
50
64
65
+
Before contributing, ensure that all tests pass by running:
66
+
67
+
```bash
68
+
npm run validate
69
+
```
70
+
51
71
## License
52
72
53
73
[GLP-2.0](LICENSE.md)
@@ -61,7 +81,7 @@ This project is currently in maintenance mode. This means that:
61
81
62
82
## Sponsorship
63
83
64
-
If you want to support my work, you can through the following methods:
84
+
If you want to support my work, you can do so through the following methods:
0 commit comments