coocan 0.5.1__tar.gz → 0.5.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: coocan
3
- Version: 0.5.1
3
+ Version: 0.5.2.1
4
4
  Summary: Air Spider Framework
5
5
  Author: wauo
6
6
  Author-email: markadc@126.com
@@ -16,10 +16,6 @@ help_info = """
16
16
  """
17
17
 
18
18
 
19
- def show_help_info():
20
- print(help_info)
21
-
22
-
23
19
  def snake_to_pascal(snake_str: str):
24
20
  """小蛇变成大驼峰"""
25
21
  words = snake_str.split('_')
@@ -31,7 +27,7 @@ def snake_to_pascal(snake_str: str):
31
27
  @click.pass_context
32
28
  def main(ctx):
33
29
  if ctx.invoked_subcommand is None:
34
- show_help_info()
30
+ print(help_info)
35
31
  click.echo("cc new -s <spider_file_name>")
36
32
 
37
33
 
@@ -55,13 +51,13 @@ def new(spider: str):
55
51
 
56
52
  py_file = "{}.py".format(spider)
57
53
  if os.path.exists(py_file):
58
- click.echo("File {} already exists".format(py_file))
54
+ click.echo("Failed because file {} already exists".format(py_file))
59
55
  return
60
56
 
61
57
  with open(py_file, 'w') as f:
62
58
  f.write(spider_py_text)
63
59
 
64
- click.echo("Success")
60
+ click.echo("Success create {}".format(py_file))
65
61
 
66
62
  except Exception as e:
67
63
  click.echo(str(e))
@@ -0,0 +1,12 @@
1
+ import os
2
+ import sys
3
+
4
+ msg = sys.argv[1] if len(sys.argv) == 2 else "Auto Submit"
5
+
6
+ cmd1 = "git add ."
7
+ cmd2 = 'git commit -m "{}"'.format(msg)
8
+ cmd3 = "git push"
9
+
10
+ os.system(cmd1)
11
+ os.system(cmd2)
12
+ os.system(cmd3)
@@ -2,7 +2,7 @@ from coocan import Request, Response, MiniSpider
2
2
 
3
3
 
4
4
  class {SpiderClassName}(MiniSpider):
5
- start_urls = ['https://github.com/markadc/coocan']
5
+ start_urls = ["https://github.com/markadc/coocan"]
6
6
  max_requests = 10
7
7
 
8
8
  def middleware(self, request: Request):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: coocan
3
- Version: 0.5.1
3
+ Version: 0.5.2.1
4
4
  Summary: Air Spider Framework
5
5
  Author: wauo
6
6
  Author-email: markadc@126.com
@@ -2,6 +2,7 @@ README.md
2
2
  setup.py
3
3
  coocan/__init__.py
4
4
  coocan/gen.py
5
+ coocan/push_project.py
5
6
  coocan.egg-info/PKG-INFO
6
7
  coocan.egg-info/SOURCES.txt
7
8
  coocan.egg-info/dependency_links.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ coocan = coocan.cmd.cli:main
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as f:
5
5
 
6
6
  setup(
7
7
  name="coocan",
8
- version="0.5.1",
8
+ version="0.5.2.1",
9
9
  author="wauo",
10
10
  author_email="markadc@126.com",
11
11
  description="Air Spider Framework",
@@ -20,7 +20,7 @@ setup(
20
20
  ],
21
21
  entry_points={
22
22
  'console_scripts': [
23
- 'cc=coocan.cmd.cli:main',
23
+ 'coocan=coocan.cmd.cli:main',
24
24
  ],
25
25
  },
26
26
  package_data={
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- cc = coocan.cmd.cli:main
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes