import_content.pl - import content from a file into a MojoMojo page
script/util/import_content.pl /path/to/page page.markdown
Since this operation is undoable, the script will prompt you to confirm that you really want to replace the contents of the last version of /path/to/page with what's in page.markdown.
Replace the contents of the last version of a page with the content from a file. Useful if you want to fix a typo in a page without bumping the version and creating yet another revision in the database. Of course, can be used for evil, but then so could be a series of SQL commands.
Dan Dascalescu (dandv), http://dandascalescu.com
You may distribute this code under the same terms as Perl itself.
Copyright (C) 2010, Dan Dascalescu.
Return the middle of a string. Examples:
preview('abcdefghijk', 10) 'ab [...] k' preview('abcdefghijkl', 10), "\n"; 'ab [...] l' preview('abcdefghijkl', 11), "\n"; 'ab [...] kl' preview('abcdefghijklm', 10), "\n"; 'ab [...] m' preview('abcdef0000000000ghijklm', 10), "\n"; 'ab [...] m'
To install MojoMojo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MojoMojo
CPAN shell
perl -MCPAN -e shell install MojoMojo
For more information on module installation, please visit the detailed CPAN module installation guide.