连接nebu发布实用程序

nebuchadnezzar的Python项目详细描述


cnx nebu发布实用程序

这是一个与连接内容交互的命令行接口。这些工具主要用于将内容发布到cnx.org网站。

此软件需要:

  • python>;=3.5
  • libmagic(Linux上的libmagic1)
  • Jre=6

安装

  1. 安装python3(在OSX上,您可以运行brew install python3
  2. 在终端中运行pip3 install --upgrade pip setuptools以升级python工具
  3. 确保安装了libmagic(在linux上是默认的,在osx上使用brew install libmagic
  4. 在终端中运行pip3 install nebuchadnezzar
  5. 运行neb --help以验证应用程序是否已安装

开发

安装

  1. 安装python3(在OSX上,您可以运行brew install python3
  2. 确保安装了libmagic(在linux上是默认的,在osx上使用brew install libmagic
  3. 安装virtualenv(在OSX上,您可以运行pip3 install virtualenv
  4. 初始化python虚拟环境:
    1. virtualenv ./venv/ --python=python3.5
    2. source ./venv/bin/activate
    3. pip3 install --upgrade pip setuptools
    4. python setup.py develop或(最好)pip3 install -e .

开发人员运行

  1. 打开新终端
  2. source ./venv/bin/activate
  3. 现在您可以运行各种命令:
    • neb --help获取有关各种命令的帮助

测试

运行所有测试:make test

运行名为test_mainmake test ---k test_main

的单个测试

配置编辑器

准备

  1. 安装https://atom.io

安装(自动atom配置)

  1. 启动Atom
  2. 安装linter-autocomplete-jing
  3. 键入<;kbd>;<;kbd>;+<;kbd>;,<;kbd>;(对于Mac)打开“设置”(或单击菜单栏中的atompreferences…
    1. 单击左侧的install
    2. 输入linter-autocomplete-jing,然后单击安装
    3. alternative:从命令行运行apm install linter-autocomplete-jing
  4. 运行neb atom-config注意:这将覆盖您的atom配置文件。如果您希望自己更新配置文件,请参阅下面的“手动atom配置”。
  5. 重新启动Atom
  6. 打开一个完整的拉链。(我从终端运行atom ~/Downloads/col1234_complete
  7. 通过打开一个index.cnxml文件并在文件中的某个位置键入<figure>进行验证。你应该在标签旁边看到一个红色的标记,上面写着RNG: element "figure" missing required attribute "id"

手动atom配置

仅当您没有运行上面的neb atom-config时,此步骤才是必需的。完成此步骤后,从“重新启动Atom”步骤继续执行上述说明。

通过单击菜单栏中的atomconfig并复制和粘贴下面的(note:缩进很重要):

"*":
  core:
    customFileTypes:

      # Add this to the bottom of the customFileTypes area.
      # Note: Indentation is important!
      "text.xml": [
        "index.cnxml"
      ]


  # And then this to the bottom of the file
  # 1. Make sure "linter-autocomplete-jing" only occurs once in this file!
  # 1. make sure it is indented by 2 spaces just like it is in this example.

  "linter-autocomplete-jing":
    displaySchemaWarnings: true
    rules: [
      {
        priority: 1
        test:
          pathRegex: ".cnxml$"
        outcome:
          schemaProps: [
            {
              lang: "rng"
              path: "~/.neb/cnxml-validation/cnxml/xml/cnxml/schema/rng/0.7/cnxml-jing.rng"
            }
          ]
      }
    ]

许可证

本软件受GNU Affero通用条款的约束 公共许可3.0版(AGPL)。有关详细信息,请参见LICENSE.txt。 版权所有(c)2016-2018赖斯大学

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Android上已连接音频输入设备的java列表   java是创建类的新对象还是使用静态方法?   Java:Shift/Rotate对象数组   Java Casting ArrayIterator<Object>   在java中返回布尔值时出错   无法确定文本文件读入程序(java)中的各种元素   Java Swing JToolBar   JAVAlang.IllegalStateException执行Ghost4J(Linux 32对64位)   jvm如何增加ubuntu系统的java堆化?   java CORS策略“AccessControlAllowOrigin”(Anguar 8和Servlet)   使用dagger 2的java视图依赖项注入   单元测试中RxJava的java模拟活动生命周期   arraylist中的Java打印字符串   java返回值显示为0.0。为什么会这样?   java是clientserver应用程序所必需的MVC吗?   ByteToMessageDecoder类中的java内存泄漏   java将大量文档写入firestore   GWT项目中的java TomcatMaven插件。两者之间的区别是什么:org。科德豪斯。魔咒和组织。阿帕奇。公猫maven插件   java swing:向JTree项添加自定义图形按钮