{ "info": { "author": "Simone Margaritelli", "author_email": "evilsocket@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License (GPL)", "Natural Language :: English", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Topic :: Internet", "Topic :: Internet :: WWW/HTTP :: Site Management", "Topic :: Software Development", "Topic :: Software Development :: Build Tools", "Topic :: Software Development :: Code Generators" ], "description": "SWG - Static Website Generator\n==============================\n\nCopyleft by Simone Margaritelli \n\nWhat is SWG ?\n-------------\n\nSWG is a new generation static website generator, featured by the Mako (http://www.makotemplates.org/) template system, born from the need to\nhave both performances and \"WEB 2.0\" contents and capabilities.\n\nGiven a set of files, one for each page/article, one for each author and one for the categories hyerarchy, SWG will read the configuration file\nyou specify from command line and generate a complete static website, with tags and categories indexing.\n\nInstallation\n------------\n\nTo get the latest released version:\n\n::\n\n pip install swg\n\nCreate a new website\n--------------------\n\nTo start a new website, type:\n\n::\n\n swg --create website-folder-name\n\nAn example site with a basic structure will be created inside the 'website-folder-name' directory.\nThen you can type:\n\n::\n\n cd website-folder-name\n swg --serve\n\nTo test the website locally.\nThe first article is about customization and basic configuration, so read it carefully.\n\nGenerate your website\n---------------------\n\nOnce you are in the directory containing your website definition (with a swg.cfg file in it), just run:\n\n::\n\n swg --generate\n\nTo start website generation, other options are available, use\n\n::\n\n swg --help\n\nTo a display the complete list.\n\nImporting from another platform\n-------------------------------\n\nRight now, there's the swg-wordpress script you can use to convert a WordPress XML backup file to the\nSWG format, to use it consider the following:\n\n::\n\n swg-wordpress --help\n - SWG Wordpress Backup Importer -\n \n Usage: swg-wordpress -i wordpress-backup.xml -u 'http://www.your-site-url.com' \n \n \n Options:\n -h, --help show this help message and exit\n -i WPBACKUP, --input=WPBACKUP\n The Wordpress XML backup file.\n -u SITEURL, --url=SITEURL\n URL of the destination website.\n -o OUTDIR, --output=OUTDIR\n Output directory, default is the current working\n directory.\n -e FILEEXT, --extension=FILEEXT\n Output file extension, default is txt.\n -I IMGDIR, --images=IMGDIR\n If specified, it's the path where the importer will\n try to download images referenced by articles.\n\nSo let's say for instance, that you have your wp.xml file and you want to export it to the 'example-site.com' directory, downloading\nimages referenced by the articles into the 'example-site.com/images' directory (the import will replace properly image urls), you\nwill use the command line:\n\n::\n\n swg-wordpress -i wp.xml -u http://www.example-site.com -o 'example-site.com' -I 'example-site.com/images'\n\nAnd it's all done!\nNow you just have to create the templates, fix the categories hyerarchy inside the file 'example-site.com/db/categories.txt', customize\nyour own description inside 'example-site.com/db/your-nickname.txt' and make the configuration file following the example below.\n\nAn example configuration file\n-----------------------------\n\n::\n\n # DB files extension\n dbitem_ext = txt\n # URL of the site you are going to generate\n siteurl = http://www.example-site.com\n # Site name / description\n sitename = An example site generated by SWG\n # Site charset\n charset = utf-8\n # Site language\n language = it\n # Comma separated site keywords\n keywords = some, html, keywords, here\n # Site destination basepath\n basepath = \n # Site page files output extension\n page_ext = html\n # Generated site output path\n outputpath = out\n # Items (dirs or files) to copy from datapath to outputpath (eg. static files, css, etc)\n copypaths = css, images, .htaccess\n # Command to execute once the generation is finished, for instance an rsync :)\n transfer = rsync -ravz out/* -e ssh user@example-site.com:/var/www/example-site.com/htdocs/\n # Enable or disable the pager on categories, index, tags and author pages\n pager = true\n # If pager is enabled, this is the maximum number of items per page\n items_per_page = 10\n # Compress pages (ie. index.html.gz) and create (or update) .htaccess file to serve them as html files\n gzip = true\n # Compression level, 0 to 9\n compression = 9\n # Clean output html with TIDY\n tidyfy = true\n\nPretty self explanatory isn't it ? :)\n\nTesting your website locally\n----------------------------\n\nFrom version 1.2.4, SWG offers the possibility to test your website locally, once you are in the directory containing your website definition \n(with a swg.cfg file in it), run the following command:\n\n::\n\n swg --serve\n\nThis will start the website generation and a test webserver on http://localhost:8080/ .\n\nExample project\n---------------\n\nFor an example site, look at my personal blog github repo located here https://github.com/evilsocket/evilsocket.net\n\nEnjoy ^^", "description_content_type": null, "docs_url": "https://pythonhosted.org/swg/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.github.com/evilsocket/swg", "keywords": null, "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "swg", "package_url": "https://pypi.org/project/swg/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/swg/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.github.com/evilsocket/swg" }, "release_url": "https://pypi.org/project/swg/1.2.8.1/", "requires_dist": null, "requires_python": null, "summary": "SWG - A static website generator", "version": "1.2.8.1" }, "last_serial": 800290, "releases": { "1.2.5": [ { "comment_text": "", "digests": { "md5": "689265a59893363cf68b73f001994166", "sha256": "05d55bfb2546cbc239c336d0dcd9aff5dc30c1471907ca617894d7e19cb876f0" }, "downloads": -1, "filename": "swg-1.2.5.tar.gz", "has_sig": false, "md5_digest": "689265a59893363cf68b73f001994166", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 94944, "upload_time": "2011-04-27T19:38:39", "url": "https://files.pythonhosted.org/packages/26/a4/16c0977fe4695da0724e9ac867cd1e597cb9db7f05d0dbf0942b0fbcba81/swg-1.2.5.tar.gz" } ], "1.2.6": [ { "comment_text": "", "digests": { "md5": "0b6488d11eabc4ae02ca3257b51bb5f0", "sha256": "899e49e7253be70bcfc77489b35e5a4b1ce19f2b6c2aedc0cd54b62d03ebb73f" }, "downloads": -1, "filename": "swg-1.2.6.tar.gz", "has_sig": false, "md5_digest": "0b6488d11eabc4ae02ca3257b51bb5f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 94910, "upload_time": "2011-04-27T20:34:44", "url": "https://files.pythonhosted.org/packages/37/2d/52b981bf2f9b70cfd61e363b9ed871360be1b4076815c77f227b54dd22bd/swg-1.2.6.tar.gz" } ], "1.2.7": [ { "comment_text": "", "digests": { "md5": "8a4ec06892c6e1e76f0a580d78332935", "sha256": "9e915c338ef736ba957a49bb91dd9079816d1bd4f0ca7490eb5a41321f3e20c1" }, "downloads": -1, "filename": "swg-1.2.7.tar.gz", "has_sig": false, "md5_digest": "8a4ec06892c6e1e76f0a580d78332935", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 146590, "upload_time": "2011-04-29T20:50:55", "url": "https://files.pythonhosted.org/packages/60/d4/8805b72a92f5aab8e14feb478ad3a8147714b86afd179bc06e70678d3685/swg-1.2.7.tar.gz" } ], "1.2.8": [ { "comment_text": "", "digests": { "md5": "64e08301c2071e039d8a32b87e3fade1", "sha256": "f9c5c29d795b482c4313308b30a0397695791c8bc47ea07b9efa5daf5ced65c4" }, "downloads": -1, "filename": "swg-1.2.8.tar.gz", "has_sig": false, "md5_digest": "64e08301c2071e039d8a32b87e3fade1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 145247, "upload_time": "2011-08-28T15:56:10", "url": "https://files.pythonhosted.org/packages/f8/84/53c8eb6782051fa857ef60d2a6487a9356d5f6ecb063a1da5ebebc8de6c8/swg-1.2.8.tar.gz" } ], "1.2.8.1": [ { "comment_text": "", "digests": { "md5": "e3125b2109d2099cabf2dfb7d0f34c55", "sha256": "342d6741b08480047fd52e46b5d155e3ee684ef5d9bfc11ac81b82476bb5871b" }, "downloads": -1, "filename": "swg-1.2.8.1.tar.gz", "has_sig": false, "md5_digest": "e3125b2109d2099cabf2dfb7d0f34c55", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 144572, "upload_time": "2011-08-28T17:00:28", "url": "https://files.pythonhosted.org/packages/1b/dd/d34d7f22eaf2325f8a9183b7afb29ac4dd7eb5d8c585ccdf82a44362b759/swg-1.2.8.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e3125b2109d2099cabf2dfb7d0f34c55", "sha256": "342d6741b08480047fd52e46b5d155e3ee684ef5d9bfc11ac81b82476bb5871b" }, "downloads": -1, "filename": "swg-1.2.8.1.tar.gz", "has_sig": false, "md5_digest": "e3125b2109d2099cabf2dfb7d0f34c55", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 144572, "upload_time": "2011-08-28T17:00:28", "url": "https://files.pythonhosted.org/packages/1b/dd/d34d7f22eaf2325f8a9183b7afb29ac4dd7eb5d8c585ccdf82a44362b759/swg-1.2.8.1.tar.gz" } ] }