Giter Site home page Giter Site logo

nestview-old's People

Contributors

ferbivore avatar

Watchers

 avatar  avatar

nestview-old's Issues

split nestview.html up and set up a build system

See #4.

  • rip out and modularize the JS and CSS needed to render a viewer (see #2)
  • create a template including them, to be used by the Python modules
  • have a script combine and minify them, either at build- or run-time

add --sanitize option to nvxml

Right now, nvxml will gladly take something like this:

<description>
<table> <tr><td> <a href="http://www.reddit.com/r/sysadmin/comments/2gekpj/a_sysadmin_learns_his_network_has_been/"><img src="http://b.thumbs.redditmedia.com/valdQffaCLvBpYSR7xo0UirenADh2TfFpXcoUdIVOMU.jpg" alt="A Sysadmin learns his network has been infiltrated by the NSA (english subs)" title="A Sysadmin learns his network has been infiltrated by the NSA (english subs)" /></a> </td><td> submitted by <a href="http://www.reddit.com/user/tdobson"> tdobson </a> <br/> <a href="http://www.spiegel.de/video/nsa-und-gchq-hoeren-telekommunikationsunternehmen-ab-video-1521330.html">[link]</a> <a href="http://www.reddit.com/r/sysadmin/comments/2gekpj/a_sysadmin_learns_his_network_has_been/">[31 comments]</a> </td></tr></table>
</description>

And turn it into this:

image

The reason being that the HTML viewer uses .innerHTML to create text nodes. Which is great if you want to add in formatting and links in there, but unfortunately there's no way to tell it to use .textContent instead, for situations like this. We need one.

refactor nvcommon's interactive functionality

Right now, opening a server to look at some data looks like this:

from nvcommon import nvServer, nvToTree
nvServer(nvToTree(data))

This is too unpythonic for my tastes. Here's how it should look like:

from nvcommon import NVSimple
NVSimple(data).serve()

You should also be able to so things like .save(filename) or .open().

make the HTML viewer embeddable

Right now, it's a sprawling mess of mashed up HTML and JavaScript. I want to reduce it to something easy to embed in other web apps, callable with something like nestview.viewer(htmlnode, data). Maybe have an API for modifying data on the fly and responding to clicks, so we can have some interactivity.

nestview.Folder: expandable nodes always appear before text nodes

Right now, the way Folder is defined in nestview.py, expandable nodes will always appear before text nodes when exporting. We need a way to mix node types - which is to say, stop differentiating between subfolders and items.

This requires no changes to the viewer.

move nvToTree and nvGenericToFolder into nvbase

nvcommon was started as a library for building nvtree-like command line tools; nvToTree and nvGenericToFolder (which should be renamed nvToFolder, by the way) are broader in scope and belong in nvbase.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.