|
11 | 11 |  |
12 | 12 |
|
13 | 13 | - [Introduction](#introduction) |
| 14 | +- [Pre-requisites](#pre-requisites) |
14 | 15 | - [Installation and Downloads](#installation-and-downloads) |
15 | | -- [Usage](#usage) |
| 16 | +- [Commands](#commands) |
| 17 | +- [Docs](#docs) |
| 18 | +- [Bug Tracker and Support](#bug-tracker-and-support) |
16 | 19 | - [License and Copyright](#license-and-copyright) |
17 | 20 | - [Author and Thanks](#author-and-thanks) |
18 | 21 |
|
| 22 | + |
19 | 23 | ## Introduction |
20 | 24 |
|
21 | 25 | Weblinks, It get all links from a given website and we can apply filters on top of it to get desired results, when you are good you can start downloading them with `-d` flag. |
22 | 26 |
|
23 | | -TODO: many changes, add-ons need to update in full.! |
24 | | - |
25 | | -In the library we are supporting plain webpages, authentication based webpages. |
26 | | - |
27 | | -## Pre-req |
| 27 | +In the library we are supporting plain webpages, authentication based webpages, proxy, authentication on proxy, etc. |
28 | 28 |
|
29 | | -A system need to have curl and python |
30 | | - |
31 | | -## Docs |
| 29 | +We also support storing the config in either local/global configuration, for best practise we suggest not to store your password, you get a prompt on runtime wher you can provide it. |
32 | 30 |
|
33 | | -How to use weblinks? |
| 31 | +## Pre-requisites |
34 | 32 |
|
35 | | -```python |
| 33 | +A system need to support **curl commands** and **python3** |
36 | 34 |
|
37 | | -``` |
38 | 35 | ## Installation and Downloads |
39 | 36 |
|
40 | | -`pip install weblinks` |
| 37 | +```shell |
| 38 | +pip install weblinks |
| 39 | +``` |
41 | 40 |
|
42 | | -## Usage |
| 41 | +## Commands |
43 | 42 |
|
| 43 | +```shell |
| 44 | +weblinks --help |
44 | 45 | ``` |
45 | | -usage: weblinks [-h] -w WEB [-u USERNAME] [-p PASSWORD] [-e EXT] [-d] [-v] |
46 | | - substring |
47 | | -
|
48 | | -positional arguments: |
49 | | - substring the sub-string in the links |
| 46 | +``` |
| 47 | +usage: weblinks [-h] [-w WEB] [-s SUBSTRING] [-e EXT] [-d] [-u USERNAME] |
| 48 | + [-p PASSWORD] [-g] [-l] [-v] [--proxy PROXY] |
| 49 | + [--proxy-username PROXY_USERNAME] |
| 50 | + [--proxy-password PROXY_PASSWORD] [--version] |
50 | 51 |
|
51 | 52 | optional arguments: |
52 | 53 | -h, --help show this help message and exit |
53 | 54 | -w WEB, --web WEB the website |
| 55 | + -s SUBSTRING, --substring SUBSTRING |
| 56 | + the sub-string in the links |
| 57 | + -e EXT, --ext EXT file extention |
| 58 | + -d, --download download links |
54 | 59 | -u USERNAME, --username USERNAME |
55 | 60 | web login username |
56 | 61 | -p PASSWORD, --password PASSWORD |
57 | 62 | web login password |
58 | | - -e EXT, --ext EXT file extention |
59 | | - -d, --download download links |
| 63 | + -g, --global global configuration |
| 64 | + -l, --local local configuration |
60 | 65 | -v, --verbosity |
| 66 | + --proxy PROXY proxy address |
| 67 | + --proxy-username PROXY_USERNAME |
| 68 | + proxy username |
| 69 | + --proxy-password PROXY_PASSWORD |
| 70 | + proxy password |
| 71 | + --version weblinks version |
| 72 | +``` |
| 73 | + |
| 74 | +## Docs |
| 75 | + |
| 76 | +**Weblinks usage** |
| 77 | + |
| 78 | +To see current lib. version |
| 79 | +```shell |
| 80 | +weblinks --version |
| 81 | +# weblinks version: 2.0 |
| 82 | +``` |
| 83 | + |
| 84 | +To see python file from given url |
| 85 | +```shell |
| 86 | +weblinks --web https://www.python.org/ftp/python/3.8.13/ --substring Python |
| 87 | +# INFO | 2022-07-23 16:23:33,603 | run :117 | links found |
| 88 | +# Python-3.8.13.tar.xz |
| 89 | +# Python-3.8.13.tar.xz.asc |
| 90 | +# Python-3.8.13.tgz |
| 91 | +# Python-3.8.13.tgz.asc |
| 92 | +``` |
| 93 | + |
| 94 | +Still wanted to filter add file extention |
| 95 | +```shell |
| 96 | +weblinks --web https://www.python.org/ftp/python/3.8.13/ --substring Python --ext .tgz |
| 97 | +# INFO | 2022-07-23 16:23:33,603 | run :117 | links found |
| 98 | +# Python-3.8.13.tgz |
| 99 | +``` |
| 100 | + |
| 101 | +Start download, listed links are good |
| 102 | +```shell |
| 103 | +weblinks --web https://www.python.org/ftp/python/3.8.13/ --substring Python --ext .tgz -d |
| 104 | +# INFO | 2022-07-23 16:25:34,807 | run :117 | links found |
| 105 | +# Python-3.8.13.tgz |
| 106 | +# INFO | 2022-07-23 16:25:34,807 | run :124 | start download: Python-3.8.13.tgz |
| 107 | +# INFO | 2022-07-23 16:25:34,807 | utils :58 | downloading: Python-3.8.13.tgz |
| 108 | +# INFO | 2022-07-23 16:25:36,849 | run :126 | completed: Python-3.8.13.tgz |
61 | 109 | ``` |
62 | 110 |
|
| 111 | +For authentication |
| 112 | +```shell |
| 113 | +weblinks --web <url> --substring <sub> --username <kirankotari> --password <xxxxxx> --ext .tgz |
| 114 | +# Note: don't add --password, it will ask dynamically |
| 115 | +``` |
| 116 | + |
| 117 | +For verbose add -v |
| 118 | +```shell |
| 119 | +weblinks --web <url> --substring <sub> --username <kirankotari> --ext .tgz -v |
| 120 | +``` |
| 121 | + |
| 122 | +To store config add --local or --global respectively |
| 123 | +```shell |
| 124 | +weblinks --local --web <url> --username <kirankotari> --ext .tgz |
| 125 | +``` |
| 126 | + |
| 127 | +For proxy |
| 128 | +```shell |
| 129 | +weblinks --proxy <ip>:<port> --web <url> --substring <sub> |
| 130 | +``` |
| 131 | + |
| 132 | +For proxy with authentication |
| 133 | +```shell |
| 134 | +weblinks --proxy <ip>:<port> --web <url> --substring <sub> --proxy-username <proxy user> --proxy-password <proxy password> |
| 135 | +``` |
| 136 | + |
| 137 | +Adding web authentication on top of proxy auth. |
| 138 | +```shell |
| 139 | +weblinks --proxy <ip>:<port> --web <url> --substring <sub> --proxy-username <proxy user> --proxy-password <proxy password> --username <user> |
| 140 | +``` |
| 141 | + |
| 142 | +## Bug Tracker and Support |
| 143 | + |
| 144 | +- Please report any suggestions, bug reports, or annoyances with weblinks through the [Github bug tracker](https://github.com/kirankotari/weblinks/issues). If you're having problems with general python issues, consider searching for a solution on [Stack Overflow](https://stackoverflow.com/search?q=). |
| 145 | +- If you can't find a solution for your problem or need more help, you can [ask a question](https://stackoverflow.com/questions/ask). |
| 146 | + |
63 | 147 | ## License and Copyright |
64 | 148 |
|
65 | 149 | - weblinks is licensed [Apache 2.0](https://opensource.org/licenses/Apache-2.0) 2022 |
|
0 commit comments