Giter Club home page Giter Club logo

scientific-name-fetcher's Introduction

scientific-name-fetcher (scifetcher)

contributions welcome MIT License

Watch on GitHub Star on GitHub Tweet

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\<YOUR_USERNAME>\AppData\Local\Programs\Python\Python310
    C:\Users\<YOUR_USERNAME>\AppData\Local\Programs\Python\Python310\Scripts
    C:\Users\<YOUR_USERNAME>\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

  1. Clone

    git clone [email protected]:rizqirizqi/scientific-name-fetcher.git
    cd scientific-name-fetcher
  2. Copy env

    Linux:

    cp env.sample .env

    Windows:

    copy env.sample .env
  3. Install dependencies

    pipenv --python 3
    pipenv install
  4. Fill your input in input.txt, please look at samples/input.txt for example. You can also use csv or xlsx if you want.

  5. Run

    pipenv run python -m scifetcher -i input.txt
  6. The result will be placed in a file named result.*.txt

Help

pipenv run python -m scifetcher --help

Settings

  1. Edit .env file (see env.sample file for reference)
  2. 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

  1. Fork this repo
  2. Develop
  3. Create pull request
  4. Tag @rizqirizqi for review
  5. 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:

  1. Open the Command Palette in the View menu (or just Ctrl+Shift+P)
  2. Type Python: Select Interpreter
  3. Select scientific-name-fetcher
  4. Choose pipenv

License

GPL-3.0

scientific-name-fetcher's People

Contributors

aldikanugraha avatar dependabot[bot] avatar hgb123 avatar jonasfs avatar pradeepb2505 avatar rizqirizqi avatar rydwhelchel avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

scientific-name-fetcher's Issues

Implement a CLI for ease of use.

I think this would be more useful and easier to use with a CLI.

For instance, you could have a default behavior that would look up a single organism and print the info to the terminal:
user@host:~$ python3 main.py hydnum repandum
Hydnum is a genus of fungi in the family Hydnaceae. They are notable for their unusual spore-bearing structures of teeth rather than gills...

The current behavior could be invoked with its own command line switch, such as -b, for batch mode.
user@host:~$ python3 main.py -b input.txt

This also lets the user specify a different input file.

Additionally, behavior options could be overwritten on the command line:
user@host:~$ python3 main.py --no-gbif-search --no-auto -b my_long_list_of_names.txt

Or something like that. The Python argparse library could be used to easily implement this.

If you think this would be worthwhile, I can submit a pull request.

Add more information / validity check for each scientific-name

Currently scientific-name-fetcher is using

  1. Wikipedia API to search for scientific name description
  2. GBIF API to check for the validity of the scientific name

It will be good if we add more information or validity checks so that scientific-name-fetcher becomes more useful to the community.

Here are some APIs/Libraries that we may use:

Enable CSV / Excel input file

The current input file is using simple txt. Some people may have a CSV or Excel file, so we may need to allow them to directly use it as an input.

Move settings to .env

The current settings are hardcoded in the main.py file. It's better to move it to .env file. We can use python-dotenv to make it easier.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.