ddfreyne changed the topic of #nanoc to: 3.6.3 (apr 24th) | 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
bghost has joined #nanoc
pavelkunc has quit [Ping timeout: 252 seconds]
pavelkunc has joined #nanoc
cDlm has quit [Quit: cDlm]
pavelkunc has quit [Quit: Leaving.]
bghost has quit [Quit: leaving]
cDlm has joined #nanoc
hakunin has quit [Remote host closed the connection]
kitallis has joined #nanoc
rolfb has joined #nanoc
cDlm has quit [Quit: cDlm]
yogsototh has joined #nanoc
cDlm has joined #nanoc
pavelkunc has joined #nanoc
blinry has joined #nanoc
<blinry> hi! quick question: i have a directory of files without extension. how do i accomplish to treat them as non-binary files?
<cDlm> blinry: I think you will have to put them all in the list
<darix> blinry: add rules for them?
<cDlm> rules don't control binaryness
<darix> hm
<darix> cDlm: so in which list does he have to put it then?
<cDlm> hopefully the preprocess block can work a bit better
<cDlm> I was thinking text_extensions
<cDlm> but the preprocess block is way better
<blinry> the binaryness is determined in .../filesystem.rb while the items are read. i cannot find any way to change it later.
<cDlm> in preprocess
<blinry> i tried setting ite[:extension] = "whatever" there, but i think that's already too late ;-)
<blinry> *item
<cDlm> iterate over these items (you know how their identifiers will look) and change the @binary attribute
<cDlm> I'm guessing there is no accessor, though, so you will have to bypass encapsulation
<blinry> how so?
<cDlm> some_item.instance_eval { @binary = false } # yuck, but hopefully that does the trick
<blinry> oh my ^^
<cDlm> I just read that in George Takei's voice
<blinry> the attribute is called @is_binary. now i'm getting a nil error in an erb context
<cDlm> yes
<cDlm> the constructor sets a different attribute depending on the value of @is_binary
<cDlm> so you'll have to recreate and replace all items
<cDlm> another solution would be to make your own subclass of the datasource that creates those items correctly in the 1st place
<blinry> that would probably be the easiest solution
<darix> or
<darix> maybe
<darix> just rename them?
<darix> (:
<cDlm> ah if the file names are not a strong constraint, of course
<blinry> i have a system in place that handles directories of plain text files, with [Links] between them, like a wiki: https://github.com/blinry/vimboy
<blinry> i thought, maybe there was a simple way doing what i wanted. but then i'll have to make some modifications on either end ;-)
<blinry> thanks for your help, and again, thanks for creating/maintaining this awesome piece of software <3
<cDlm> check with ddfreyne, I think this is changing in nanoc 4
<blinry> ah, you can add null to the text_extensions array, which turns into nil, which matches the actual file extension :D
<cDlm> :D
cDlm has left #nanoc [#nanoc]
cDlm has joined #nanoc
<ddfreyne> Hmmm... that is annoying
<ddfreyne> nanoc 4.x will be nicer in that regard anyway :)
<blinry> the binaryness will not be determined by file extension? or, can be dependent on the item's identifier?
<cDlm> I think the goal is to make it irrelevant
<ddfreyne> blinry: Not sure yet ;)
<ddfreyne> blinry: What you can do, is give the files an extension in content/ and then chop off the extension when routing
<blinry> yep, but "no extension in content/" is a hard requirement. the "null" hack works good enough ;-)
<blinry> ty all!
blinry has quit [Quit: Page closed]
jugglinmike has joined #nanoc
bghost has joined #nanoc
rolfb has quit [Quit: Leaving...]
bghost has quit [Ping timeout: 256 seconds]
bghost has joined #nanoc
kitallis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
bghost has quit [Read error: Connection reset by peer]
bghost has joined #nanoc
rolfb has joined #nanoc
cDlm has quit [Ping timeout: 246 seconds]
hakunin has joined #nanoc
cDlm has joined #nanoc
xo__ has joined #nanoc
Segismond_ has quit [Ping timeout: 256 seconds]
yogsototh has quit [Ping timeout: 246 seconds]
rolfb has quit [Quit: Linkinus - http://linkinus.com]
LBo has quit [Ping timeout: 245 seconds]
LBo has joined #nanoc
bghost has quit [Ping timeout: 264 seconds]
bghost has joined #nanoc
alerante has joined #nanoc
alerante has quit [Remote host closed the connection]
<guardian> ddfreyne: hi
<guardian> ddfreyne: will nanoc 4 have postprocess?
<ddfreyne> guardian: Yes!
<ddfreyne> I'm not sure in what form yet, but it will be useful for e.g. feeding a search engine
<guardian> or gzipping stuff
<ddfreyne> gzipping will not need postprocess
<guardian> yeah I see
<ddfreyne> So you'll be able to say
<ddfreyne> compile '*' do
<ddfreyne> ...
<ddfreyne> write item.identifier.with_ext('html')
<ddfreyne> filter :gzip
<ddfreyne> write item.identifier.with_ext('gz')
<ddfreyne> end
<ddfreyne> For instance
bghost_ has joined #nanoc
bghost has quit [Read error: Connection reset by peer]
jugglinmike has quit [Quit: Leaving.]
cDlm has quit [Quit: cDlm]
louquillio has quit [Remote host closed the connection]
bghost_ is now known as bghost