functino


Namefunctino JSON
Version 0.0.3 PyPI version JSON
download
home_page
SummarySimple graphical code editor and runner for throwaway code
upload_time2023-07-23 01:49:34
maintainer
docs_urlNone
author
requires_python>=3.11
licenseBSD-2-Clause license
keywords text editor coding software development gui qt scintilla c c++ javascript nodejs python ruby rust
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Functino

Functino is a simple graphical code editor and runner for throwaway code. Its functionality is somewhere in between a [REPL][repl-definition] and a fully-featured text editor. With Functino, you simply type code in the editor panel, press the run button, and the output of the code is shown in the output panel. Several languages are supported with no configuration needed to use them. If you've ever found yourself wanting to mess around with a block of code and thought "a REPL would be a bit unwieldy but my normal development environment would be overkill for this," then Functino might be for you!

<p align="center">
    <img src="https://raw.githubusercontent.com/davidscholberg/functino/main/screenshots/dark_theme.png" alt="Dark theme">
    <img src="https://raw.githubusercontent.com/davidscholberg/functino/main/screenshots/light_theme.png" alt="Light theme">
</p>

### Features

* Simple interface.
* Cross-platform.
* Built-in support for several languages:
    * C and C++ (via gcc)
    * NodeJS
    * Python
    * Ruby
    * Rust
* No configuration needed to use existing compilers/interpreters installed on your system.
* Ability to configure support for languages and toolchains not already built in.
* Syntax highlighting.
* Light and dark theme that adjusts based on your system theme.

### Installation

There are two options for installation; you can grab a pre-built binary from the [github releases page][releases-site] (currently for Windows and Linux only), or you can install from [PyPI][pypi-site] (all platforms):

1. Make sure [python is installed][python-install].

2. Install Functino:

```bash
pip install functino
```

### Configuring Support for New Languages/Toolchains

If you would like to use a language or toolchain that Functino currently doesn't support, you can configure Functino to use it! The following is a [TOML][toml-site] file that tells Functino how to execute Python code, with comments explaining each field:

```toml
# This is the display name for this profile. Display names must be unique across all
# profiles.
name = "Python"

# This is the language ID for this profile. Language IDs must match with a match-case
# key in src/functino/gui/language.py in order for the editor to provide syntax
# highlighting.
language_id = "python"

# This is the file extension that source files of this language use. Some compilers/
# interpreters rely on the file extention to be correct.
source_file_extension = "py"

# This option tells Functino whether or not this profile requires a separate compilation
# step. The value of this option will have an influence on the proper format of the
# command option below.
compile = false

# The section below tell Functino what command to run to handle the the source file. If
# compile is false, this will be an interpret command. If compile is true, this will be
# a compilation command, and the resulting program produced by the compilation will be
# run separately.
#
# All profile commands must have one option that is exactly equal to
# "{source_file_path}". Functino will replace this with the internally-used temporary
# file that contains the source code to run. File extensions or prefixes must not be
# added to this option.
#
# Profile commands for compiled languages must additionally have one option that is
# exactly equal to "{executable_path}". Functino will replace this with an
# internally-used temporary file that is meant to be used by the compiler to put the
# compiled program into. File extensions or prefixes must not be added to this option.
# See src/functino/resources/language_profiles/rust.toml for an example of how to use
# this option.
[command]

# The default command is the command that will be used if there's no specific command
# for the current operating system we're running in.
default = ["python", "{source_file_path}"]

# If you need to specify a different command for a particular operating system, then the
# key for the command must match up with one of the possible outputs of
# https://docs.python.org/3/library/platform.html#platform.system.
#
# The following is an example of specifying a windows-specific command:
Windows = ["python", "--windows-specific-flag", "{source_file_path}"]
```

You can place your custom language profiles in one of the following directories (based on your operating system), and Functino will automatically load them:

* Linux: `~/.config/functinodev/functino`
* Mac: `~/Library/Preferences/functinodev/functino`
* Windows: `C:/Users/<USER>/AppData/Local/functinodev/functino`

### Known Issues

* Currently there is no syntax highlighting support for Rust.

### Development Setup

1. Make sure [python is installed][python-install].

2. Get project source.

```bash
git clone https://github.com/davidscholberg/functino.git
cd functino
```

3. Create and enter [python virtual environment][python-venv].

```bash
python -m venv .venv
source .venv/bin/activate
```

4. Build and install the project package as an [editable install][editable-install] with dev dependencies.

```bash
pip install --editable .[dev]
```

5. Install the commit hooks to perform formatting and linting on commit (`pre-commit` is installed locally as a dev dependency).

```bash
pre-commit install
```

### Credits

Functino is written in [Python][python-site] and uses [PyQt6][pyqt6-site] for all GUI functionality. Text editing and syntax highlighting functionality is provided by [QScintilla][qscintilla-site], and the syntax highlighting color themes are provided by [Notepad++][notepadpp-site] theme files.

