kphoen/doctor

此包已被弃用且不再维护。未建议替代包。

元数据提取变得简单

dev-behat 2015-03-19 20:24 UTC

This package is auto-updated.

Last update: 2022-02-01 12:45:30 UTC


README

元数据提取变得简单。

此库目前支持以下格式

  • 与Word相关的:odt, doc, docx, rtf;
  • pdf;
  • markdown.

状态

该项目已弃用,不应使用。

如果有人神奇地出现并想要维护此项目,我将很高兴提供对此仓库的访问权限。

使用

$wordExtractor = new \Doctor\Extractor\Word();

$doctor = new \Doctor\Doctor([
    $wordExtractor,
]);

var_dump($doctor->extract('sample_word.docx'));
/*
array(5) {
  'author' =>
  string(7) "Kévin "
  'title' =>
  string(13) "Title"
  'creation_date' =>
  class DateTime#6 (3) {
    public $date =>
    string(26) "2015-03-15 16:00:44.000000"
    public $timezone_type =>
    int(3)
    public $timezone =>
    string(12) "Europe/Paris"
  }
  'keywords' =>
  array(1) {
    [0] =>
    string(4) "test"
  }
  'content' =>
  string(0) ""
}
*/

许可证

此库在MIT许可证下。