{"id":19958214,"url":"https://github.com/zimmermanncode/coffeetools","last_synced_at":"2025-06-15T11:07:27.482Z","repository":{"id":144031304,"uuid":"100894321","full_name":"zimmermanncode/coffeetools","owner":"zimmermanncode","description":"useMORE CoffeeScript w/Python","archived":false,"fork":false,"pushed_at":"2017-08-20T23:24:24.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T19:58:03.458Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zimmermanncode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-20T23:21:08.000Z","updated_at":"2017-08-20T23:24:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"67e7c3b8-e8e1-44c1-bb0b-d8b731296451","html_url":"https://github.com/zimmermanncode/coffeetools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zimmermanncode/coffeetools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimmermanncode%2Fcoffeetools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimmermanncode%2Fcoffeetools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimmermanncode%2Fcoffeetools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimmermanncode%2Fcoffeetools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zimmermanncode","download_url":"https://codeload.github.com/zimmermanncode/coffeetools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimmermanncode%2Fcoffeetools/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259964328,"owners_count":22938724,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T01:41:28.975Z","updated_at":"2025-06-15T11:07:27.462Z","avatar_url":"https://github.com/zimmermanncode.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"CoffeeScript from Python\r\n========================\r\n\r\n[https://bitbucket.org/userzimmermann/python-coffeetools]()\r\n\r\n* [`coffee`][1] interface for evaluating and compiling\r\n  [CoffeeScript](http://coffeescript.org/)\r\n\r\n* [`{% coffee ... %}`][2] template tags for [Jinja2](http://jinja.pocoo.org)\r\n\r\n* [`%%coffeescript`][3] magic function for [IPython Notebook](\r\n    http://ipython.org/notebook.html)\r\n\r\n\r\n0. Setup\r\n--------\r\n\r\nSupported Python versions: __2.7__ and __3.3+__\r\n\r\nYou need an installed CoffeeScript compiler.\r\nBy default __coffeetools__ look for a `coffee` executable in your `PATH`,\r\nor `coffee.cmd` on Windows.\r\nYou can find installation instructions and further information at\r\n[http://coffeescript.org/]().\r\nThe easiest way is to use the\r\n[node package manager](https://www.npmjs.com/):\r\n\r\n    npm install coffee-script\r\n\r\nTo install __coffeetools__, just use [pip](http://www.pip-installer.org)\r\nto get the latest [release](https://pypi.python.org/pypi/coffeetools)\r\nfrom [PyPI](https://pypi.python.org):\r\n\r\n    pip install coffeetools\r\n\r\nFor basic usage there are no dependencies on other Python packages.\r\n\r\n__Jinja__ and __IPython__ integration are `[extra]` features.\r\nThey require the following Python packages:\r\n\r\n* `[jinja]`\r\n\r\n    * [`jinjatools \u003e= 0.1.4`](https://pypi.python.org/pypi/jinjatools)\r\n\r\n* `[ipython]`\r\n\r\n    * [`ipython[notebook]`](https://pypi.python.org/pypi/ipython)\r\n\r\nAll extra Python requirements can also be installed with:\r\n\r\n    pip install coffeetools[all]\r\n\r\n\r\n1. Using CoffeeScript from Python\r\n---------------------------------\r\n[1]: #markdown-header-1-using-coffeescript-from-python\r\n\r\n    from coffeetools import coffee\r\n\r\nEvaluate CoffeeScript code and return the script's output:\r\n\r\n    coffee('Some CoffeeScript')\r\n\r\nCompile CoffeeScript to JavaScript:\r\n\r\n    coffee.compile('Some CoffeeScript')\r\n\r\nCompile CoffeeScript to JavaScript without a top-level `function()`:\r\n\r\n    coffee.compile('Some CoffeeScript', bare=True)\r\n\r\nIf you want to specify a custom name\r\nof your CoffeeScript compiler executable or its absolute or relative path,\r\njust create a custom interface instance:\r\n\r\n    from coffeetools import Coffee\r\n\r\n    coffee = Coffee('executable')\r\n    #OR\r\n    coffee = Coffee('/absolute/path/to/executable')\r\n    #OR\r\n    coffee = Coffee('relative/path/to/executable')\r\n\r\n\r\n2. Using CoffeeScript from Jinja2\r\n---------------------------------\r\n[2]: #markdown-header-2-using-coffeescript-from-jinja2\r\n\r\nMore information coming soon...\r\n\r\n\r\n3. Evaluate CoffeeScript in an IPython Notebook\r\n-----------------------------------------------\r\n[3]: #markdown-header-3-evaluate-coffeescript-in-an-ipython-notebook\r\n\r\n    %load_ext coffeescript\r\n\r\nIt is also safe to `%reload_ext coffeescript`\r\n\r\nThis registers the `%%coffeescript` cell magic function,\r\nwhich works like Ipython's `%%javascript` magic,\r\nexcept that it takes CoffeeScript as input.\r\nIt compiles the given code to JavaScript\r\nand uses `IPython.display.display()` with `IPython.display.Javascript`\r\nto run the code directly in the browser window:\r\n\r\n    %%coffeescript\r\n    alert $('#notebook_name').text()","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzimmermanncode%2Fcoffeetools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzimmermanncode%2Fcoffeetools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzimmermanncode%2Fcoffeetools/lists"}