Topic Finder: My first shell Script

In any research and development one of the essential step is literature survey and for doing that we need to study a vast array of topics. Consider the example of PV modules, In order to begin and start with any developments in this area it is required that we have got an entire knowledge surrounding the topic of PV modules. This includes "partial shading", "soiling" etc. Now,  ordinarily we would be opening a browser searching through google and surfing through a ton of pages. In order to simplify the process of finding related topics, I made a bash script that uses an external API called as core. core is an open source research article search engine and provides an API to search its database for journal articles. Sometimes it might so happen we might also not know the field of application of certain tools like regression which is being used in biological science for study, these types of insight might open new doors of thinking. Hence, decided to create a simple bash script to utilise the data and easily get fields of related topics.

Simplified summary diagram for representing relationships we want to highlight:

TOPIC A   -------------> TOPIC B ------------> TOPIC C 

Simplified Algorithm:

1. Encode the passed parameter to script.

2. Send a curl request to core having query parameter as the url encoded passed string.

3.  echo the results

4. Parse this request to pick keywords

5. for each keyword:

        5.1. Send a curl request with the query parameter having the keyword 

        5.2. echo the results

        5.3. end for

6. end


Figure 1: Showing the written script in vim part1
Figure 2: Showing the written script in vim part2
Figure 3: Showing the written script in vim part3

Results:
             
Figure 4: This is the first level of keywords in results
As can be seen, Partial shading, PV system faults and PV configuration are shown as the first level of results which might be benificial for getting a big picture of the topic but there are many topics which becomes unrelated in this method like for example virtual reality. Still, some of the result chain might be significant for the one who is using it and might spark some creative line of study. Hence thought of sharing it. Another disadvantage is that the api does not allow multiple requests at same time there are some constraints in order to cope up with it used sleep in the scripts to delay the execution of curl request and also print out the scenarios where it is not working. Paid versions of similar apis might work better in this regards.

TECH Stack:
1. Shell scripting
2. jq tool for parsing json
3. CORE api testing using postman

Github Repository Link:
https://github.com/Debamoy/TopicFinder.git

Others can collaborate and provide their valuable inputs to this simple script so that it becomes more useful and gets added with more functionalities.
Sample use case:
./New_topics.sh "PV Module"




Comments

Popular posts from this blog

Female Discrimination

Cheating Detector using shell scripting