Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions bin/vstarstack

This file was deleted.

6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,17 @@
version = '0.1',
author='Vladislav Tsendrovskii',
description = 'Stacking astrophotos',
scripts = ['bin/vstarstack'],
package_dir = {'': 'src'},
packages=packages,
ext_modules = [projection,
movements,
image_deform,
],
entry_points = {
'console_scripts': [
'vstarstack = vstarstack.entry:main',
],
},
install_requires = [
'numpy',
'astropy',
Expand Down
25 changes: 25 additions & 0 deletions src/vstarstack/entry.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env python3

import sys

import vstarstack.tool.process
import vstarstack.tool.cfg
import vstarstack.tool.usage

def main():
program_project = vstarstack.tool.cfg.get_project()

if vstarstack.tool.cfg.get_param("autocomplete", bool, False):
#with open("complete", "w") as f:
# print(sys.argv, file=f)
program_argv = [item for item in sys.argv[2:] if item[:2] != "--"]
variants = vstarstack.tool.usage.autocompletion(vstarstack.tool.process.commands,
program_argv)
for variant in variants:
print(variant)
else:
program_argv = [item for item in sys.argv[1:] if item[:2] != "--"]
vstarstack.tool.usage.run(program_project,
program_argv,
"",
vstarstack.tool.process.commands)