Skip to main content
  1. Projects/

sense-py

·133 words·1 min
Jake Roggenbuck
Author
Jake Roggenbuck
I am currently studying Computer Science

sense-py #

Sense the directories around you, are they git repositories, what language, etc.

Languages #

🐍 sense-py || 🦀 sense-rs || 🐹 gosense || 🇨 sense-c

Why? #

Why so many langs? #

Because I write projects pretty regularly in all of these languages and want a consistent API and available library support for all of them.

API #

Git #

has_git(path: str) -> bool
is_local_git(path: str) -> bool

Language #

get_lang(path: str) -> Lang

Example #

def main():
    language = lang.get_lang("./")
    print(language)

    has_git_dir = git.has_git("./")
    if has_git_dir:
        print("Is git!")
    else:
        print("Is not git.")

    local = git.is_local_git("./")
    if local:
        print("Is local!")
    else:
        print("Is not local.")

Supported langs #

  • Python
  • JavaScript
  • Rust
  • Java
  • Go
  • TypeScript
  • C
  • CPP

Contributing #

If you would like to add features or language support, that would be amazing!