Git Product home page Git Product logo

yeahyeah's Introduction

yeahyeah

Documentation Status Updates

CLI launch manager. Dispense with the 5 manual steps for everything, just say yeah yeah I know just do it come on move

What

With yeahyeah you can, for example, do this in a console window:

$ jj virus
> launches www.virustotal.com

$ jj search a website
> searches for 'a website' on duckduckgo

$ jj admin url_pattern add 'wikipedia' https://wikipedia.org
> adds an item 'wikipedia' that launches the given url

$ jj w<tab>
website   wikipedia
$ jj wi<tab>
$ jj wikipedia
> tab completion on all items

$ jj my_folder          # launches a set path in new terminal window

$ jj log add writing    # adds a log message 'writing' to clockifiy

Features

  • Launch commands from console/terminal
  • Command line interface based on python Click
  • Autocomplete for bash and zsh
  • Plugin architecture. Write your own
  • Wildcard commands like 'Open firefox search on search term X'

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

yeahyeah's People

Contributors

sjoerdk avatar pyup-bot avatar

Watchers

James Cloos avatar

Forkers

jiaming1999

yeahyeah's Issues

Move plugins to separate package, create plugin structure

Yeahyeah is meant work with plugins. Its internal structure is quite modular. But the final step, actually being able to add and remove plugins without editing source code, has not been taken.

Do this. Probably won't be that much work. Probably use django system of a settings.py file as an example.

Clockify plugin stop timer at start time of next item

Given the following actions at the given times:
(10:00) * jj log add 'doing thing A'
(11:00) * jj log add 'doing thing B' -t 10:30

I would expect 'doing thing A' to end at 10:30.
But this is not the case. Instead 'doing thing A' will stop at 11:00, and overlap with 'doing thing B'.
Change this

url_pattern without `capture_all_keywords` yields error

  • yeahyeah version: 0.4.5
  • Python version: 3.9.9
  • Operating System: ubuntu 22.04

Description

With the following url pattern in url_patterns.yaml:

notes:  
  pattern: https://github.com/sjoerdk/notes/issues

The following happens when using yeahyeah:

$ jj notes
https://github.com/sjoerdk/notes/issues
$ kf.kio.gui: "Could not find the program '/opt/firefox/firefox-bin'"

Adding capture_all_keywords=true fixes the error.

Why? I think this is an error. If not, the error should at least be understandable

Pytest failure

  • yeahyeah version:0.4.4
  • Python version:3.8
  • Operating System:MacOS

Description

I am trying to pass tests given in the project. And encounter a test file failed.

What I Did

Run command:

pytest

Result:

__________________________________________ test_persisting __________________________________________

tmpdir = local('/private/var/folders/gw/ylsybrkd7495cv7h7tqk7jg80000gn/T/pytest-of-joelzhang/pytest-0/test_persisting0')

    def test_persisting(tmpdir):
        """Test saving and reading url path_items from disk"""
    
        test = UrlPattern(
            name="test",
            pattern="https://host{pattern1}/something{pattern2}.php",
            help_text="Test pattern",
        )
        test2 = UrlPattern(
            name="test2", pattern="https://athing.com", help_text="Another test pattern"
        )
        test3 = UrlPattern(
            name="test3",
            pattern="https://uniqcode_Привет.com",
            help_text="Another test pattern",
        )
        test4 = UrlPattern(name="test4", pattern="https://no_help")
        test5 = WildCardUrlPattern(name="test5", pattern="https://search{query}")
    
        patterns = URLPatternList(items=[test, test2, test3, test4, test5])
    
        test_file = tmpdir / "urlpatterns.yaml"
        with open(test_file, "w") as f:
            patterns.save(f)
    
        with open(test_file, "r") as f:
            from_file = URLPatternList.load(f)
    
>       assert len(patterns) == len(from_file)
E       assert 5 == 9
E        +  where 5 = len([<yeahyeah_plugins.url_pattern_plugin.core.UrlPattern object at 0x7fa18cfe0a90>, <yeahyeah_plugins.url_pattern_plugin....tern object at 0x7fa18cfe0100>, <yeahyeah_plugins.url_pattern_plugin.core.WildCardUrlPattern object at 0x7fa18cfe0460>])
E        +  and   9 = len([<yeahyeah_plugins.url_pattern_plugin.core.WildCardUrlPattern object at 0x7fa18cbd46a0>, <yeahyeah_plugins.url_pattern...tern object at 0x7fa18cff1fa0>, <yeahyeah_plugins.url_pattern_plugin.core.WildCardUrlPattern object at 0x7fa18cff14c0>])

yeahyeah_plugins/url_pattern_plugin/tests/test_url_pattern.py:75: AssertionError
________________________________________ test_load_from_file ________________________________________

    def test_load_from_file():
        """Test load from file directly"""
    
        file = RESOURCE_PATH / "urlpatterns_example.yaml"
    
        with open(file, "r") as f:
            from_file = URLPatternList.load(f)
    
>       assert from_file[2].pattern == "https://uniqcodeПривет.com"
E       AssertionError: assert 'https://athing.com' == 'https://uniqcodeПривет.com'
E         - https://uniqcodeПривет.com
E         + https://athing.com

yeahyeah_plugins/url_pattern_plugin/tests/test_url_pattern.py:89: AssertionError
______________________________________ test_url_pattern_plugin ______________________________________

tmpdir = local('/private/var/folders/gw/ylsybrkd7495cv7h7tqk7jg80000gn/T/pytest-of-joelzhang/pytest-0/test_url_pattern_plugin0')
disable_click_echo = None

    def test_url_pattern_plugin(tmpdir, disable_click_echo):
        config_file = Path(tmpdir / "test_url_pattern_config.yaml")
        assert not config_file.exists()
        # file should be created if not exists
        plugin = UrlPatternsPlugin.__from_file_path__(config_file_path=config_file)
        assert config_file.exists()
        items = plugin.get_commands()
    
>       assert len(items) == 3
E       assert 5 == 3
E        +  where 5 = len([<click.core.Command object at 0x7fa18d010280>, <click.core.Command object at 0x7fa18d010100>, <click.core.Command object at 0x7fa18d010af0>, <click.core.Command object at 0x7fa18d010c40>, <click.core.Command object at 0x7fa18d010a60>])

yeahyeah_plugins/url_pattern_plugin/tests/test_url_pattern.py:106: AssertionError

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.