Slaven Rezić > WE_Framework-0.097_03 > we_import_content

Download:
WE_Framework-0.097_03.tar.gz

Annotate this POD

Source  

NAME ^

we_import_content - import content previously created by we_export_content

SYNOPSIS ^

     we_import_content [-newlang|lang lang] [-checkonly] [-rootclass class]
                       [-v] [-f] importdir datadestdir

DESCRIPTION ^

Import content files from importdir (which was formerly created by we_export_content) to a datadestdir (which is a path to a we_data directory).

Caution: please make a backup from datadestdir before using this command!

OPTIONS

-newlang

Set import data to specified language, otherwise use language information from import files.

-checkonly

Do only the checks and exit.

-rootclass

Class of root db (default: WE_Singlesite::Root).

-v

Be verbose.

-f

Force execution if some checks fail, otherwise ask interactively.

EXAMPLES ^

For translation purposes the XMLText export is recommended. Here's an example to export the whole content tree, to be translated from german to english:

    we_export_content -oldlang de -newlang en -dumpformat XMLText ..../we_data /tmp/translation
    # edit the files in /tmp/translation
    we_import_content /tmp/translation ..../we_data

(Old example, do not use anymore XXX:)

Export the content tree for translation (here: translate from german to english) and re-import it. The language de is used as a template for the new language en.

    we_export_content -oldlang de -newlang en -dumpformat XML ..../we_data /tmp/translation
    # edit the files in /tmp/translation
    we_import_content /tmp/translation ..../we_data

BUGS and LIMITATIONS ^

If there is already content for newlang in the content database, then it is overwritten without warnings.

AUTHOR ^

Slaven Rezic

SEE ALSO ^

we_export_content, WE_Content::Base, YAML.

syntax highlighting: