News for hackers. Stuff that matters.
Re:Show HN: First Crack, a simple static blog engine in Python by turtleish on Tuesday June 04, 2019 @09:07PM (#20100673)
> Because I started this project in 2011, though, with Python 2, you will need Python 2.* to use my blogging engine. I plan to port it to Python 3 soon. Use with versions other than 2.* at your own risk.

7 months until PY2 goes EOL...

Re:Show HN: First Crack, a simple static blog engine in Python by AndrewStephens on Wednesday June 05, 2019 @10:32AM (#20104763)
Everyone and their dog has written a static site generator - and that is good thing.

Blogs are a personal creation and there is something very satisfying about publishing your own text using your own tools.

Things I particularly like about this project:

* No dependencies

* the generated pages are clean

* good documentation and usability

Since it is tradition at this point, here is my static site generator: https://github.com/andrewstephens75/gensite

And an example page: https://sheep.horse/2017/10/how_you_are_reading_this_page.ht...

Re:Show HN: First Crack, a simple static blog engine in Python by fredley on Wednesday June 05, 2019 @06:41AM (#20103014)
All you need to do to make this work with Python 3 is change your print statements (add parentheses) and change raw_input to input, as far as I can tell running it in python 3 locally. It seems to work perfectly with these ~20 seconds of changes.
Re:Show HN: First Crack, a simple static blog engine in Python by e12e on Wednesday June 05, 2019 @06:59AM (#20103107)
Sounds like 2to3 should be able to magically fix it? I suppose adding "from future import print" and similar for input would keep it working for python2 too?

Ed: i think that should be:

from builtins import input

from __future__ import print_function

Re:Show HN: First Crack, a simple static blog engine in Python by fredley on Wednesday June 05, 2019 @07:15AM (#20103191)
Don't bother with python 2 compatibility, it's EOL in a few months. And 2to3 will probably work but even that is more effort than it needs to be.
Re:Show HN: First Crack, a simple static blog engine in Python by vorg on Wednesday June 05, 2019 @06:49PM (#20109909)
An official "EOL" from the Python Benevolency doesn't mean Python 2 has reached the end of its life. There's too many projects out there using it for the same reasons this one is, i.e. "Because I started this project in 2011, though, with Python 2, you will need Python 2".

Both Python 2 and Python 3 will continue to exist for active projects for a long time yet. All programming languages have this issue, though many try to hide it, such as Apache Groovy.

In 2012, Groovy 2 shipped as two separate compilers bundled together, one was a continuation of Groovy 1 and the other was the new edition with the invoke-dynamic capabilities. A few weeks ago, the Groovy Committee decided to keep these separate in the bundle for the upcoming Groovy 3 release, add the new features such as the parser upgrade from Antlr 2 to Antlr 4 to the invoke-dynamic compiler only, and keep the other compiler (the one actually used by Gradle and Jenkins and everyone else) at the Groovy 1 capabilities.

So virtually everyone will be using the old antlr2 parser and slower dynamic function dispatches in Apache Groovy for a long time yet, something which the Groovy project managers are deliberately doing to cater for all the legacy Groovy code out there.

Re:Show HN: First Crack, a simple static blog engine in Python by quickthrower2 on Tuesday June 04, 2019 @11:40PM (#20101267)
My favourite static blog engine is a NIH fueled mix of NodeJS, Handlebars, fs-extra and some glue code. It takes about 10 minutes to knock one up and then you are blessed you can extend it using JS not whatever DSLs are thrown are you by the static site generator. There is a lot more help out there for JS problems than Hugo problems.
Re:Show HN: First Crack, a simple static blog engine in Python by jjjbokma on Wednesday June 05, 2019 @09:51AM (#20104304)
I wrote a static microblog engine in Python as well (3.7+). There is also a Perl version: https://github.com/john-bokma/tumblelog

Demo site: http://plurrrr.com/

Re:Show HN: First Crack, a simple static blog engine in Python by gitgud on Thursday June 06, 2019 @07:15PM (#20120165)
> First Crack does not rely on any third-party tools, code, or frameworks

Sorry just a little nitpick: Python is a dependency that's not guaranteed to be on someone's system, probably should mention this somewhere

Re:Show HN: First Crack, a simple static blog engine in Python by cardamomo on Wednesday June 05, 2019 @06:47AM (#20103044)
> First Crack does not rely on any third-party tools, code, or frameworks.

That's music to my ears!

Re:Show HN: First Crack, a simple static blog engine in Python by ColanR on Tuesday June 04, 2019 @08:57PM (#20100634)
No example images or demo site?
Re:Show HN: First Crack, a simple static blog engine in Python by indigodaddy on Tuesday June 04, 2019 @10:04PM (#20100924)
Looks to be https://zacs.site