Skip to content

Commit 2bdb241

Browse files
committed
v2.0.0
1 parent fa92105 commit 2bdb241

File tree

3 files changed

+15
-18
lines changed

3 files changed

+15
-18
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ save_webpage(
113113
)
114114
```
115115

116-
### 1.3.2 `core.setup_config` Method
116+
### 1.3.2 `config.setup_config` Method
117+
118+
>**This function is changed from `core.setup_config`**
117119
118120
You can manually configure every configuration by using a
119121
`core.setup_config` call.
@@ -125,7 +127,7 @@ import pywebcopy
125127
url = 'http://example-site.com/index.html'
126128
download_loc = 'path/to/downloads/'
127129

128-
pywebcopy.core.setup_config(url, download_loc)
130+
pywebcopy.config.setup_config(url, download_loc)
129131

130132
# done!
131133

@@ -142,7 +144,7 @@ pywebcopy.core.setup_config(url, download_loc)
142144
## You can also change any of these by just adding param to
143145
## `setup_config` call
144146

145-
>>> pywebcopy.core.setup_config(url,
147+
>>> pywebcopy.config.setup_config(url,
146148
download_loc,project_name='Your-Project', ...)
147149

148150
## You can also change any config even after
@@ -273,6 +275,10 @@ if you want, you can help in generating suitable `documentation` for these undoc
273275

274276
### [version 2.0.0]
275277

278+
#### [changed]
279+
280+
- `core.setup_config` function is changed to `config.setup_config`.
281+
276282
#### [added]
277283

278284
- added `utils.trace` decorator, which will **print** *function_name*, *args*, *kwargs* and *return value* when debug config key is True.

pywebcopy/__init__.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,3 @@
2929
'__version__', '__author__', '__copyright__', '__license__', '__email__',
3030
'core', 'structures', 'config', 'utils', 'generators', 'exceptions'
3131
]
32-
33-
34-
if __name__ == '__main__':
35-
core.save_webpage(
36-
url='https://google.com/',
37-
mirrors_dir="E:\\Programming\\Projects\\WebsiteCopier\\archive\\\Mirrors_dir",
38-
user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36",
39-
copy_all=False,
40-
over_write=True,
41-
bypass_robots=True,
42-
)

pywebcopy/core.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111

1212
from __future__ import print_function
1313

14-
__all__ = [
15-
'py3', 'py2', 'setup_config', 'get', 'now', 'save_webpage', 'wrap_up'
16-
]
17-
1814
import datetime
1915
import shutil
2016
import sys
@@ -42,6 +38,12 @@
4238
import exceptions
4339

4440

41+
42+
__all__ = [
43+
'py3', 'py2', 'setup_config', 'get', 'now', 'save_webpage', 'wrap_up'
44+
]
45+
46+
4547
def save_webpage(url, mirrors_dir, reset_config=True, **kwargs):
4648
""" Starts crawler, archives and writes logs etc. """
4749

0 commit comments

Comments
 (0)