-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
python setup.py sdist bdist_wheel | ||
|
||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from .main import * | ||
|
||
ip = get_ipython() | ||
ip.register_magics(CustomMagics) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from IPython.core import magic_arguments | ||
from IPython.core.magic import line_magic, cell_magic, line_cell_magic, Magics, magics_class | ||
|
||
import winsound | ||
import os | ||
|
||
|
||
@magics_class | ||
class CustomMagics(Magics): | ||
|
||
@line_magic | ||
def alarm(self,line=""): | ||
file = os.path.join(os.path.dirname(__file__),"static/alarm.wav") | ||
print(f"... Launching alarm at {file}") | ||
winsound.PlaySound(file, winsound.SND_FILENAME) | ||
|
||
|
||
ip = get_ipython() | ||
ip.register_magics(CustomMagics) | ||
|
||
|
||
# def load_ipython_extension(ipython): | ||
# ipython.register_magics(CustomMagics) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Setup.py tutorial https://packaging.python.org/tutorials/packaging-projects/ | ||
|
||
import setuptools | ||
|
||
with open("README.md", "r") as fh: | ||
long_description = fh.read() | ||
|
||
setuptools.setup( | ||
name="magics", | ||
version="0.0.1", | ||
author="Theo Alves Da Costa", | ||
author_email="theo.alves.da.costa@gmail.com", | ||
description="A set of custom magics and tools for productivity", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/theolvs/jupyter-magics", | ||
packages=setuptools.find_packages(), | ||
package_data={'magics.static': ['*.wav']}, | ||
include_package_data=False, | ||
install_requires=[ | ||
], | ||
classifiers=( | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
), | ||
) |