Comments (5)
Finally figured out how to send the selected HTML to the same web service. I prefer this to introducing new converters for now.
I reran difficode and all the new markdown is in the diffi repo. At first glance, it looks like a big improvement.
Closing this issue. We can open more as needed.
Thanks again for your help here, @lynnyliz.
from difficode.
Initial implementation done but I would prefer top send HTML there instead of sending an URL. Had lots of trouble with POSTING to marky - missing form fields.
from difficode.
Another potential strategy: What if we changed the selectors from "body" to whatever that particular webpage uses to contain its actual policy text? For example, in the Snapchat TOS the policy is contained in a <div class="column">
.
Pros:
-Could select much more specific areas of the page, leaving off changes to head code or footer URLS
-Some websites might even have an id attribute on the div containing their policies! 😮
Cons:
-More work required per added page
-Some pages will probably still have messy HTML resulting in noisy diffs
-Possibly the JSON recipes don't even support specifying classes? I don't have much experience with this kind of setup.
EDIT: Poking around more I see there are already some sites that use an ID (good ol' Google) and that you sure can specify an ID or class selector, so now I've found stuff I can contribute 😃
from difficode.
@weitzman I found another tool that converts inputted HTML to markdown, but I'm not sure what diffibot's capabilities are -- this requires pasting HTML into one text field and then copying the output from another (there's no file export)
But this one may be exactly what we need -- It's a python script that seems able to do the conversion by both importing and exporting relevant files. Looks like you'll be able to feed it a privacy.selected.html and export markdown into privacy.md
from difficode.
@weitzman I think I found a winner: html.md is a node.js library that allows importing a .html file and exporting as .md. I think the command would run like this: htmlmd *.selected.html
. Alas, I don't think there's an option to recursively run it through all subfolders, so we may need to run it in each recipe's respective dir.
Other options that work with node.js are domchristie's To-Markdown and netgusto's upndown, though these seem to only take strings as input.
from difficode.
Related Issues (20)
- (some) bad markdown in Instagram HOT 1
- only one file in linkedin dir HOT 1
- lyft policies won't play nice at ALL -- disable for now HOT 2
- awkward markdown in Twitter
- uber -- bad privacy.hmtl; no terms HOT 5
- bad markdown in facebook HOT 3
- whitehouse -- awkward markdown; no terms HOT 3
- only one file in verizon dir HOT 5
- bad markdown in xfinity HOT 1
- Launch humble web site at diffi.org HOT 2
- only one file in yahoo dir HOT 2
- add recipes for paypal HOT 2
- google: bad markdown, missing privacy.md and privacy.selected.html HOT 1
- Add new recipes
- Wrong HTML in Apple privacy policy
- Save whole page in addition to selected HTML
- Only 1 file in google dir HOT 3
- Only 1 file in lyft dir
- Bad files in xfinity HOT 2
- Bad markdown in yahoo HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from difficode.