Hi, this is my first post. I decided to start a project about a week ago to write my own blogging software that used some of my favorite technologies including Mako, Git, and rST/Sphinx. A colleague of mine pointed me to Blogofile which had most of what I wanted aside from the rST/Sphinx integration.
Hacked on it a bit over my vacation this weekend and finally have something working. It’s certainly not ready for the mainstream yet. The following things will require work:
Headings/Sections. No matter what I do, they convert into <h1/> tags if I only have on heading on a page
Cross-referencing posts properly
Ability to use :date: metadata tag instead of :post_date: (need to look into this)
Getting rid of some spninx artifacts like the TOC, and the index file which aren’t being used
Would like to define the table such as
Hello World ===========
Instead of :title: Hello World
A tighter integration with Blogofile
I believe the latter will require a custom Sphinx builder. That will probably fix most of the other problems too, but seems rather intensive right now.
Currently, I am building with the JSONHTMLBuilder() by calling the Sphinx() class directly.
I then take the .fjson files and output them into .html format for Blogofile, prepending the metadata as the standard YAML.
Well, I am on a flight right now, and have to go straight to work, but when I get home I suppose I will post a git repo of what I have so far as a proof of concept.
I’d also like to convert my current wordpress blog to blogofile ASAP and put this on the internet.
The Sphinx Advantage¶
Some of you who are familiar with Blogofile might be wondering why I’m going through the effort of adding yet another wiki markup format to Blogofile when there’s already Markup and Textile (I believe).
- I like Sphinx and am familiar with it
- It will work great for doing technical writeups.
- Love the pygments integration (I know Blogofile has it)
- Cross-referencing other projects documented in Sphinx
- Including source files in postings instead of cutting & pasting snippets.
- Easily extensible with custom directives
Before I start evangelizing it more, I will eat my own dogfood ;).
Here’s what some of this file looks like:
:title: Hello World :post_date: 2009/09/21 10:05:17 :tags: blogofile :categories: Software :author: Mike Lewis .... The Sphinx Advantage ^^^^^^^^^^^^^^^^^^^^ Some of you who are familiar with Blogofile might be wondering why I'm going through the effort of adding yet another wiki markup format to Blogofile when there's already Markup and Textile (I believe). * I like Sphinx and am familiar with it * It will work great for doing technical writeups. * Love the pygments integration (I know Blogofile has it) .... Here's what some of this file looks like:: :title: Hello World :post_date: 2009/09/21 10:05:17 :tags: blogofile :categories: Software
Pretty meta, huh?
Other Plans for my Blogofile¶
Albeit a ruby project, I am in love with SASS. If you’re not familiar, it’s pretty much programmable CSS. It almost makes CSS tolerable. That’s a bold claim I know, but try it.
With Compass, it’s pretty easy to integrate into most projects. I’m currently using it in a couple Pylons projects (blasphemy, I know).
It should only be a few minutes to throw it in here, but then I will be forced to style it.
I started a new full-time job yesterday, and now I am a Rails developer full time. Anyways, I still have a passion for Python and Pylons, and miss it a bit already, but I want to make a series of blog posts once or twice a week comparing and contrasting the Pylons stack I use with Rails. I'll try to be objective as I can, and at least admit it when I'm not.
It's been a while, so I thought I'd start off slow with a little tidbit I busted out today.
Here's the problem:
Say I have
def foo(b, c): ...and
def bar(a, b, c, *args, **kwargs): ...and
def baz(*args, **kwargs): ...
And I want to write a decorator or something that intercepts the variable b before it hits the function.
How am I supposed to know which one is b when it's different positions in each function, or could even be a kwarg?
I have my decorator right here:
from decorator import decorator @decorator def lol_dec(fn, *args, **kwargs): ...
I figured the best solution would be moving the args that could be named intoto the kwargs. It took me a bit of digging until I came across the inspect module, but it worked, and can work for you.
from inspect import getargspec def fudge_args(fn, args, kwargs): #TODO once we all use 2.6 change it to following #fn_args = getargspec(fn).args fn_args = getargspec(fn)It's as easy as that. We just take the list of args from the ArgSpec, zip it up with the list of ordered arguments (args). Add them to a copy of kwargs. Note, we're only returning args that were left over after the zip.
new_kwargs = dict(zip(fn_args, args)) new_kwargs.update(kwargs)
return args[len(fn_args):], new_kwargs
It's used like so:
@decorator def lol_dec(fn, *args, **kwargs): args, kwargs = fudge_args(fn, args, kwargs) kwargs['b'] = kwargs['b'] * 3 return fn(*args, **kwargs)
I'm a software engineer as you may or may not know. Sometimes, though, I feel a bit unfulfilled after work because I don't make anything. You can't see what I do, you can't touch what I do at work. It's database software. People think it's boring.
Anyways, I think I've figured out how to fill the void.
I'm starting a clothing brand or site or whatever you want to call it called Muffin Castle with my girlfriend, Marisa. She does the art, and I do pretty much everything else. It's more or less an excuse for me to play with ecommerce, screen printing, trying a turn at marketing something, and maybe get a few shirts out of it. I'm hoping more to just get this hobby to pay for itself versus making money (although making a few bucks for my hard work wouldn't hurt).
I also get the chance to use drupal, which is in PHP and I frown upon PHP. It does have a lot of momentum and seems fairly easy to hack. Eventually I'd like to roll a site with Pylons, but that's going to be a later date when I get a lot of free time on my hands.
I'd like you all to check out muffincastle.com in the coming month or so because we'll be going live January 1st.
You can follow muffincastle on twitter to see what we're up to. We should have our first round of production shirts done this weekend so stay tuned for photos. You can find some of our "beta" work and prototypes here (our real shirts will look a lot more finished :))
Perhaps I'll be wrong, but I don't think Apple will ever include blu-ray support on any of their products, with the small exclusion of MAYBE the Mac Pro.
Why? It's simple. Apple wants to drive sales of their iTunes store, especially the HD movies. Analysts that say it's because it's "about the price," are either uninformed or in bed with Apple. If there wasn't a video iTunes store, Apple would love having Blu-Ray as an option for a premium. Hell, until a year or so ago, you had to pay extra to have a DVD burner (the super drive as they call it) on the lower end MacBooks and iMacs.
Quote from forbes:
Another surprise, however, was that Apple's new machines don't incorporate support for Blu-ray. When asked about the move, Jobs simply called the optical disc technology a "bag of hurt."Right, right, all about the price. Price of what? Price of Apple allowing a bit of competition to their HD offerings?
Analysts agreed. For now, excluding Blu-ray is all about the price.
I've had my Grado SR80s for about a year and a half now, and they have been no less than awesome since I got them. Unfortunately, the tip of the 3.5mm TRS plug broke off when I tried bending it back into place. This was a good excuse for an overhaul on the headphones because I have had a lot of modding ideas brewing for a while, especially after I saw this article about adding 2.5mm sub-mini jacks to the earcups. I also just recently got the sen 414 earpads and did the reverse quarter mod... which added a bit of color, so I figured, why not more?
So let's get started. All these pictures were taken post-mortem unfortunately, but I will try to explain the process.
First, we start after removing the earcups from the headband, and removing the earpads. We have to open up the earcup which isn't that easy. Some things I read suggested submerging in hot water, or using a blow dryer or just simple prying it apart. None of them worked so well, so I figured out a better way to do it. It requires two larger flat-head screwdrivers (the lower one seen in the picture could probably be substituted for a butter knife)
What I'm doing in the above picture is using the larger driver as a base and rotating the smaller one clockwise which creates sufficient force to separate it. The lower screwdriver allows the upper one to rotate without scraping the plastic. Once I figured this out it took no more than 30 seconds per earcup to separate.
Now is a good time to paint or mod the outer enclose if you desire.
After opening I clipped the the cable about 7mm after the zip tie and then stripped the outer insulation. Then I soldered the inner wires to the 2.5mm jack. I had to make the jack fit in the earcup, so I hadto file the slot down vertically so the jack's enclose wasn't higher than the plastic for the earcup. I then screwed it into place with the set screw (I didn't even need to hot glue it, but it most likely is dependent upon the jack.
After that, I added the 2.5mm sub-mini plug to the other end of the cable that I snipped. Blue is ground FYI.
Repeat for the other earcup.
The outer enclosure will require some modification to make the 2.5mm plug connect flush to the jack, as well as it fit over the set screw for the jack. I recommend using a file and exacto knive. My worksmanship isn't top notch, but I will probably give it another coat of paint eventually.
After that, you can put the cover back on. It might look something like this.
Since my original problem was the plug, I also put a new plug on the end. I filed it down to be able to fit into my iPhone. It's a little ugly, but it gets the job done and I hate those iPhone adaptors.
Here are some more photos of the finished product.
I plan on making a new cable or two for them once this fancy stuff I got from eBay arrive. I'll update the post once it comes. I ordered most of the parts from mcm electronics. They seemed to have the best catalog and selection of 2.5mm plugs/jacks.
Just a quick update. We decided on the date. BarCampBay will be held the weekend of November 8th & 9th.
Yeah, yeah, the GG bridge is a bit cliche, but I think it looks a kinda snappy.
Anyways, the BarCampBay wiki page can be found here: http://barcamp.org/BarCampBay
We're still in need of sponsors, a venue, volunteers, and maybe an organizer or two, so if you can help, send an email to email@example.com
I'm not one to rave about retailers or services, but I feel like doing so because of the contempt I've been accumulating for Amazon, eBay, and PayPal.
First, let's talk about Google Checkout... It's fast as hell, saves my preferences, and whatnot. Since it saves my addresses, I don't need to individually register for each reseller. It's also a common interface for each reseller as well, so I know where to click and stuff. I loathe using PayPal. It's slow as a sloth. Just logging in takes forever. Also, I don't like transferring from my bank account with PayPal, and it won't let you set a credit card to default. I know it's in their best interest, but not in mine or a general consumer. If you've ever had to dispute with a seller, it's a whole lot easier going through the credit card company than PayPal. Also, checking out takes several clicks, and it's not a very intuitive interface. There's times where I thought I was finished paying for something, but I didn't click the one last confirm button.
Let's move on to Buy.com. Sure, it's nothing special, but they do use google checkout and have some pretty good deals. Also, they don't mess around with shipping like Amazon does. Sure, amazon has free super saver shipping, but what good is that if they hold your package for 5 days until they ship it. They're certainly not doing it because it would cost them more to ship it in the next day or two. With Buy.com they ship it fast, and have fair or free shipping prices. I ordered a package yesterday and got it today. Also, there's no misleading crap to trick me into purchasing Amazon Prime-like service with one click. I know it's gotten a lot of flack on resellerraitings.com, but the 3 or 4 purchases I've made from them had been quick and easy.
I've been thinking for a while about planning a general BarCamp for the bay. I finally got around to contacting some people and it seems like there would be sufficient interest.
The date we have chosen is the last weekend in October. We don't have anything more than that, so I'll update the blog/wiki/stuff when more stuff is decided.
For now if you want, follow BarCampBay on twitter. Also, we're still need in volunteers, so if you're interested, drop me an email at mikelikespie [ at ] gmail.
Next Page »