Code Monkey home page Code Monkey logo

deno-wikipedia-cli's Introduction

Deno Wikipedia CLI

Deno Wikipedia CLI

Search anything on Wikipedia from your terminal.

Made with Deno Built with TypeScript License Unit test Language grade: JavaScript Current version

Important Notes

This is a experimental project written in Deno version 1.8.0, with std version 0.89.0. Some feature might be unstable at the moment.

Features

  • Get a Wikipedia page
  • Display a random Wikipedia page
  • Search in different languages

Installation

You can install the executable directly from GitHub.

deno install --unstable --allow-net --allow-run --allow-env --allow-read --allow-write -n wiki-cli https://raw.githubusercontent.com/icelam/deno-wikipedia-cli/master/src/mod.ts

Usage

Run wiki-cli in your terminal followed by any of the option flags.

A list of valid Wikipedia language codes is available at https://commons.wikimedia.org/w/api.php?action=sitematrix&smtype=language&smlangprop=code&format=json.

Usage: 
  wiki-cli [options]

Options: 
  -h, --help                            Show help and all available options
  -c, --config                          Modify default behavior of wiki-cli, currently support saving default language to be used in search
  -l, --language [WIKI_LANGUAGE_CODE]   Temporary set the target language to be used in search, accepts a Wikipedia language code
  -q, --query [KEYWORD]                 Pre-define the keyword used in search
  -r, --random                          Display a random Wikipedia page

Preview

Development

You can run this app locally using the following command:

make dev

Tests

You can run test cases using the following command:

make test

Update lock file

You can update the lock file by running the following command:

make lock-deps

Change Log / Release

Change log is available here. You can update the change log by running the following command:

make release

A Github workflow has been set to automatically create release when vX.X.X tag is pushed.

Roadmap

  • Implement logging, might introduce something like log4deno?
  • Use Import Maps for better maniaging dependencies' version
  • Permission detection without using --unstable flag
  • Get terminal size without using --unstable flag
  • Better way to organize test suits, might consider using Rhum?

Others

  • Limit or revoke the permission when it is not needed (e.g. search flow does not need write permission, read permission is not needed after getting config file, net is not needed for config flow). But need to test if installed excutable would be affected on next run.
  • Good reference for test cases

deno-wikipedia-cli's People

Contributors

dependabot[bot] avatar icelam avatar

Watchers

 avatar  avatar

deno-wikipedia-cli's Issues

Issue

Hey , i am unable to run this after trying for 5 hours , would love it if you could send the exe file so its easy for me to open and use. Thanks in advance!

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.