[editable-install]: https://setuptools.pypa.io/en/latest/userguide/development_mode.html
[notepadpp-site]: https://notepad-plus-plus.org/
[pypi-site]: https://pypi.org/
[pyqt6-site]: https://riverbankcomputing.com/software/pyqt
[python-install]: https://wiki.python.org/moin/BeginnersGuide/Download
[python-site]: https://www.python.org/
[python-venv]: https://docs.python.org/3/library/venv.html
[qscintilla-site]: https://riverbankcomputing.com/software/qscintilla/intro
[releases-site]: https://github.com/davidscholberg/functino/releases
[repl-definition]: https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop
[toml-site]: https://toml.io/en/

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "functino",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "",
    "keywords": "text editor,coding,software development,gui,qt,scintilla,c,c++,javascript,nodejs,python,ruby,rust",
    "author": "",
    "author_email": "David Scholberg <recombinant.vector@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/42/a4/1774ca866c25d8d10e9ce1db1facf68d558ae10f18988829c6cf1ef65dc3/functino-0.0.3.tar.gz",
    "platform": null,
    "description": "# Functino\r\n\r\nFunctino is a simple graphical code editor and runner for throwaway code. Its functionality is somewhere in between a [REPL][repl-definition] and a fully-featured text editor. With Functino, you simply type code in the editor panel, press the run button, and the output of the code is shown in the output panel. Several languages are supported with no configuration needed to use them. If you've ever found yourself wanting to mess around with a block of code and thought \"a REPL would be a bit unwieldy but my normal development environment would be overkill for this,\" then Functino might be for you!\r\n\r\n<p align=\"center\">\r\n    <img src=\"https://raw.githubusercontent.com/davidscholberg/functino/main/screenshots/dark_theme.png\" alt=\"Dark theme\">\r\n    <img src=\"https://raw.githubusercontent.com/davidscholberg/functino/main/screenshots/light_theme.png\" alt=\"Light theme\">\r\n</p>\r\n\r\n### Features\r\n\r\n* Simple interface.\r\n* Cross-platform.\r\n* Built-in support for several languages:\r\n    * C and C++ (via gcc)\r\n    * NodeJS\r\n    * Python\r\n    * Ruby\r\n    * Rust\r\n* No configuration needed to use existing compilers/interpreters installed on your system.\r\n* Ability to configure support for languages and toolchains not already built in.\r\n* Syntax highlighting.\r\n* Light and dark theme that adjusts based on your system theme.\r\n\r\n### Installation\r\n\r\nThere are two options for installation; you can grab a pre-built binary from the [github releases page][releases-site] (currently for Windows and Linux only), or you can install from [PyPI][pypi-site] (all platforms):\r\n\r\n1. Make sure [python is installed][python-install].\r\n\r\n2. Install Functino:\r\n\r\n```bash\r\npip install functino\r\n```\r\n\r\n### Configuring Support for New Languages/Toolchains\r\n\r\nIf you would like to use a language or toolchain that Functino currently doesn't support, you can configure Functino to use it! The following is a [TOML][toml-site] file that tells Functino how to execute Python code, with comments explaining each field:\r\n\r\n```toml\r\n# This is the display name for this profile. Display names must be unique across all\r\n# profiles.\r\nname = \"Python\"\r\n\r\n# This is the language ID for this profile. Language IDs must match with a match-case\r\n# key in src/functino/gui/language.py in order for the editor to provide syntax\r\n# highlighting.\r\nlanguage_id = \"python\"\r\n\r\n# This is the file extension that source files of this language use. Some compilers/\r\n# interpreters rely on the file extention to be correct.\r\nsource_file_extension = \"py\"\r\n\r\n# This option tells Functino whether or not this profile requires a separate compilation\r\n# step. The value of this option will have an influence on the proper format of the\r\n# command option below.\r\ncompile = false\r\n\r\n# The section below tell Functino what command to run to handle the the source file. If\r\n# compile is false, this will be an interpret command. If compile is true, this will be\r\n# a compilation command, and the resulting program produced by the compilation will be\r\n# run separately.\r\n#\r\n# All profile commands must have one option that is exactly equal to\r\n# \"{source_file_path}\". Functino will replace this with the internally-used temporary\r\n# file that contains the source code to run. File extensions or prefixes must not be\r\n# added to this option.\r\n#\r\n# Profile commands for compiled languages must additionally have one option that is\r\n# exactly equal to \"{executable_path}\". Functino will replace this with an\r\n# internally-used temporary file that is meant to be used by the compiler to put the\r\n# compiled program into. File extensions or prefixes must not be added to this option.\r\n# See src/functino/resources/language_profiles/rust.toml for an example of how to use\r\n# this option.\r\n[command]\r\n\r\n# The default command is the command that will be used if there's no specific command\r\n# for the current operating system we're running in.\r\ndefault = [\"python\", \"{source_file_path}\"]\r\n\r\n# If you need to specify a different command for a particular operating system, then the\r\n# key for the command must match up with one of the possible outputs of\r\n# https://docs.python.org/3/library/platform.html#platform.system.\r\n#\r\n# The following is an example of specifying a windows-specific command:\r\nWindows = [\"python\", \"--windows-specific-flag\", \"{source_file_path}\"]\r\n```\r\n\r\nYou can place your custom language profiles in one of the following directories (based on your operating system), and Functino will automatically load them:\r\n\r\n* Linux: `~/.config/functinodev/functino`\r\n* Mac: `~/Library/Preferences/functinodev/functino`\r\n* Windows: `C:/Users/<USER>/AppData/Local/functinodev/functino`\r\n\r\n### Known Issues\r\n\r\n* Currently there is no syntax highlighting support for Rust.\r\n\r\n### Development Setup\r\n\r\n1. Make sure [python is installed][python-install].\r\n\r\n2. Get project source.\r\n\r\n```bash\r\ngit clone https://github.com/davidscholberg/functino.git\r\ncd functino\r\n```\r\n\r\n3. Create and enter [python virtual environment][python-venv].\r\n\r\n```bash\r\npython -m venv .venv\r\nsource .venv/bin/activate\r\n```\r\n\r\n4. Build and install the project package as an [editable install][editable-install] with dev dependencies.\r\n\r\n```bash\r\npip install --editable .[dev]\r\n```\r\n\r\n5. Install the commit hooks to perform formatting and linting on commit (`pre-commit` is installed locally as a dev dependency).\r\n\r\n```bash\r\npre-commit install\r\n```\r\n\r\n### Credits\r\n\r\nFunctino is written in [Python][python-site] and uses [PyQt6][pyqt6-site] for all GUI functionality. Text editing and syntax highlighting functionality is provided by [QScintilla][qscintilla-site], and the syntax highlighting color themes are provided by [Notepad++][notepadpp-site] theme files.\r\n\r\n[editable-install]: https://setuptools.pypa.io/en/latest/userguide/development_mode.html\r\n[notepadpp-site]: https://notepad-plus-plus.org/\r\n[pypi-site]: https://pypi.org/\r\n[pyqt6-site]: https://riverbankcomputing.com/software/pyqt\r\n[python-install]: https://wiki.python.org/moin/BeginnersGuide/Download\r\n[python-site]: https://www.python.org/\r\n[python-venv]: https://docs.python.org/3/library/venv.html\r\n[qscintilla-site]: https://riverbankcomputing.com/software/qscintilla/intro\r\n[releases-site]: https://github.com/davidscholberg/functino/releases\r\n[repl-definition]: https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop\r\n[toml-site]: https://toml.io/en/\r\n",
    "bugtrack_url": null,
    "license": "BSD-2-Clause license",
    "summary": "Simple graphical code editor and runner for throwaway code",
    "version": "0.0.3",
    "project_urls": {
        "Source Code": "https://github.com/davidscholberg/functino"
    },
    "split_keywords": [
        "text editor",
        "coding",
        "software development",
        "gui",
        "qt",
        "scintilla",
        "c",
        "c++",
        "javascript",
        "nodejs",
        "python",
        "ruby",
        "rust"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "361c467dec631238963b1d7184a88f3917680a6d8789e4dacf2a26e2f535a010",
                "md5": "0850237943041beb961a833d42cb45d6",
                "sha256": "40bdcd166b3f10f94f32b3351a06d85f52a1962557803c4fd95a5f58b7e42833"
            },
            "downloads": -1,
            "filename": "functino-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0850237943041beb961a833d42cb45d6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 61654,
            "upload_time": "2023-07-23T01:49:33",
            "upload_time_iso_8601": "2023-07-23T01:49:33.066145Z",
            "url": "https://files.pythonhosted.org/packages/36/1c/467dec631238963b1d7184a88f3917680a6d8789e4dacf2a26e2f535a010/functino-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "42a41774ca866c25d8d10e9ce1db1facf68d558ae10f18988829c6cf1ef65dc3",
                "md5": "9e3a45229800ba6df7b587ae882c4255",
                "sha256": "ed18faf774b5e89d3c4e0b914a9bf52ce760c5c06228afcb80564e2d6a37528a"
            },
            "downloads": -1,
            "filename": "functino-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "9e3a45229800ba6df7b587ae882c4255",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 55885,
            "upload_time": "2023-07-23T01:49:34",
            "upload_time_iso_8601": "2023-07-23T01:49:34.693123Z",
            "url": "https://files.pythonhosted.org/packages/42/a4/1774ca866c25d8d10e9ce1db1facf68d558ae10f18988829c6cf1ef65dc3/functino-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-23 01:49:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "davidscholberg",
    "github_project": "functino",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "functino"
}
        
Elapsed time: 0.15056s