{"id":17537640,"url":"https://github.com/zenhack/iron-blogger2","last_synced_at":"2025-04-23T21:07:27.152Z","repository":{"id":23678811,"uuid":"27050295","full_name":"zenhack/iron-blogger2","owner":"zenhack","description":null,"archived":false,"fork":false,"pushed_at":"2017-01-03T00:40:13.000Z","size":580,"stargazers_count":3,"open_issues_count":15,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-24T17:49:40.592Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zenhack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-23T22:22:14.000Z","updated_at":"2023-06-21T14:23:00.000Z","dependencies_parsed_at":"2022-07-27T04:17:09.673Z","dependency_job_id":null,"html_url":"https://github.com/zenhack/iron-blogger2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenhack%2Firon-blogger2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenhack%2Firon-blogger2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenhack%2Firon-blogger2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenhack%2Firon-blogger2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zenhack","download_url":"https://codeload.github.com/zenhack/iron-blogger2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242245267,"owners_count":20096074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-20T20:42:22.253Z","updated_at":"2025-03-06T16:30:36.223Z","avatar_url":"https://github.com/zenhack.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/zenhack/iron-blogger2.svg?branch=master)](https://travis-ci.org/zenhack/iron-blogger2)\n\nIron Blogger 2 is a reimplementation of the original [iron_blogger][1].\nThe consensus among those of the original's users who are also\ndevelopers is that it is unmaintainable, and a rewrite is needed.\n\n# Setting Up a Development Environment\n\n###Prerequisites\n\nFor Debian/Ubuntu users, you may need to run sudo `apt-get install libxml2-dev libxslt1-dev`\n\n###virtualenv\n\nUse of [virtualenv][3] is recommended for development. In this\ndirectory, execute:\n\n    virtualenv .venv\n    source .venv/bin/activate\n    pip install -e .\n    pip install -r test-requirements.txt\n\nAny directory can be used for the virtual environment, but `.venv` is\npreferred, and there's a rule in `.gitignore` which will keep you from\naccidentally committing it to the repository. The first pip command\ninstalls ironblogger in \"editable\" mode, so that changes you make to the\nsource tree will be picked up automatically. The second installs\ndependencies for running the test suite.\n\nCopy `example.wsgi.py` to `wsgi.py` and edit the configuration therein.\nThe `ironblogger` command described below must be run from within the\nsame directory as `wsgi.py`.\n\nTo initialize the database, make sure `wsgi.py` specifies the right url\nfor the database, and run `ironblogger init-db`\n\n\n## Static assets\n\nStatic assets have been submoduled and are kept in\n`ironblogger/static/bower_components`, which used to be managed by Bower, which\nis why it has that name.\n\nTo pull these in, run `git submodule init` to set up the submodules\n\nThen run `git submodule update --depth=1` to dowload all the required media\nrepositories.\n\nThe depth option is important to limit the amount of downloaded data since we\ndon't need to have the history of these projects.\n\n## Starting the server\n\nIron Blogger 2 is a [Flask][2] app. A stand-alone development server can\nbe started with:\n\n    ironblogger serve\n\nAt which point, the application will be available at\n\u003chttp://localhost:5000\u003e.\n\n\nThe `bloggers.yml` file used by the old iron blogger software can be\nimported via:\n\n    ironblogger import \u003c bloggers.yml\n\npaultag's repository has a version of [bloggers.yml][4] that roughly\nreflects the roster of Boston-area participants the last time the\noriginal software was being used.\n\nOnce the database is populated with bloggers/blogs, posts can be downloaded\nand accounted for by running:\n\n    ironblogger sync\n\n## Unit Tests\n\nWe use [pytest][7] for unit testing. Running the tests is simply a\nmatter of executing:\n\n    py.test\n\nIt's configured to display code coverage statistics as well.\n\nNew tests should be placed in a file matching `tests/test_*`; This\nallows pytest to pick them up automatically.\n\nWe use [pytest-quickcheck][8] to test iron blogger with random data. By\ndefault we run each randomized test 10 times. This can be change via the\nenvironment variable `NUM_RANDOM_CALLS`, e.g:\n\n    NUM_RANDOM_CALLS=50 py.test\n\n## Useful tips\n\n* The command `ironblogger shell` will open a python interpreter prompt\n  that has already loaded the settings in wsgi.py, and is running inside\n  of a Flask request context, with an active database connection. This allows\n  you to make calls to various parts of the code that don't otherwise work\n  without a bit of setup.\n* The commands `ironblogger fetch-posts` and `ironblogger assign-rounds`\n  perform the downloading and bookkeeping steps of `ironblogger sync`,\n  respectively. Invoking them individually may be useful in some cases.\n* As of right now, while there's an admin panel available at `\u003cmain page\n  url\u003e/admin`, no users will exist by default. You can add one manually\n  by dropping into the python shell using `ironblogger shell`, and running:\n\n    from ironblogger.model import *\n    u = User(name='my_user', is_admin=True)\n    u.set_password('secret')\n    db.session.add(u)\n    db.session.commit()\n\n# Setting Up In Production\n\n## Web Server\n\nIron Blogger is a standard [wsgi][5] application; the `wsgi.py` that\nsupplies the configuration also provides the `application` variable\nrequired by wsgi; it should work with any web server which supports the\nstandard.\n\n## Database\n\nIron Blogger 2 has only been tested with SQLite and PostgreSQL. The\nlatter should be used for production deployments; SQLite does not allow\nconcurrent processes to safely access the database, and Iron Blogger\nrequires this to fetch new posts and do bookkeeping. SQLite is fine\nduring development however, where the update tasks are typically run\nmanually and so there is a low risk of data corruption. To use postgres,\nyou'll need the additional python package `psycopg2`; read the comments\nin `setup.py` to learn how to set that up.\n\n## Background Jobs\n\nThere are a few periodic tasks that Iron Blogger needs to be done. In\nparticular:\n\n* New posts need to be downloaded and assigned to rounds (`ironblogger\n  sync`).\n* If weekly notification emails are desired, they must be sent\n  (`ironblogger send-reminders`).\n\nAll of these commands must be executed from the directory containing\n`wsgi.py`.\n\nThe recommended approach is to put each of these in a cron job to\nexecute at the proper time.\n\n## Openshift\n\nIron Blogger comes ready to run on [Openshift][6]. Have a look at\n`example-openshift.wsgi.py` for instructions. You'll need the postgres\nand cron cartridges installed. The scripts in the `.openshift` directory\nwill take care of keeping the database up to date. New posts will be\ndownloaded once per hour, and reminders will be sent out on Fridays.\n\n# License\n\nIron Blogger 2 is Free Software, released under the GPL3 (or later). A\nlist of its authors can be found in the file `AUTHORS`.\n\n[1]: https://github.com/paultag/iron-blogger\n[2]: http://flask.pocoo.org/\n[3]: https://virtualenv.pypa.io/en/latest/\n[4]: https://raw.githubusercontent.com/paultag/iron-blogger/master/bloggers.yml\n[5]: https://en.wikipedia.org/wiki/Web_Server_Gateway_Interface\n[6]: https://www.openshift.com/\n[7]: http://pytest.org/latest/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenhack%2Firon-blogger2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzenhack%2Firon-blogger2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenhack%2Firon-blogger2/lists"}