ddfreyne changed the topic of #nanoc to: 3.6.4 (may 29th) | web http://nanoc.ws/ | repo http://bit.ly/XE6e3G | issues http://bit.ly/VfXaSV | forum http://ho.io/n-discuss | irclog http://irclog.whitequark.org/nanoc
<summatusmentis> what would be the best way to pull in site background images from flickr? can I refer to @item in a CSS file? would a data source suffice?
<cDlm> css files in content/ are just normal items, you can template them and use helpers
jadd_ has joined #nanoc
jadd_ has quit [Ping timeout: 245 seconds]
<summatusmentis> I don't know that much about helpers, I'm not sure I need them
<cDlm> well you'd need some way to insert the image links in CSS
<cDlm> maybe just via erb
<cDlm> a helper is just a function that does something useful in a template :)
<cDlm> anyway, it's way past bedtime here, good night
jadd_ has joined #nanoc
jadd_ has quit [Ping timeout: 276 seconds]
jadd_ has joined #nanoc
alerante has joined #nanoc
alerante has quit [Remote host closed the connection]
skroon has joined #nanoc
yogsototh has joined #nanoc
jadd_ has quit [Quit: Leaving...]
pepijnde- is now known as pepijndevos
<ddfreyne> summatusmentis: url(<%= @items['/images/somebackground/'].path %>) should work
<ddfreyne> I have no clue what the CSS escaping rules are, so you may need to do some escaping there :)
jadd_ has joined #nanoc
jadd_ has quit [Ping timeout: 245 seconds]
cDlm has quit [Quit: cDlm]
jadd_ has joined #nanoc
rolfb has joined #nanoc
rolfb has left #nanoc ["Linkinus - http://linkinus.com"]
cDlm has joined #nanoc
jadd_ has quit [Ping timeout: 268 seconds]
jadd_ has joined #nanoc
jadd_ has quit [Ping timeout: 256 seconds]
jugglinmike has joined #nanoc
jadd_ has joined #nanoc
pavelkunc has joined #nanoc
alerante has joined #nanoc
misiek_ has joined #nanoc
<bobthecow> ddfreyne: nanoc-asciidoc structure looks good.
<bobthecow> lib/nanoc-asciidoc.rb should require 'nanoc/asciidoc/filter.rb'
<bobthecow> so's it'll work with the auto-require from rubygems
<bobthecow> and the installation instructions (for this and everything else) should be bundler/gemfile-centric.
<bobthecow> so instead of `gem install foo` it should be "add `gem 'foo', '~>1.0'` to your Gemfile and `bundle install`"
jadd_ has quit [Quit: Leaving...]
jadd_ has joined #nanoc
<Skyr> I need some help with a gem/bundler noob question :)
<darix> Skyr: "just ask"
<Skyr> I created a Gemfile for my nanoc site, "bundle install" installed all needed gems (or reused existing ones)
<Skyr> Calling nanoc runs into an error "nokogiri not found", although it is listed in my Gemfile
<darix> Skyr: because the gemfile wont load them for you
<Skyr> What am I doing wrong :)
<darix> it just makes sure you are only loading gems listed in that gem file
<darix> Skyr: also
<darix> bundle exec nanoc
<Skyr> Yes, they get downloaded and land somewhere in $HOME/.gem/...
<darix> might be needed
<darix> no
<darix> they usually end up in the current directory
<darix> in vendor or so
<darix> Skyr: add: require 'nokogiri'
<darix> at the right place
<darix> and run bundle exec nanoc compile
<darix> e.g.
<Skyr> Hm, bundle put them in $HOME/.gem/...
<darix> hm ok
<darix> anywa
<darix> anyway
<Skyr> The "require nokogiri" line is the one causing the error
<darix> Skyr: even with "bundle exec nanoc"?
<Skyr> I suspect I have to add the bundle directory to some search path
<darix> naw
<Skyr> darix: Tryin' right now
<darix> bundler should handle all that jazz for you
<Skyr> ...nope
<Skyr> Didn't work
<darix> you really did bundle install ?
<Skyr> can do it again :)
<darix> does it create a Gemfile.lock ?
<Skyr> All gems get listed as "using...", nokogiri is among them
<Skyr> Gemfile.lock is present
<stbuehler> darix: bundle install without the --path option does not install in the current dir
<Skyr> Just removed Gemfile.lock and ran "bundle install" again...
<Skyr> ...same effect
<darix> stbuehler: well it does by default in rails projects
<darix> might be they trick things
<darix> Skyr: strace -fF -e trace=file bundle exec nanoc comp
<darix> Skyr: strace -fF -e trace=file -s 1024 -o /tmp/bundle.strace.txt bundle exec nanoc comp
<darix> Skyr: also
<darix> .gem/... should be in the default rubygems search path
<darix> so
<summatusmentis> ddfreyne: thanks, I got it figured out. I ended up using a helper to hit the flickr api
<summatusmentis> now it's just a ruby gem that takes a bit to hit the APIs, and my code fails because of it, I've mostly figured it out
<Skyr> Hmmm! Sloooowly getting there... I have nokogiri 1.5.5 installed as system package
<Skyr> bundler says "Using nokogiri (1.6.0)"
<darix> Skyr: then bundler should have installed that too
<darix> Skyr: got the strace?
<Skyr> ...and ~/.gem/ruby/1.9.1/gems/ does not contain a nokogiri folder
<Skyr> darix: Yes
<Skyr> darix: What are you looking for?
<Skyr> (or better to say: What should I be looking for)
<darix> grep nokogiri /tmp/bundle.strace.txt
<darix> it should have a 1.6.0 in there with a successful open on the gemspec no?
<Skyr> yes, found it - /usr/local/lib64/ruby/gems/1.9.1/specifications/nokogiri-1.6.0.gemspec
<darix> that is system gem too i would say
<Skyr> I agree :)
<Skyr> (though not installed via the system's package manager)
<Skyr> But /usr/local/lib64/ruby/gems/1.9.1/gems/ does not include a nokogiri folder
<Skyr> A broken installation of the gem?
<darix> Skyr: could be :)
<darix> remove that gemspec file
<darix> and bundle install
<Skyr> Already running :)
<Skyr> (system is increasing the spectators' tension by building native extensions ;)
<darix> 8)
<Skyr> Not fair :( "LoadError: cannot load such file -- nokogiri/nokogiri"
<darix> Skyr: strace
<Skyr> top stacktrace: ~/.gem/ruby/1.9.1/gems/nokogiri-1.6.0/lib/nokogiri.rb:28:in `require'
<darix> Skyr: ls ~/.gem/ruby/1.9.1/gems/nokogiri-1.6.0/lib/nokogiri/*.so
<Skyr> No so file there
<Skyr> It's in ~/.gem/ruby/1.9.1/gems/nokogiri-1.6.0/lib/nokogiri/ext/nokogiri/nokogiri.so
<darix> Skyr: copy/link the so file to my path
<Skyr> \o/
<darix> what distro is that btw?
<Skyr> darix: That did the trick, thanks!
<Skyr> Sabayon
<Skyr> (Gentoo derivate)
<Skyr> darix: What's _really_ strange: I did the same "bundle install" drill on my server (Sabayon Linux as well)... and there, the .so file ended up at the correct place
* Skyr shakes head
<Skyr> Ok, back to actual nanoc problems :)
<Skyr> Is it possible to create a compile rule which doesn't create an item?
<Skyr> Background: I'd like to create thumbnails of all my images (different representations of the original images)
<Skyr> So I want a compile rule which matches all images, but nothing else
<darix> Skyr: well why would you create the thumbnail and then not save it?
<darix> Skyr: also
<darix> Skyr: maybe you just want a different presentation of the same item?
<darix> :)
<Skyr> darix: My rule looks like: compile '*', :rep => :thumbnail do
<darix> that is mine
misiek_ has quit [Quit: misiek_]
<Skyr> if rep.binary? && ['jpg','png','gif'].include?(item[:extension]) then filter :scaleimage
<Skyr> else nil
<Skyr> "nil" will still create an item...
<darix> i would just skip the else path completely
<darix> and try again
<Skyr> Ok, just saw that in your code... I'll try...
<Skyr> irb tells me that a function without a (defined) return value returns nil
<Skyr> And my unwanted items still appear
<Skyr> Ok, I'll filter them in the route
misiek_ has joined #nanoc
bghost has joined #nanoc
louquillio has quit [Remote host closed the connection]
alerante has quit [Remote host closed the connection]
louquillio has joined #nanoc
alerante has joined #nanoc
bghost has quit [Ping timeout: 264 seconds]
pavelkunc has quit [Quit: Leaving.]
cDlm has quit [Ping timeout: 268 seconds]
misiek_ has quit [Quit: misiek_]
yogsototh has quit [Remote host closed the connection]
bghost has joined #nanoc
bghost has quit [Ping timeout: 246 seconds]
bghost has joined #nanoc
misiek_ has joined #nanoc
cDlm has joined #nanoc
jadd_ has quit [Quit: Leaving...]
jadd_ has joined #nanoc
skroon_ has joined #nanoc
skroon has quit [Ping timeout: 276 seconds]
jadd_ has quit [Quit: Leaving...]
skroon_ has quit [Ping timeout: 256 seconds]
misiek_ has quit [Quit: misiek_]
misiek_ has joined #nanoc
skroon has joined #nanoc
skroon has quit [Ping timeout: 248 seconds]
skroon has joined #nanoc
skroon has quit [Ping timeout: 256 seconds]
bghost has quit [Ping timeout: 264 seconds]
alerante has quit [Remote host closed the connection]
alerante has joined #nanoc
jugglinmike has quit [Quit: Leaving.]