Fetch is use to get information about anything on the shell using Wikipedia.

Overview

Fetch

Search wikipedia article on command line


Why this?

Fetch helps you to quickly look about anything and it is all possible with wikipidea webscrapping you can get full wikipedia article on the topic or you can also look at the introduction about the topic.

Yes you can look about anything on your terminal no need of browser it makes your life easy.

You can also search your topics on your command line

Support the project

You can support the project by just using it and contributing if you have any great idea about it.

If you like my work, consider buying me a coffee.

Requirements

  • Python 3.6
  • bs4

Installation

  1. Install setuptools if it isn't already:

     pip install setuptools

Note: For Linux use pip3

  1. Clone this repo:

    git clone https://github.com/yashsinghcodes/fetch.git   
  2. Move into the fetch directory and run the setup.py script:

    cd fetch
    python setup.py install

Note: For Linux use python3 as it required python 3 or higher

Usage

usage: fetch [-h] [-s SEARCH] [-i INFO] [-q QUICK]

optional arguments:
  -h, --help            show this help message and exit
  -s SEARCH, --search SEARCH
                        Search any topic
  -i INFO, --info INFO  Get info on any topic(Use correct name)
  -q QUICK, --quick QUICK
                        Get the summary on any topic
Comments
  • wik Random Article Feature

    wik Random Article Feature

    Any interest in including a random wikipedia article feature in wik? I have a basic version of this working but can clean it up and make a PR if you're interested.

    opened by reyg3 3
  • Replace setup.py with flit-flavored pyproject.toml

    Replace setup.py with flit-flavored pyproject.toml

    The name field in the project section should be a PyPI-ready name, and I don't know what is best (fetch being occupied already), but I set it to yash-fetch.

    opened by AndydeCleyre 3
  • Fetch is a very common unix tool

    Fetch is a very common unix tool

    The fetch command has been a fundamental part of the FreeBSD operating system and other OSs for decades. By naming your project fetch, you risk causing lots of confusion. Perhaps wikifetch or something would be a better choice? I love the idea and want to have a command line wikipedia tool!

    opened by jepace 2
  • adding random Wikipedia article feature

    adding random Wikipedia article feature

    Adding getRand() to info.py. Also updated wik.py with CLI option -x since Wikipedia has alt+shift+x random article shortcut. I didn't update README since I wasn't sure if you wanted to use a different CLI option instead of -x.

    opened by reyg3 1
  • wik is *not* a

    wik is *not* a "command based wiki"

    The README opens with:

    wik is command based wiki.

    A wiki is a website where anyone can edit the pages. Wikipedia is one such website. MediaWiki is software for hosting it. Github provides a simple wiki for every project you host (this project even has one: https://github.com/yashsinghcodes/wik/wiki).

    wik is (as far as I can see) a tool to view Wikipedia pages from your terminal. The README should say this.

    opened by rjmunro 1
  • Add possibility to specify article language

    Add possibility to specify article language

    Either detect language when full url is passed to -S (br.wikipedia.org) or add a language option which changes the language in the hard coded url here: https://github.com/yashsinghcodes/wik/blob/main/wik/info.py#L42

    opened by IljaN 1
  • No such file or directory: 'fetch/__version__.py'

    No such file or directory: 'fetch/__version__.py'

    Traceback (most recent call last): File "setup.py", line 12, in <module> exec(open("fetch/__version__.py").read()) FileNotFoundError: [Errno 2] No such file or directory: 'fetch/__version__.py'

    I had to create fetch/__version__.py and put my current python version in it. For example

    __version__ = "3.8.10"

    This info should be added to the README.

    opened by ringl-student 1
  • Unable to use a pager

    Unable to use a pager

    It's not possible to pipe output of fetch to a file or a pager

    fetch -i mallard | less -R

    Traceback (most recent call last):
      File "/usr/local/bin/fetch", line 11, in <module>
        load_entry_point('yashsinghcodes==0.1', 'console_scripts', 'fetch')()
      File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 476, in load_entry_point
        return get_distribution(dist).load_entry_point(group, name)
      File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2700, in load_entry_point
        return ep.load()
      File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2318, in load
        return self.resolve()
      File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in resolve
        module = __import__(self.module_name, fromlist=['__name__'], level=0)
      File "<frozen importlib._bootstrap>", line 971, in _find_and_load
      File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
      File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
      File "/usr/local/lib/python3.6/site-packages/yashsinghcodes-0.1-py3.6.egg/fetch/__init__.py", line 4, in <module>
      File "<frozen importlib._bootstrap>", line 971, in _find_and_load
      File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
      File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
      File "/usr/local/lib/python3.6/site-packages/yashsinghcodes-0.1-py3.6.egg/fetch/fetch.py", line 3, in <module>
      File "<frozen importlib._bootstrap>", line 971, in _find_and_load
      File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
      File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
      File "/usr/local/lib/python3.6/site-packages/yashsinghcodes-0.1-py3.6.egg/fetch/info.py", line 18, in <module>
    OSError: [Errno 25] Inappropriate ioctl for device
    

    In fetch/info.py I changed

    width,height = os.get_terminal_size()

    to

    try:
        width,height = os.get_terminal_size()
    except OSError:
        width = 120
        height = 80
    

    to get it to work

    opened by pmopmo 1
  • Config file for pyup.io

    Config file for pyup.io

    Hi there and thanks for using pyup.io!

    Since you are using a non-default config I've created one for you.

    There are a lot of things you can configure on top of that, so make sure to check out the docs to see what I can do for you.

    opened by pyup-bot 0
  • Initial Update

    Initial Update

    The bot created this issue to inform you that pyup.io has been set up on this repo. Once you have closed it, the bot will open pull requests for updates as soon as they are available.

    opened by pyup-bot 0
  • Feature Request: Work with offline ZIM files/kiwix

    Feature Request: Work with offline ZIM files/kiwix

    It would be really nice to be able to use wik in conjunction with local offline wikipedia dumps. I'm not a programmer but I'm a big command line enthusiast and I tried modifying the wiki URL in info.py to the local one I'm running. It will display an article when giving the exact name but doesn't return any results when searching. I'm clearly out of my element here :) but it doesn't appear to be too far away from being able to do it. Thoughts?

    opened by klundry 3
Releases(2021.06)
Owner
Yash Singh
Yash Singh
Library and command-line utility for rendering projects templates.

A library for rendering project templates. Works with local paths and git URLs. Your project can include any file and Copier can dynamically replace v

808 Jan 04, 2023
gcptree - Like the unix tree command but for GCP Org Heirarchy

gcptree Like the unix tree command but for GCP Org Heirarchy. For a note on coloring, the org node is green, folders and blue, and projects that are n

Ryan Canty 25 Sep 06, 2022
A Python3 rewrite of my original PwnedConsole project from almost a decade ago

PwnedConsoleX A CLI shell for performing queries against the HaveIBeenPwned? API to gather breach information for user-supplied email addresses. | wri

1 Jul 23, 2022
Official AIdea command line tool

AIdea CLI Official AIdea command line tool for https://aidea-web.tw. Installation Make sure you have installed both Python 3 and pip package manager.

AIdea 5 Dec 15, 2021
Pastekan adalah website paste kode / teks sederhana

Pastekan pastekan adalah website paste kode / teks sederhana. install pip install pastekan penggunaan pastekan myfile.txt atau echo "hi" | pastekan

Sekai Kode 1 Dec 24, 2021
Tidier - a simple command line tool that helps you make your files tidy up

Tidier - a simple command line tool that helps you make your files tidy up

AmirMohammad Hosseini Nasab 8 Aug 16, 2022
Declarative CLIs with argparse and dataclasses

argparse_dataclass Declarative CLIs with argparse and dataclasses. Features Features marked with a ✓ are currently implemented; features marked with a

Mike DePalatis 29 Dec 06, 2022
Yet another bash/zsh prompt script

Here we have yet another script for Git-aware customization of the command prompt in Bash and zsh. Unlike all the other scripts, I wrote this one, so

John T. Wodder II 5 Oct 13, 2021
CryptoCo-py is a Python CLI application that uses CoinGecko API to allow the user to query cryptocurrency information by typing simple commands.

CryptoCo-py is a Python CLI application that uses CoinGecko API to allow the user to query cryptocurrency information by typing simple com

1 Jan 10, 2022
Customisable pharmacokinetic model accessible via bash CLI allowing for variable dose calculations as well as intravenous and subcutaneous administration calculations

Pharmacokinetic Modelling Group Project A PharmacoKinetic (PK) modelling function for analysis of injected solute dynamics over time, developed by Gro

1 Oct 24, 2021
A CLI tool for using GLIDE to generate images from text.

Text-Glided-Diffusion Installation First clone this repository: git clone https://github.com/afiaka87/text-glided-diffusion.git cd text-glided-diffusi

Clay Mullis 68 Dec 30, 2022
A Terminal UI for Discord

ToastCord ToastCord is a Discord Terminal UI. At the moment you can only look at Direct messages. TODO: - Add support for guilds - Message sending sup

toast 82 Dec 18, 2022
Python CLI script to solve wordles.

Wordle Solver Python CLI script to solve wordles. You need at least python 3.8 installed to run this. No dependencies. Sample Usage Let's say the word

Rachel Brindle 1 Jan 16, 2022
Convert markdown to HTML using the GitHub API and some additional tweaks with Python.

Convert markdown to HTML using the GitHub API and some additional tweaks with Python. Comes with full formula support and image compression.

phseiff 70 Dec 23, 2022
WebApp Maker make web apps (Duh). It is open source and make with python and shell.

WebApp Maker make web apps (Duh). It is open source and make with python and shell. This app can take any website and turn it into an app. I highly recommend turning these few websites into webapps:

2 Jan 09, 2022
asciinema - Terminal session recorder 📹

asciinema - Terminal session recorder 📹

asciinema 11.1k Dec 27, 2022
Spongebob-cli - Watch classic spongebob from the terminal

spongebob-cli Watch classic spongebob from the terminal! Thanks to everyone that

523 Jan 02, 2023
Get latest astronomy job and rumor news in your command line

astrojobs Tired of checking the AAS job register and astro rumor mill for job news? Get the latest updates in the command line! astrojobs automaticall

Philip Mocz 19 Jul 20, 2022
Plumbum: Shell Combinators

Plumbum: Shell Combinators Ever wished the compactness of shell scripts be put into a real programming language? Say hello to Plumbum Shell Combinator

Tomer Filiba 2.5k Dec 28, 2022
A Reverse Shell Python Packages

A Reverse Shell Python Packages

1 Nov 03, 2021