Posts

Librarian Search App - Built Using Python, Streamlit and HiveSQL

avatar of @geekgirl
25
@geekgirl
·
·
0 views
·
4 min read

App Link: https://librariansearch.herokuapp.com/

Librarian Search is a continuation of my first App - Hive Librarian. Search parameters for looking up posts in Hive ended up being a long list. That's why I decide to make Librarian Search a separate App.

If you have used SteemSearch by @markangeltrueman, or SteemLookUp by @laniakea1 and @djordjeparovic in the past, you may find Librarian Search familiar. Because I used the similar model in making the App.

Librarian Search is built using Python, Streamlit and HiveSQL. Here is the link to GitHub repository for those who are interested to see the code:

https://github.com/librarian-hive/librarian-search

I hope all the parameter inputs for search are self explanatory. If not, please feel free to leave a feedback what improvements are needed to make things easier to understand.

Search Parameters

  1. Previously saved search parameters name: Normally it remains as "default" and uses default value. However, once changes are made, new parameters can be saved and can be used to autofill the input fields. Saving new parameters for future reference are at the bottom of the list of inputs.

  2. Number of Posts: Search result will return this number of posts. I put limit of max 500 posts for now. I think it should be more than enough.

  3. Start & End Date: This is a date range for the searched posts. It uses UTC date, because dates are stored in UTC on Hive.

  4. Start & End Time: Similar to date, but for time. Also uses UTC time.

  5. App used to post: This will get posts only published in one of the listed Apps/Tribes. But the default value is ALL.

  6. External Link: After results are returned, there is an option to visit the original post at the selected external link app/tribe. This will not work properly for Apps like DBUZZ, 3SPEAK, DPOLL and VIMM. Because formatting of links is in some of these apps is not same as with hive.blog or other condenser based apps. Hopefully, I will fix that in future. For now when one of these apps is selected, external link will default to hive.blog.

  7. Min & Max Author Rep: Authors' reputation.

  8. Min & Max Characters/Lengths: Amount of characters in the body of the post. I will try to change this into amount of words in the future.

  9. Min & Max Pending Payout: Based on how much posts are currently earning, but not yet paid out. Same as dollar amounts shown on hive.blog. When searching on tribe apps, the pending payout is still based on Hive payouts, and not the tribe tokens.

  10. Max & Min Number of Votes: Amount of votes the posts have received.

  11. Max & Min Number of Comments: Amount of comments the posts have received.

  12. Min & Max Hive Power: Total Hive Power the authors have. This add together both owned HP and received HP delegation.

  13. Include Tags: It will search all posts that have the tags listed. The next Any/All option will determine if all tags should appear in the post or any of of the tags should appear in the posts. Tags must be separated by space.

  14. *Any or All tags should be included?: See number-13. This decided if any or all tags should appear in the searched posts. I may add similar option to some other search parameters too. For now only included tags have this option.

  15. Exclude Tags: Will exclude provided tags. Posts that may have any of the provided tags will be excluded. Tags must be space separated.

  16. Include Authors: The results will only show posts made by the provided list of authors. List of authors must be space separated.

  17. Exclude Authors: Posts made by any of the authors in the list will be excluded from the search results. The list must be space separated.

  18. Include Voters: This will only return posts upvoted by the provided list of accounts.

  19. Exclude Voters: If posts are upvoted by any of the users/accounts in the list, they will be excluded from the search results.

  20. Title Contains: Will only return posts that contain the words provided in the list. All words provided must appear in the post titles. I may need to add Any/All option to this in the future.

  21. Title Does Not Contain: Returned results must not contain words included in the list. This also follows ALL logic, only posts that contain all words listed are excluded. I need to add Any/All option here too.

  22. *Body Contains: Similar to Title Contains but for body, the main content of the post.

  23. Body Does Not Contain: Similar to Title Does Not Contain but for the body, the main content of the post.

Most parameters are left empty by default. Only the parameters needed to achieve the desired results need to be changed. Once all parameters are set, clicking Get Posts will return the list of posts on the main content side of the window.

We may need to reuse the same parameters in the future. To make that easy there is an option to save the parameters. For that we need to give a name for these collection of parameters and click *Save Parameters. Next time we need to use the same configuration, we just need to change Previously saved search parameters name: input at the top from default to the saved name reference. We can have as many different configurations saved separately for various cases.

While App stores all the names given for the collection of parameters, it does not display them. For future reference it may be easier to save the names somewhere locally.

Currently, there is known issue of not all posts being rendered properly from markdown to html. You may see some images not showing up, and instead visible as links. I tried to use various modules to improve that. But there are still issues here. I will try to fix that sometime in the future as well.

Please give Librarian Search a try. See if you find it useful, interesting, or not. Feel free to leave me feedback and suggestions for additions or improvements.

App Link: https://librariansearch.herokuapp.com/

Posted Using LeoFinance Beta