scientific-name-fetcher (scifetcher)
Fetch plants/animals scientific name information from the internet.
Current supported sources:
Requirements
Detailed Guide for Windows
1. Download python from https://www.python.org/downloads/
2. Install python, follow the instruction
3. Press Win button (something like window icon on keyboard), search "env", then open `Edit the system environment variables`
4. Click Environment Variables
5. On `System Variables` section, edit the `Path` key
6. Add these paths using the `New` button:
```
# Please replace the username with your windows username, you can see it in C:\Users folder
# Please replace the python version with your installed python version
C:\Users\\AppData\Local\Programs\Python\Python310
C:\Users\\AppData\Local\Programs\Python\Python310\Scripts
C:\Users\\AppData\Roaming\Python\Python310\Scripts
```
7. Click OK, then OK
8. Open cmd, then type `python --version`, then it should respond with the python version.
9. Type `pip3 install --user pipenv`, then it should install pipenv, make sure it's successfully installed.
10. Type `pipenv --version`, then it should respond with the pipenv version.
11. Done! You can continue follow the guide in the "How to run" section.
How to run
- Clone
git clone git@github.com:rizqirizqi/scientific-name-fetcher.git
cd scientific-name-fetcher
-
Copy env
Linux:
cp env.sample .env
Windows:
copy env.sample .env
- Install dependencies
pipenv --python 3
pipenv install
- Fill your input in
input.txt
, please look at samples/input.txt
for example. You can also use csv or xlsx if you want.
- Run
pipenv run python -m scifetcher -i input.txt
- The result will be placed in a file named
result.*.txt
Help
pipenv run python -m scifetcher --help
Settings
- Edit .env file (see env.sample file for reference)
- Change the settings
Available settings:
Setting |
Default |
Description |
AUTO_SEARCH_SIMILAR_SPECIES |
True |
Search GBIF database with similar name from wikipedia result. |
INCLUDE_GBIF_SEARCH |
True |
Include GBIF search result if it can't find the exact match of the scientific name. |
IUCN_API_TOKEN |
- |
Required token to fetch data from IUCN API. Request a token here. |
Contributing
- Fork this repo
- Develop
- Create pull request
- Tag @rizqirizqi for review
- Merge~~
Run Test
# all
pipenv run python -m unittest
# one file
pipenv run python -m unittest tests
# coverage
pipenv run coverage run -m unittest
coverage report
coverage html && xdg-open ./htmlcov/index.html
Lint
If you're using VSCode:
- Open the Command Palette in the
View
menu (or just Ctrl+Shift+P)
- Type
Python: Select Interpreter
- Select
scientific-name-fetcher
- Choose
pipenv
License
GPL-3.0