File splitting script
on Apr 21, 2007 at 09:12
|
2 replies
|
by Alien
|
|
A simple script that can be used to split files.
|
txt2docbook 2
on Apr 16, 2007 at 15:14
|
0 replies
|
by Maze
|
|
this guesses the semantic structure from a text document, stripping the line endings and guessing where the paragraph breaks and headers should be.
Good for processing Gutenburg 'plain vanilla ASCII'
version 3 of txt2docbook, modularised ready for expansion
|
txt2docbook 3
on Apr 16, 2007 at 15:08
|
0 replies
|
by Maze
|
|
this guesses the semantic structure from a text document, stripping the line endings and guessing where the paragraph breaks and headers should be.
Good for processing Gutenburg 'plain vanilla ASCII'
this is version 3 of txt2docbook, the obfuscated beyond repair one
|
txt2docbook 1
on Apr 16, 2007 at 15:05
|
0 replies
|
by Maze
|
|
this guesses the semantic structure from a text document, stripping the line endings and guessing where the paragraph breaks and headers should be.
Good for processing Gutenburg 'plain vanilla ASCII'
version 1 of txt2docbook, the original and perhaps simplest to understand
|
Find doubly installed modules
on Apr 01, 2007 at 15:25
|
1 reply
|
by Sixtease
|
|
Run this script from the perllib directory, where vendor_perl and site_perl directories reside. (in my case it's /usr/lib/perl5)
The script will output the modules (.pm files) located in both subdirs.
The branch (site_perl or vendor_perl) will be output for the older module
(which you thus might want to remove).
|
B::Concise -> Prolog
on Apr 01, 2007 at 14:13
|
1 reply
|
by diotalevi
|
|
This tool translates the default output of B::Concise into Prolog. The basic predicates are optree/1 which contains an optree and opcode/4. Sample input: Blarg::Floop::connections
B::Concise::compile(CODE(0x8220bf0))
h <1> leavesub[23 refs] K/REFC,1 ->(end)
- <@> lineseq KP ->h
1 <;> nextstate(Common::Blarg -1428 Blarg.pm:172) v ->2
- <0> ex-const vP/4 ->2
2 <;> nextstate(Common::Blarg -1426 Blarg.pm:173) v ->3
- <1> null K/1 ->-
7 <|> cond_expr(other->8) K/1 ->i
6 <2> eq sK/2 ->7
4 <1> rv2av[t2] sK/1 ->5
3 <$> gv(*_) s ->4
5 <$> const(IV 2) s ->6
g <2> sassign sKS/2 ->h
- <1> ex-aelem sK/2 ->9
- <1> ex-rv2av sKR/1 ->-
8 <$> aelemfast(*_) s/1 ->9
- <0> ex-const s ->-
f <2> aelem sKRM*/2 ->g
d <1> rv2av[t3] sKR/1 ->e
c <2> aelem sKM/DREFAV,2 ->d
9 <0> padav[@stuff:FAKE] sR ->a
b <1> rv2sv sK/1 ->c
- <@> scope sK ->b
- <0> ex-nextstate v ->a
- <1> ex-aelem sK/2 ->-
- <1> ex-rv2av sKR/1 ->-
a <$> aelemfast(*_) s ->b
- <0> ex-const s ->-
e <0> padsv[$attrib_num:FAKE] s ->f
o <2> aelem sK/2 ->h
m <1> rv2av[t5] sKR/1 ->n
l <2> aelem sKM/DREFAV,2 ->m
i <0> padav[@stuff:FAKE] sR ->j
k <1> rv2sv sK/1 ->l
- <@> scope sK ->k
- <0> ex-nextstate v ->j
- <1> ex-aelem sK/2 ->-
- <1> ex-rv2av sKR/1 ->-
j <$> aelemfast(*_) s ->k
- <0> ex-const s ->-
n <0> padsv[$attrib_num:FAKE] s ->o
Sample output optree( opcode( leavesub, '23 refs', opcode( lineseq, '', opcode( nextstate, 'Common::Blarg -1428 Blarg.pm:172', [], opcode( ex_const, '', [], opcode( nextstate, 'Common::Blarg -1426 Blarg.pm:173', [], opcode( null, '', opcode( cond_expr, 'other->8', opcode( eq, '', opcode( rv2av, 't2', opcode( gv, '*_', [], [] ), opcode( const, 'IV 2', [], [] ) ), opcode( sassign, '', opcode( ex_aelem, '', opcode( ex_rv2av, '', opcode( aelemfast, '*_', [], [] ), opcode( ex_const, '', [], [] ) ), opcode( aelem, ' sKRM*', opcode( rv2av, 't3', opcode( aelem, '', opcode( padav, '@stuff:FAKE', [], opcode( rv2sv, '', opcode( scope, '', opcode( ex_nextstate, '', [], opcode( ex_aelem, '', opcode( ex_rv2av, '', opcode( aelemfast, '*_', [], [] ), opcode( ex_const, '', [], [] ) ), [] ) ), [] ), [] ) ), [] ), opcode( padsv, '$attrib_num:FAKE', [], [] ) ), [] ) ), opcode( aelem, '', opcode( rv2av, 't5', opcode( aelem, '', opcode( padav, '@stuff:FAKE', [], opcode( rv2sv, '', opcode( scope, '', opcode( ex_nextstate, '', [], opcode( ex_aelem, '', opcode( ex_rv2av, '', opcode( aelemfast, '*_', [], [] ), opcode( ex_const, '', [], [] ) ), [] ) ), [] ), [] ) ), [] ), opcode( padsv, '$attrib_num:FAKE', [], [] ) ), [] ) ) ), [] ), [] ) ) ) ), [] ), [] ) ).
|
Decompile swathes of perl to B::Concise
on Apr 01, 2007 at 14:08
|
0 replies
|
by diotalevi
|
|
I needed a tool to pass large bodies of code through B::Concise. This tool does just that. If your code is already loaded by perl, this tool can search down through your specified namespace and dump all the code out.
|
Use your Vim colorscheme in perlmonks syntax highlighting
on Mar 25, 2007 at 19:10
|
0 replies
|
by pKai
|
|
When I read about Free Nodelet hack: Syntax colouring I was (and still am) somewhat sceptical about the usefulness.
For the very least that highlighting has to resemble my Vim colorscheme. ;-)
So I wrote the following to read my (custom) color scheme file and create a corresponding CSS to be used with the "jaap" variation Corion supplied.
Disclaimer: This is far from a full-fledged vimscript parser/interpreter. It just reads a color scheme (try "zellner.vim" it should at least work with that) with the diamond operator and only "knows" about the "highlight" command from Vim. I hope it interprets at least this reasonably close to Vim's implementation.
If you actually produce something useful with if you have to host that CSS file somewhere and refer to it instead of the file Corion provided on his own site.
Update: Added some minimal comments.
As you might deduce from the questions in there, I'm not
really a vimscript programmer. And I also didn't bother to mock
with my vim files to test those. :-(
|
small script to make mp3 filenames more command line friendly
on Mar 22, 2007 at 14:37
|
1 reply
|
by jonsmith1982
|
First post in this section...
takes database from amarok and replaces (\s'"\._) with - in the title and artist names to mv the old mp3 to title.'_'.artist.mp3
not the best description i know but make a backup of your music dir and test it :)
let me know how it goes thanks.
|
Building a data Hierarchy
on Mar 20, 2007 at 07:54
|
3 replies
|
by SlackBladder
|
|
Firstly, most of the code was donated by "Graff", however, I want to make it available to all as it works very well.
This code connects to a SQL Server machine, extracts the data via a query and works out hierarchical data structures (if any exist) within a dataset of two columns of data. It's pretty fast (currently extracts over 7000 records from a SQL Server system and builds the hierarchy within around 3 to 4 seconds). I have replaced "company" specific data.
|
|