ferbivore / nestview-old Goto Github PK
View Code? Open in Web Editor NEWHTML viewer for nested content, Python library and tools.
License: MIT License
HTML viewer for nested content, Python library and tools.
License: MIT License
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:
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.
NVSimple
, or rather nvToFolder
, seems to be unable to preview instances of NVSimple
or NVCommon
. Instances of other objects (that I've tested) work fine.
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()
.
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.
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.