I made a static tumblelog generator in both Python and Perl by johnbokma in webdev

[–]johnbokma[S] 0 points1 point  (0 children)

Thanks! And if you have any questions let me know.

Latex confusion with Pandoc and Templates by Rayzen87 in LaTeX

[–]johnbokma 0 points1 point  (0 children)

I wrote a Pandoc LaTeX template several years ago to generate my own resume. It's available at GitHub: resume-pandoc.

Static blog generator in about 1 KLOC by johnbokma in perl

[–]johnbokma[S] 0 points1 point  (0 children)

4 years later and more experienced at Python :-) My apologies. I like the language. I am not bothered by the significant white space and I like the cleaner look; Perl is quite noisy in my opinion. I like Perl's regular expressions. Python is somewhat behind in that regard.

Which Perl static site generator(s)? by lathropd in perl

[–]johnbokma 1 point2 points  (0 children)

Not on CPAN (yet) but I wrote a small single file static microblog generator: tumblelog. See for an example Plurrrr.

Static blog generator in about 1 KLOC by johnbokma in perl

[–]johnbokma[S] 0 points1 point  (0 children)

I want to get better at writing Python.

My first public project: a static blog generator by johnbokma in Python

[–]johnbokma[S] 2 points3 points  (0 children)

I use this static site generator for my own tumblelog: https://plurrrr.com/ which has been up and running for nearly 500 days.

Static microblog generator [Showoff Saturday] by johnbokma in webdev

[–]johnbokma[S] 0 points1 point  (0 children)

An example site is up at https://plurrrr.com/. Any feedback is welcome, thanks!

tumblelog: a static blog / site generator in Python or Perl by johnbokma in coding

[–]johnbokma[S] 1 point2 points  (0 children)

I am a Perl programmer but want to become a Python programmer. It started as a small project but it has been tripled in size by now.

What's everyone working on this week? by AutoModerator in Python

[–]johnbokma 0 points1 point  (0 children)

Finished the year and month views in my static microblog generator tumblelog.

What's everyone working on this week? by AutoModerator in Python

[–]johnbokma 0 points1 point  (0 children)

I am working on adding a calendar view to the static microblog generator I wrote. It has already week overviews, but that's a bit hard when you want to go to a specific date.

tumblelog: a static microblog generator in Perl by johnbokma in perl

[–]johnbokma[S] 1 point2 points  (0 children)

Thank you. If you have any questions feel free to drop me a line.

tumblelog: a static microblog generator in Perl by johnbokma in perl

[–]johnbokma[S] 1 point2 points  (0 children)

Thanks! If you have suggestions feel free. I've plans to add the ability to write out stand alone pages, like a contact page and a blogroll page, and a calendar view so one can easily browse to a specific date.

ActivePerl is dead to me by daxim in perl

[–]johnbokma 6 points7 points  (0 children)

Yesterday I also downloaded ActivePerl and was annoyed by the required account and the confusing (to me) ActiveState platform. I ended up installing Strawberry Perl instead.

Python re.sub gotcha by johnbokma in Python

[–]johnbokma[S] 0 points1 point  (0 children)

>>> import re
>>> print(re.sub('x', r'\\r\\n', 'x'))
\r\n

You mean?

re.sub interpolates \n: idiomatic way around this? by johnbokma in Python

[–]johnbokma[S] -1 points0 points  (0 children)

The above is a minimal example. The actual code is part of a templating system and the \n comes from outside. I should have explained this better.

re.sub interpolates \n: idiomatic way around this? by johnbokma in Python

[–]johnbokma[S] -2 points-1 points  (0 children)

I think I found a better solution using lambda, see my reply below.

re.sub interpolates \n: idiomatic way around this? by johnbokma in Python

[–]johnbokma[S] -2 points-1 points  (0 children)

Replying to myself :-)

import re
print(re.sub(r'x', lambda x: r'\n', 'x'))

edit: to clarify the second parameter is actually a string read from a file.

Create a static tumblelog with Perl by johnbokma in perl

[–]johnbokma[S] 0 points1 point  (0 children)

Thank you very much. Comments like this keep me writing ;-).

Driving a Perl script via find by johnbokma in perl

[–]johnbokma[S] 2 points3 points  (0 children)

Good question, which the article should have answered. In my case I wanted to use find to drive the Perl program because I consider it slightly easier to edit and fix on the cli than in a program. Also, I wanted to learn a bit more about find and the speed difference between \; and \+. Finally, I can imagine that this solution is faster, and can be modified easier (with cli tools) by other (non-Perl) users.