[wordpress插件] CSV Importer ImprovedCSV导入器已改进

wordpress 插件 文章 2020-04-06 09:30 422 0 全屏看文

AI助手支持GPT4.0

评分
56
描述

This WordPress plugin imports posts from CSV (Comma Separated Value) files into your

此WordPress插件将CSV(逗号分隔值)文件中的帖子导入到您的

WordPress blog.

WordPress博客。

It can prove extremely useful when you want to import a bunch

当您要导入束时,它可能非常有用

of posts from an Excel document or the like – simply export your document into

Excel文档或类似文档中的帖子–只需将文档导出到

a CSV file and the plugin will take care of the rest.

CSV文件,其余的将由插件负责。

https://wordpress.org/plugins/csv-importer-improved/

https://wordpress.org/plugins/csv-importer-improved/

Features

功能

    • Imports post title, body, excerpt, tags, date, categories etc.
    • 导入帖子标题,正文,摘录,标签,日期,类别等。

    • Supports custom fields, custom taxonomies and comments
    • 支持自定义字段,自定义分类法和注释

    • Deals with Word-style quotes and other non-standard characters using

    • 使用
      以Word样式的引号和其他非标准字符进行交易

      WordPress’ built-in mechanism (same one that normalizes your input when you

      WordPress的内置机制(在您
      时,该机制可以规范您的输入

      write your posts)

    • 写你的帖子)

    • Columns in the CSV file can be in any order, provided that they have correct

    • CSV文件中的列可以任意顺序,只要它们具有正确的

      headings

    • 标题

    • Multi-language support
    • 多语言支持

    This plugin is forked from https://wordpress.org/plugins/csv-importer/ by dvkob

    此插件是dvkob从https://wordpress.org/plugins/csv-importer/派生的

    in order to keep up with changes to the core WordPress.

    为了跟上对核心WordPress的更改。

    This importer writes directly to the database.

    此导入器直接写入数据库。

    It does not go through the internal

    它不通过内部

    WordPress objects for creating posts etc. That may be an advantage to you (it will

    用于创建帖子等的WordPress对象。这对您可能是一个优势(它将

    be faster for large imports) but do be aware of any data integrity issues that may arrise.

    对于大型导入,速度更快),但请注意可能会出现的任何数据完整性问题。

    Only UTF-8 encoding is supported, both with and without Byte Order Marks (BOM).

    仅支持带或不带字节顺序标记(BOM)的UTF-8编码。

    The development repository for this plugin can be found here:

    此插件的开发库可以在这里找到:

    https://github.com/academe/csv-importer-improved

    https://github.com/academe/csv-importer-improved

    Please feel free to raise issues there, and submit pull requests, as well as through

    请随时在此处提出问题,提交请求以及通过

    the normal WordPress channels.

    正常的WordPress渠道。

    Usage

    用法

    Click on the CSV Importer link on your WordPress admin page, choose the

    点击WordPress管理页面上的CSV导入器链接,选择

    file you would like to import and click Import.

    您要导入的文件,然后单击导入。

    The examples directory

    examples 目录

    inside the plugin’s directory contains several files that demonstrate

    插件目录中包含几个演示
    的文件

    how to use the plugin.

    如何使用插件。

    The best way to get started is to import one of

    最好的入门方法是导入
    之一

    these files and look at the results.

    这些文件并查看结果。

    CSV is a tabular format that consists of rows and columns.

    CSV是一种由行和列组成的表格格式。

    Each row in

    每行

    a CSV file represents a post;

    CSV文件代表帖子;

    each column identifies a piece of information

    每列标识一条信息

    that comprises a post.

    包含一个帖子。

    You can create new posts, or update existing posts by supplying the csv_post_id

    您可以通过提供csv_post_id
    创建新帖子或更新现有帖子

    field pointing to an existing post.

    指向现有帖子的字段。

    When updating, all field names you provide

    更新时,您提供的所有字段名称

    in the CSV file will be updated – even if blank – but fields you don’t list at

    CSV文件中的内容会更新-即使为空-但您未在
    列出的字段

    the head of the CSV file will be left intact.

    CSV文件的头部将保持不变。

    Basic post information

    基本信息

      • csv_post_id – optional, used to update an existing post.
      • csv_post_id –可选,用于更新现有帖子。

      • csv_post_title – title of the post
      • csv_post_title –帖子标题

      • csv_post_post – body of the post
      • csv_post_post –帖子正文

      • csv_post_typepost, page or a custom post type.

      • csv_post_type post page 或自定义帖子类型。

        From 0.3.2, csv_post_type column supports custom post types.

        从0.3.2开始, csv_post_type 列支持自定义帖子类型。

        Refer to the WordPress

        请参阅WordPress

        documentation on custom post types for more info

        有关自定义帖子类型的文档以获取更多信息

        on how to set up custom post types.

      • 有关如何设置自定义帖子类型的信息。

      • csv_post_excerpt – post excerpt
      • csv_post_excerpt –摘录

      • csv_post_categories – a comma separated list of category names or ids.

      • csv_post_categories –用逗号分隔的类别名称或ID列表。

        The list must be enclosed in quotes, e.g.

        该列表必须用引号引起来,例如

        “EC > UK, Island”.

        “ EC>英国,岛屿”。

        If a chain of subcategories does not exist, e.g.

        如果不存在子类别链,例如

        Animalia > Chordata > Mammalia

        Animalia> Chordata> Mammalia

        then they will all be created and the post assigned to the end of the chain.

        然后将它们全部创建,并将帖子分配到链的末尾。

        The parent category can also be defined using its id, e.g.
            

        父类别也可以使用其ID定义,例如
            

        42 > Primates > Callitrichidae, where 42 is an

        42>灵长类> Callitrichidae,其中 42

        existing category id.

      • 现有类别ID。

      • csv_post_tags – a “quoted” comma separated list of tags.
      • csv_post_tags –用逗号分隔的标记列表。

      • csv_post_date – most standard formats are supported.

      • csv_post_date –支持大多数标准格式。

        For example, now, 11/16/2009 0:00, 1999-12-31 23:55:00, +

        例如, now 2009/11/16 0:00 1999-12-31 23:55:00 +

        1 week,
            

        1周
            

        next Thursday, last year are all valid.

        下个星期四,去年全部有效。

        For technical

        对于技术

        details, consult PHP's strtotime() function documentation.

        详细信息,请查阅PHP的 strtotime()函数文档

      Custom fields

      自定义字段

      Any column that doesn’t start with csv_ is considered to be a custom field

      任何以 csv _ 开头的列均被视为自定义字段

      name.

      名称。

      The data in that column will be imported as the custom fields value.

      该列中的数据将作为自定义字段值导入。

      All custom fields must be unique.

      所有自定义字段必须唯一。

      Multiple fields with the same name will be

      具有相同名称的多个字段将

      updated to the same value if updating an existing post.

      如果更新现有帖子,则更新为相同的值。

      Prior to version 0.6.0 loading the same field name multiple times to an existing

      在版本0.6.0之前,将相同的字段名称多次加载到现有的

      post would create multiple custom fields.

      帖子将创建多个自定义字段。

      General remarks

      一般说明

        • WordPress pages don’t have categories or tags.
        • WordPress页面没有类别或标签

        • Most columns are optional.

        • 大多数列是可选的。

          Either csv_post_title, csv_post_post or
              

          csv_post_title csv_post_post
              

          csv_post_excerpt are sufficient to create a post.

          csv_post_excerpt足以创建一个帖子。

          If all of these

          如果所有这些

          columns are empty in a row, the plugin will skip that row.

        • 列连续为空,插件将跳过该行。

        • The plugin will attempt to reuse existing categories or tags;

        • 该插件将尝试重用现有的类别或标签;

          if an

          如果

          existing category or tag cannot be found, the plugin will create it.

        • 找不到现有的类别或标签,插件将创建它。

        • To specify a category that has a greater than sign (>) in the name, use

        • 要指定名称中带有大于号(>)的类别,请使用

          the HTML entity >

        • HTML实体>

        Advanced usage

        高级用法

          • csv_post_author – numeric user id or login name.

          • csv_post_author –数字用户ID或登录名。

            If not specified or

            如果未指定或

            user does not exist, the plugin will assign the posts to the user

            用户不存在,插件会将帖子分配给用户

            performing the import.

          • 执行导入。

          • csv_post_slug – post slug used in permalinks.
          • csv_post_slug –永久链接中使用的后。

          • csv_post_parent – post parent id.
          • csv_post_parent –发布父ID。

          Custom taxonomies

          自定义分类法

          New in version 0.3.0

          版本0.3.0的新功能

          Once custom taxonomies are set up in your theme’s functions.php file or

          一旦在主题的functions.php文件或
          中设置了自定义分类法,

          by using a 3rd party plugin, csv_ctax_(taxonomy name) columns can be

          通过使用第三方插件, csv_ctax_(分类名称)列可以

          used to assign imported data to the taxonomies.

          用于将导入的数据分配给分类法。

          Non-hierarchical taxonomies

          非分级分类法

          The syntax for non-hierarchical taxonomies is straightforward and is essentially

          非分层分类法的语法很简单,并且本质上是

          the same as the csv_post_tags syntax.

          csv_post_tags 语法相同。

          Hierarchical taxonomies

          分级分类法

          The syntax for hierarchical taxonomies is more complicated.

          层次分类法的语法更加复杂。

          Each hierarchical

          每个等级

          taxonomy field is a tiny two-column CSV file, where the order of columns

          分类字段是一个很小的两列CSV文件,其中列的顺序

          matters.

          很重要

          The first column contains the name of the parent term and the second

          第一列包含父项的名称,第二列

          column contains the name of the child term.

          列包含子术语的名称。

          Top level terms have to be preceded

          顶级条款必须优先于

          either by an empty string or a 0 (zero).

          可以是空字符串,也可以是0(零)。

          Sample examples/custom-taxonomies.csv file included with the plugin

          插件随附的

          示例 examples / custom-taxonomies.csv 文件

          illustrates custom taxonomy support.

          说明了自定义分类支持。

          To see how it works, make sure to set up

          要查看其工作原理,请确保设置

          custom taxonomies from functions.inc.php.

          functions.inc.php 中的自定义分类法。

          Make sure that the quotation marks used as text delimiters in csv_ctax_

          确保在 csv_ctax _
          中用作文本定界符的引号

          columns are regular ASCII double quotes, not typographical quotes like “

          列是常规的ASCII双引号,而不是“
          ”等印刷引号

          (U+201C) and ” (U+201D).

          (U + 201C)和”(U + 201D)。

          Comments

          评论

          New in version 0.3.1

          0.3.1版的新功能

          An example file with comments is included in the examples directory.

          examples 目录中包含带有注释的示例文件。

          In short, comments can be imported along with posts by specifying columns

          简而言之,可以通过指定列将评论与帖子一起导入

          such as csv_comment_*_author, csv_comment_*_content etc, where * is

          例如 csv_comment _ * _ author csv_comment _ * _ content 等,其中*是

          a comment ID number.

          评论ID号。

          This ID doesn’t go into WordPress.

          此ID不适用于WordPress。

          It is only there

          只有那里

          to have the connection information in the CSV file.

          在CSV文件中包含连接信息。

          Credits

          积分

          This plugin uses php-csv-parser by Kazuyoshi Tlacaelel.<

          此插件使用Kazuyoshi Tlacaelel的 php-csv-parser 。<

          br />

          br />

          It was inspired by JayBlogger's CSV Import plugin

          它的灵感来自JayBlogger的 CSV导入插件

          .

          Contributors:

          贡献者:

            • Kevin Hagerty (post_author support)
            • Kevin Hagerty(作者后支持)

            • Edir Pedro (root category option and tableless HTML markup)
            • Edir Pedro(根类别选项和无表HTML标记)

            • Frank Loeffler (comments support)
            • 弗兰克·洛夫勒(评论支持)

            • Micah Gates (subcategory syntax)
            • Micah Gates(子类别语法)

            • David Hollander (deprecation warnings, linebreak handling)
            • David Hollander(弃用警告,换行处理)

安装步骤

Installing the plugin:

安装插件:

    1. Unzip the plugin’s directory into wp-content/plugins.
    2. 将插件目录解压缩到 wp-content / plugins 中。

    3. Activate the plugin through the ‘Plugins’ menu in WordPress.
    4. 通过WordPress中的“插件”菜单激活插件。

    5. The plugin will be available under Tools -> CSV Importer on

    6. 该插件将在
      的工具-> CSV导入器下可用。

      WordPress administration page.

    7. WordPress管理页面。

下载地址
https://downloads.wordpress.org/plugin/csv-importer-improved.0.6.1.zip
-EOF-

AI助手支持GPT4.0