{ "info": { "author": "Lucas Vazquez", "author_email": "lucas5zvazquez@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3 :: Only" ], "description": "[![Build Status](https://api.travis-ci.org/lucasvazq/cushead.svg?branch=master)](https://travis-ci.org/lucasvazq/cushead)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ce412113e4144c9f9739a99a0d0b77f5)](https://app.codacy.com/app/lucasvazq/cushead?utm_source=github.com&utm_medium=referral&utm_content=lucasvazq/cushead&utm_campaign=Badge_Grade_Dashboard)\n[![codecov](https://codecov.io/gh/lucasvazq/cushead/branch/master/graph/badge.svg)](https://codecov.io/gh/lucasvazq/cushead)\n[![PyPI version](https://badge.fury.io/py/cushead.svg)](https://badge.fury.io/py/cushead)\n\n

\n \n

\n\n# cushead\n\n**A CLI that help you to improve the SEO and UX of your websites.**\n\n**Works with:** _meta-tags, favicons, manifest, robots, browserconfig, sitemap, opensearch_\n\n**Python Versions:** _>=3.5, <4.0_\n\n**Package Version**: _3.1.8_\n\n**Status:** _Production/Stable_\n\n## Description\n\nThis script edits an html file adding some meta-tags and other stuff for\nimproving the **SEO** and the **UX** of your website. Also, it generate a lot\nof useful files that are vinculated to that tags or stuff. For example, icons\nfor apple devices and manifest.json file. The info and the files generated can\nbe set through a config file.\n\nThe script can generate a full default config file running:\n\n`cushead -preset settings.txt`\n\nYou can edit that file how you want, and then run the script with that settings\nusing:\n\n`cushead -file settings.txt`\n\n## MENU\n\n[Install](#install)\n\n[Arguments](#arguments)\n\n1) [-h](#-h)\n\n2) [-preset](#-preset)\n\n3) [-file](#-file)\n\n[Testing](#testing)\n\n[Considerations](#considerations)\n\n[License](#license)\n\n## Install\n\n`python3 -m pip install cushead`\n\n## Arguments\n\n### -h\n\n`cushead -h`\n\n```txt\nusage: cushead -file FILEPATH\n\nOptions (one required):\n -preset FILENAME Name of config file. Generate an example config file. That\n file contains a variable named 'config' that can be\n customized. It has some required values: 'html_file' (FILE\n PATH), 'output' (FOLDER PATH) and 'static_url' (STRING).\n Also, if 'icon_png' (IMAGE FILE PATH) is declared, this\n key need to have a value related to a path of an existing\n image.\n -file FILEPATH Path to config file. Read a config file that contains\n configurable values related to SEO and UX. After it, the\n script edits an html file and generate complementary files\n like icons, robots.txt, etc.\n\nExamples:\n1) Generate config file:\n cushead -preset settings.txt\n2) Execute with using that config file:\n cushead -file settings.txt\n```\n\n### -preset\n\nThis command generate a full config file in python syntax.\nExample:\n\n`cushead -preset settings.txt`\n\n_(settings.txt)_\n```python\n\"\"\"\nPython syntax\ncushead config file\nGit: https://github.com/lucasvazq/cushead\nDocumentation: https://github.com/lucasvazq/cushead/blob/master/README.md\n\nCONFIG VARIABLES:\n\n html_file (FILE PATH):\n Required, can't be void, need to exist and referrer to a file\n\n output (FOLDER PATH):\n Required, need to exist and referrer to a folder\n\n static_url (STRING):\n Required\n\n icon_png (FILE PATH):\n If declared, need to exist and referrer to an image file\n Recomended 310x310 png image\n\"\"\"\n\n# Don't delete or change the name of this variable\nconfig = {\n\n # MAIN CONFIG\n 'html_file': './index.html',\n 'output': './output/', # e.g. for manifest.json\n 'static_url': '/static/',\n\n # GENERAL CONFIG\n 'content-type': 'text/html; charset=utf-8',\n 'X-UA-Compatible': 'ie=edge',\n 'viewport': {'width': 'device-width', 'initial-scale': '1'},\n 'language': 'en',\n 'territory': 'US', # language territory\n 'type': 'website', # http://ogp.me/#types\n 'color': '#FFFFFF',\n 'url': 'microsoft.com', # Without \"www.\" and protocol (e.g. \"http://\")\n 'protocol': 'https://',\n 'robots': 'index, follow',\n 'browserconfig': 'browserconfig.xml',\n 'manifest': 'manifest.json',\n 'opensearch': 'opensearch.xml',\n 'sitemap': 'sitemap.xml',\n\n # BASIC CONFIG\n 'title': 'Microsoft',\n 'description': 'Technology Solutions',\n 'subject': 'Home Page',\n 'keywords': 'Microsoft, Windows',\n\n # IMAGES\n 'preview': 'preview.png', # Big image preview\n 'preview_type': 'image/png', # image/jpeg, image/gif or image/png\n 'icon': 'favicon.ico', # *.ico\n 'icon_png': './favicon.png', # FILEPATH PNG IMAGE 310x310\n 'mask-icon': 'maskicon.svg', # svg file type\n\n # SOCIAL MEDIA\n 'fb:app_id': '12345', # Facebook App ID\n 'tw:site': '@Microsoft', # Twitter account\n 'tw:creator:id': '123456', # Page editor ID\n\n # PWA\n 'dir': 'ltr',\n 'start_url': '/',\n 'orientation': 'landscape',\n 'scope': '/',\n 'display': 'browser',\n 'platform': 'web',\n 'applications': [\n {\n 'platform': 'play',\n 'url': 'https://play.google.com/store/apps/details?id=com.example.app',\n 'id': 'com.example.app'\n },\n {\n 'platform': 'itunes',\n 'url': 'https://itunes.apple.com/app/example-app/id123456',\n }\n ],\n\n # AUTHOR\n 'author': 'Lucas Vazquez'\n\n}\n```\n\n#### html_file\n\nRequires for a *.html file path.\nThat file needs to contain a literally `` element and a $head$ variable.\nThe ``element is used to add the lang attribute.\nThe $head$ variable is used to be replaced with custom elements like meta-tags.\nExample struct:\n\n_(index.html)_\n```html\n\n \n $head$\n \n\n```\n\n#### output\n\nThe folder where all generated files are going to be saved.\nIt must exist.\n\n#### static_url\n\nThe URL path of statics files.\n\n#### icon_png\n\nA PNG image file used to generate the icons. 310x310 size recommended.\n\n### -file\n\nThis argument uses a config file to run the script.\nUsing the default config file generated with -preset, we run the script with\n-file:\n\n`cushead -file settings.txt`\n\nOutput:\n```txt\n\n\nHEAD:\n\n\n\n\n\n\n\n\nMicrosoft\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nNEW FILES:\n./output/favicon-16x16.png\n./output/favicon-24x24.png\n./output/favicon-32x32.png\n./output/favicon-48x48.png\n./output/favicon-57x57.png\n./output/favicon-60x60.png\n./output/favicon-64x64.png\n./output/favicon-70x70.png\n./output/favicon-72x72.png\n./output/favicon-76x76.png\n./output/favicon-96x96.png\n./output/favicon-114x114.png\n./output/favicon-120x120.png\n./output/favicon-128x128.png\n./output/favicon-144x144.png\n./output/favicon-150x150.png\n./output/favicon-152x152.png\n./output/favicon-167x167.png\n./output/favicon-180x180.png\n./output/favicon-192x192.png\n./output/favicon-195x195.png\n./output/favicon-196x196.png\n./output/favicon-228x228.png\n./output/favicon-310x310.png\n./output/ms-icon-144x144.png\n./output/apple-touch-icon-57x57.png\n./output/apple-touch-icon-57x57.png\n./output/apple-touch-icon-60x60.png\n./output/apple-touch-icon-72x72.png\n./output/apple-touch-icon-76x76.png\n./output/apple-touch-icon-114x114.png\n./output/apple-touch-icon-120x120.png\n./output/apple-touch-icon-144x144.png\n./output/apple-touch-icon-152x152.png\n./output/apple-touch-icon-180x180.png\n./output/fluidicon-512x512.png\n./output/ms-icon-30x30.png\n./output/ms-icon-44x44.png\n./output/ms-icon-70x70.png\n./output/ms-icon-150x150.png\n./output/ms-icon-310x310.png\n./output/ms-icon-310x150.png\n./output/android-icon-36x36.png\n./output/android-icon-48x48.png\n./output/android-icon-72x72.png\n./output/android-icon-96x96.png\n./output/android-icon-144x144.png\n./output/android-icon-192x192.png\n./output/opensearch-16x16.png\n./output/browserconfig.xml\n./output/manifest.json\n./output/opensearch.xml\n./output/robots.txt\n./output/sitemap.xml\n\nHTML FILE: ./index.html\n(full path): /home/user/Projects/Example/./index.html\nOUTPUT FILES: ./output/\n(full path): /home/user/Projects/Example/./output/\n```\n\n#### Edited html file\n\nSupposing we provide the html file declared previously (index.html), the result\nwill be:\n\n_(index.html)_\n```html\n\n \n \n \n \n \n \n \n \n \n Microsoft\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n```\n\n#### New files\n\n48 new icons with different sizes, coming from 'icon_png' config value.\nNew files: browserconfig.xml, manifest.json, opensearch.xml, robots.txt and\nsitemap.xml\n\n_(browserconfig.xml)_ _BEAUTY VERSION_\n```xml\n\n\n \n \n \n \n \n \n \n \n #FFFFFF\n \n \n\n```\n\n_(manifest.json)_ _BEAUTY VERSION_\n```json\n{\n \"name\": \"Microsoft\",\n \"short_name\": \"Microsoft\",\n \"description\": \"Technology Solutions\",\n \"dir\": \"ltr\",\n \"start_url\": \"/\",\n \"orientation\": \"landscape\",\n \"background_color\": \"#FFFFFF\",\n \"theme_color\": \"#FFFFFF\",\n \"default_locale\": \"en\",\n \"scope\": \"/\",\n \"display\": \"browser\",\n \"platform\": \"web\",\n \"related_applications\": [\n {\n \"platform\": \"play\",\n \"url\": \"https://play.google.com/store/apps/details?id=com.example.app\",\n \"id\": \"com.example.app\"\n },\n {\n \"platform\": \"itunes\",\n \"url\": \"https://itunes.apple.com/app/example-app/id123456\"\n }\n ],\n \"icons\": [\n {\n \"src\": \"/static/android-icon-36x36\",\n \"sizes\": \"36x36\",\n \"type\": \"image/png\",\n \"density\": \"0.75\"\n },\n {\n \"src\": \"/static/android-icon-48x48\",\n \"sizes\": \"48x48\",\n \"type\": \"image/png\",\n \"density\": \"1.0\"\n },\n {\n \"src\": \"/static/android-icon-72x72\",\n \"sizes\": \"72x72\",\n \"type\": \"image/png\",\n \"density\": \"1.5\"\n },\n {\n \"src\": \"/static/android-icon-96x96\",\n \"sizes\": \"96x96\",\n \"type\": \"image/png\",\n \"density\": \"2.0\"\n },\n {\n \"src\": \"/static/android-icon-144x144\",\n \"sizes\": \"144x144\",\n \"type\": \"image/png\",\n \"density\": \"3.0\"\n },\n {\n \"src\": \"/static/android-icon-192x192\",\n \"sizes\": \"192x192\",\n \"type\": \"image/png\",\n \"density\": \"4.0\"\n }\n ]\n}\n```\n\n_(opensearch.xml)_ _BEAUTY VERSION_\n```xml\n\n\n Microsoft\n Search Microsoft\n UTF-8\n \n /static/opensearch-16x16.png\n\n```\n\n_(robots.txt)_\n```txt\nUser-agent: *\nAllow: /\n\nSitemap: https://microsoft.com/sitemap.xml\n```\n\n_(sitemap.xml)_ _BEAUTY VERSION_\n```xml\n\n\n \n https://microsoft.com/\n \n\n```\n\n## Testing\n\n### Files\n\n[manifest.json](https://manifest-validator.appspot.com/)\n\n[robots.txt](https://sitechecker.pro/es/robots-tester/)\n\n[sitemap.xml](https://www.xml-sitemaps.com/validate-xml-sitemap.html)\n\n### Headers\n\n[Favicons](https://realfavicongenerator.net/favicon_checker)\n\n[Meta-tags](https://www.heymeta.com/)\n\n[Facebook Debugger](https://developers.facebook.com/tools/debug/)\n\n[Twitter Card validator](https://cards-dev.twitter.com/validator)\n\n## Considerations\n\nHere is a list of concepts that comprise good practices to improve **SEO** and\n**UX**:\n\n1) Structured data: RDFa, JSON-D, Microdata, GoodRelations, vCard, hCard\n2) rel profile attribute for referring to author or website owner\n3) Maskable icons\n4) Accelerated Mobiles Pages\n5) Progressive Web Apps\n6) Screenshots in manifest for PWA\n7) Add PWA to App stores (like the Play Store of Google)\n8) Javascript and css minified and purged with short variables names\n9) Responsive Design\n10) Mobile call and Whatsapp sms for mobiles websites\n11) Google my Business integration\n12) gzip and bzip2 compression\n13) Server Side Rendering\n14) HTTP caching in Client Side\n15) Content Delivery Network\n\n## License\n\n**cushead** \u00a9 2019 Lucas Vazquez. Released under the [MIT](http://mit-license.org/) License.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lucasvazq/cushead", "keywords": "SEO,UX,front-end", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "cushead", "package_url": "https://pypi.org/project/cushead/", "platform": "any", "project_url": "https://pypi.org/project/cushead/", "project_urls": { "Documentation": "https://github.com/lucasvazq/cushead/blob/master/README.md", "Homepage": "https://github.com/lucasvazq/cushead", "Source": "https://github.com/lucasvazq/cushead" }, "release_url": "https://pypi.org/project/cushead/3.1.8/", "requires_dist": null, "requires_python": ">=3.5, <4.0", "summary": "CLI that help you to improve the SEO and UX of your websites.", "version": "3.1.8" }, "last_serial": 5678330, "releases": { "3.1.7": [ { "comment_text": "", "digests": { "md5": "d17bb415eca2fba23d3429be1dd9c1bc", "sha256": "fccd25d20cbf2deb1d037d579bd15cf3b39c8f0840c0acefdb5fd1f92f9b1e49" }, "downloads": -1, "filename": "cushead-3.1.7.tar.gz", "has_sig": false, "md5_digest": "d17bb415eca2fba23d3429be1dd9c1bc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5, <4.0", "size": 21141, "upload_time": "2019-08-14T17:05:12", "url": "https://files.pythonhosted.org/packages/5e/bb/2e9388dfe1e4bb547f2053b838c6e464da5bbc230d8de1700fd5ede4289f/cushead-3.1.7.tar.gz" } ], "3.1.8": [ { "comment_text": "", "digests": { "md5": "c801c27257e2fcd6c9195d367f31f9c6", "sha256": "8f39962c3b0b5183f54ab8c6475721c4122a942bba0488fe6f68b3d5a2e308cc" }, "downloads": -1, "filename": "cushead-3.1.8.tar.gz", "has_sig": false, "md5_digest": "c801c27257e2fcd6c9195d367f31f9c6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5, <4.0", "size": 21138, "upload_time": "2019-08-14T17:16:16", "url": "https://files.pythonhosted.org/packages/86/6e/8fe144d80b910c5b15d6ddf2f5b0aed45eb9d384ba4c02b1f09f2a7e15ae/cushead-3.1.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c801c27257e2fcd6c9195d367f31f9c6", "sha256": "8f39962c3b0b5183f54ab8c6475721c4122a942bba0488fe6f68b3d5a2e308cc" }, "downloads": -1, "filename": "cushead-3.1.8.tar.gz", "has_sig": false, "md5_digest": "c801c27257e2fcd6c9195d367f31f9c6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5, <4.0", "size": 21138, "upload_time": "2019-08-14T17:16:16", "url": "https://files.pythonhosted.org/packages/86/6e/8fe144d80b910c5b15d6ddf2f5b0aed45eb9d384ba4c02b1f09f2a7e15ae/cushead-3.1.8.tar.gz" } ] }