https://github.com/capjamesg/seotools
A set of utilities for SEOs and web developers with which to complete common tasks.
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.0%) to scientific vocabulary
Keywords
Repository
A set of utilities for SEOs and web developers with which to complete common tasks.
Basic Info
- Host: GitHub
- Owner: capjamesg
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://capjamesg.github.io/SEOtools/
- Size: 1.48 MB
Statistics
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
SEOtools 🛠️
A set of utilities for SEOs and web developers with which to complete common tasks.
With SEOtools, you can:
- Programatically add links to related posts in content.
- Calculate PageRank on internal links from your sitemap.
- Identify broken links on a web page.
- Recommend a post to use as canonical for a given keyword.
- Find the distance of pages from your home page.
And more!
Installation 💻
You can install SEOtools using pip:
bash
pip install seotools
Quickstart 🚀
Create a link graph
```python from seotools.app import Analyzer
load from disk will load the link graph from disk if it has already been created
otherwise, a new link graph will be created
analyzer = Analyzer("https://jamesg.blog/sitemap.xml", loadfromdisk=True) ```
Get pagerank of a URL
python
print(analyzer.pagerank["https://jamesg.blog"])
Add relevant internal links to a web page
```python import markdown
article = markdown.markdown(BeautifulSoup(article.text, "html.parser").get_text())
keywordreplacecount = 0
for keyword, url in keywordmap.items(): if keywordreplacecount >= MAXKEYWORD_REPLACE: break
article = article.replace(keyword, f"<a href='{url}'>{keyword}</a>", 1)
keyword_replace_count += 1
print(article) ```
Recommend related content for a "See Also" section
```python article = requests.get("https://jamesg.blog/...")
article = markdown.markdown(BeautifulSoup(article.text, "html.parser").get_text())
urls = analyzer.recommendrelatedcontent(article.text) ```
Check if a page contains a particular JSON-LD object
```python from seotools import pagecontainsjsonld import requests
content = requests.get("https://jamesg.blog")
print(pagecontainsjsonld(content, "FAQPage")) ```
Get subfolders in a sitemap
python
analyzer.get_subpaths()
Get distance of URL from home page
python
analyzer.get_distance_from_home_page("https://jamesg.blog/2023/01/01/")
Retrieve keywords that appear more than N times on a web page
```python from seotools import get_keywords import requests from bs4 import BeautifulSoup
article = requests.get("https://jamesg.blog/...").text parsedarticle = BeautifulSoup(article, "html.parser").gettext()
get keywords that appear more than 10 times
keywords = getkeywords(parsedarticle, 10) ```
See Also 📚
- getsitemap: Retrieve URLs in a sitemap. (Web interface)
License 📝
This project is licensed under an MIT license.
Owner
- Name: James
- Login: capjamesg
- Kind: user
- Location: Scotland
- Company: @Roboflow
- Website: jamesg.blog
- Repositories: 320
- Profile: https://github.com/capjamesg
from words, wonder.
GitHub Events
Total
Last Year
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| capjamesg | j****g@j****g | 16 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 21 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 4
- Total maintainers: 1
pypi.org: seotools
A collection of tools for use with writing SEO-related programs in Python.
- Homepage: https://github.com/capjamesg/seotools
- Documentation: https://seotools.readthedocs.io/
- License: MIT License
-
Latest release: 0.1.2
published over 2 years ago