Package: nebuchadnezzar
CNX Nebu Publishing UtilityThis is a command-line interface for interacting with connexions content. The tools is primarily used to publish content to the cnx.org website.This software requires:Python >= 3.6 <= 3.8libmagic(libmagic1 on Linux)JRE >= 6InstallInstallpython3(on OSX you can runbrew install python3)Runpip3 install--upgradepip setuptoolsin a terminal to upgrade python toolsMake sure libmagic is installed (default on Linux, on OSX usebrew install libmagic)Runpip3 install nebuchadnezzarin a terminalRunneb--helpto verify the application is installedDevelopmentInstallInstallpython3(on OSX you can runbrew install python3)Make sure libmagic is installed (default on Linux, on OSX usebrew install libmagic)Installvirtualenv(on OSX you can runpip3 install virtualenv)Initialize the python virtual environment:virtualenv ./venv/--python=python3.5source ./venv/bin/activatepip3 install--upgradepip setuptoolspython setup.py developor  (preferably)pip3 install-e.Developer RunOpen up a new terminalsource ./venv/bin/activateNow you can run various commands:neb--helpfor help with the various commandsTestingTo run all tests:make testTo run a single test calledtest_main:make test---ktest_mainUsageThere are a few ways to ensurenebattempts to connect with the desired server:Use a configuration fileDon’t use a configuration file, and pass an environment name(Forneb get) Don’t use a configuration file, and pass a specific archive host as an argumentUsing a configuration fileThe CLI will expect a configuration file as either~/.config/nebuchadnezzar.inior as defined by theNEB_CONFIGenvironment variable. You can use this file to configure environment-specific URL values for:url: The environment specific URLarchive_url: The archive endpoint URL (this is optional, and if not provided the tool will construct the URL based upon convention)An example of using both of these values to define atestenvironment:[settings]

[environ-test]
url = https://test.cnx.org
archive_url = https://archive.test.cnx.orgPassing target host as environmentFor theget,publish, andpingcommands, you can specify an environment value in the following forms and avoid a configuration file:Anenvironmentwhere the target host isenvironment.cnx.orgExample:neb publish qa ...will accesshttps://qa.cnx.orgAnenvironmentthat is a FQDN but doesn’t specifiy protocolExample:neb publish qa.cnx.org ...will accesshttps://qa.cnx.orgAnenvironmentthat is a FQDN with protocolExample:neb publishhttp://host.foobar.org...will accesshttp://host.foobar.orgSpecifying archive hostFor thegetcommand, if you need to access an archive host that doesn’t follow thearchive-{environment}convention and also want to avoid using a configuration file, you can use the--archiveargument:Example:neb get vagrant--archivearchive.local.cnx.org ...Configuring an EditorPreparationInstallhttps://atom.ioInstall JavaFor macOS you can install Java by installinghttps://brew.shand then runningbrew install javain a terminal.Install (with automatic Atom config)Start up AtomInstall thelinter-autocomplete-jingpackageType <kbd>⌘</kbd>+<kbd>,</kbd> (for Mac) to open Settings (or clickAtom,Preferences…in the menu bar)ClickInstallin the left-hand-sideEnterlinter-autocomplete-jingand clickInstallAlternative:runapm installlinter-autocomplete-jingfrom the commandlineRunnebatom-config(NOTE:This will overwrite your Atom config file. If you’d prefer updating the config file yourself, see ‘Manual Atom config’ below.)Restart AtomOpen an unzipped complete-zip. (I runatom ~/Downloads/col1234_completeFrom a terminal)Verify by opening anindex.cnxmlfile and typing in<figure>somewhere in the file. You should see a red flag near the tag that saysRNG: element "figure" missing required attribute "id".Manual Atom configThis step is only necessary if you didn’t runnebatom-configabove. After completing this step, resume the instructions above from the ‘Restart Atom’ step.Add the following to your Atom configuration by clickingAtom,Configin the menu bar and copying and pasting the below (NOTE: indentation is important):"*":
  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"
            }
          ]
      }
    ]LicenseThis software is subject to the provisions of the GNU Affero General
Public License Version 3.0 (AGPL). SeeLICENSE.txtfor details.
Copyright (c) 2016-2018 Rice University