Giter Club home page Giter Club logo

xonshbot's Introduction

xonsh

xonsh is a Python-powered shell. Full-featured and cross-platform. The language is a superset of Python 3.6+ with additional shell primitives. Xonsh word was made from conch (๐Ÿš, @) and indicates belonging to the command shells world.

Xonsh is the Shell Xonsh is Python
cd $HOME

id $(whoami)

cat /etc/passwd | grep root > ~/root.txt

$PROMPT = '@ '
2 + 2

var = "hello".upper()

import json; json.loads('{"a":1}')

[i for i in range(0,10)]
Xonsh is the Shell in Python Xonsh is Python in the Shell
len($(curl -L https://xon.sh))

$PATH.append('/tmp')

p'/etc/passwd'.read_text().find('root')

xontrib load dalias
id = $(@json docker ps --format json)['ID']
name = 'foo' + 'bar'.upper()
echo @(name) > /tmp/@(name)

ls @(input('file: '))
touch @([f"file{i}" for i in range(0,10)])

aliases['e'] = 'echo @(2+2)'
aliases['a'] = lambda args: print(args)

If you like xonsh, โญ the repo, write a tweet and stay tuned by watching releases.

Join to xonsh.zulipchat.com GitHub Actions codecov.io repology.org

First steps

Install xonsh from pip:

python -m pip install 'xonsh[full]'

And visit https://xon.sh for more information:

Extensions

Xonsh has an extension/plugin system. We call these additions xontribs.

Projects that use xonsh or compatible

  • conda and mamba: Modern package managers.
  • Starship: Cross-shell prompt.
  • zoxide: A smarter cd command.
  • gitsome: Supercharged Git/shell autocompleter with GitHub integration.
  • xxh: Using xonsh wherever you go through the SSH.
  • any-nix-shell: xonsh support for the nix run and nix-shell environments of the Nix package manager.
  • lix: A modern, delicious implementation of the Nix package manager.
  • x-cmd: x-cmd is a vast and interesting collection of tools guided by the Unix philosophy.
  • rever: Cross-platform software release tool.
  • Regro autotick bot: Regro Conda-Forge autoticker.

Jupyter-based interactive notebooks via xontrib-jupyter:

  • Jupyter and JupyterLab: Interactive notebook platform.
  • euporie: Terminal based interactive computing environment.
  • Jupytext: Clear and meaningful diffs when doing Jupyter notebooks version control.

The xonsh shell community

The xonsh shell is developed by a community of volunteers. There are a few ways to help out:

We welcome new contributors!

Credits

  • Thanks to Zulip for supporting the xonsh community!

xonshbot's People

Contributors

adqm avatar astraluma avatar gforsyth avatar scopatz avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xonshbot's Issues

CPU Usage

In the current setup, the bot really wants to use up all those spare CPU cycles. I'm not quite sure where exactly it is spinning, but if it's in waiting for input from the servers, smart use of select is one potential solution.

You guys are aware of https://irc.gitter.im/ ?

Right ?


Snippet for the lazy:

"I'm connected from my VT100" - Chuck Norris
what is Gitter?

man irc.gitter.im (this service is still very much beta)

  1. Click here to login and get your token
  2. Connect to irc.gitter.im with your IRC client using SSL(port 6667 or 6697)
  3. Provide the the token we give you (login to see token) as the Server Password
  4. /NICK your github username
  5. Profit

100% compatible with Lynx. Seriously.

xonshbot breaks if it loses the gitter stream

Just recently, the bot in #xonsh stopped synchronizing in one direction (Gitter->IRC), presumably because it lost its connection to the Gitter stream.

From the Gitter API docs:

The Gitter servers will hold the connection open indefinitely (barring a server-side error, excessive client-side lag, network hiccups or routine server maintenance).

So there are some situations in which the connection should be interrupted. And the bot should be robust against those kinds of little glitches.

Accept private IRC/Gitter messages with commands

The bot currently only listens on the actual channels for messages. It should probably also listen for PM's. When it receives a PM, it should not relay it to the other places, but it should check it for commands and respond privately if a command matches.

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.