This repository has been archived on 2025-09-28. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
linkmapy/README.md

53 lines
1.4 KiB
Markdown
Raw Normal View History

2021-12-09 09:47:42 +00:00
# linkmapy
2021-12-09 11:17:54 +01:00
Create a graph from the links on a website and the following sites.
## Dependencies
2022-03-07 15:02:40 +01:00
- Python 3.9 - 3.10
### Pip Dependencies
- pyvis
2022-03-07 15:02:40 +01:00
- requests
You can install those dependencies with
```
pip install -r requirements.txt
```
2021-12-09 10:56:15 +01:00
## Usage
2021-12-09 09:47:42 +00:00
```
2021-12-09 10:56:15 +01:00
./linkmapy.py [-h] [--dump] [--max-depth N] [--max-links-per-site N] [--http-download-limit NBYTES] [--log] url
2021-12-09 09:47:42 +00:00
```
2021-12-09 10:56:15 +01:00
- positional arguments:
- `url`   The URL of the site you want to start from
2021-12-09 09:47:42 +00:00
2021-12-09 10:56:15 +01:00
- optional arguments:
- `-h`, `--help`   show this help message and exit
- `--dump`   Only output the found connections to the console and exit
- `--max-depth N`   The maximum depth at which links will be followed (default: 3)
2021-12-09 11:17:54 +01:00
- `--max-links-per-site N`   The maximum amount of links on a page that will be included (default: 3) *
2021-12-09 10:56:15 +01:00
- `--http-download-limit NBYTES`   The maximum length of a requested html file download (in bytes) (default: 10000000)
- `--log`   Log all visited sites and links to stderr
2021-12-09 11:17:54 +01:00
\* when there are more than `max-links-per-site` links on the page, the program will pick `max-links-per-site` random links and ignore the rest.
2021-12-09 11:22:07 +01:00
---
The program will visit the website, visit its links and generate a graph from the resulting linkmap. It will write it to `./output.html` and it will try to open this html file with your standard browser.
----
2021-12-09 11:17:54 +01:00
### Example
```
./linkmapy.py example.org
```
Result:
![](misc/example_graph_screenshot.png)