Giter VIP home page Giter VIP logo

list-to-json's Introduction

Introduction

The goal is to write something in javascript that can read a list from a website and parse it to JSON. It will also be able to parse JSON to JSON.

list to JSON

The user can enter a url. They then get options on how to interpret this list and how to save this to JSON in the way they want.

JSON to JSON

The user can enter a url. The url provided must give valid JSON back. They then get options on how to interpret this JSON and how to save this to JSON in the way they want.

Why I created this

I originally created this to help me with making my color game. For my color game I need(ed) a JSON file with color names and codes. The site kleurenwaaier.nl has a huge list of colors. So to easily turn that into a JSON file I started this project. I thought this was a great learning project since I have very little expirience in JavaScript and no expirience in Node.js.

How to run

  1. Run npm install.
  2. Rename .env.example to .env and fill in the variables.
  3. Add SSL certificates named list-to-json.key & list-to-json.crt in the root folder.
  4. Run the following commad:
    • on MacOS or Linux DEBUG=list-to-json:* npm start.
    • on Windows Command Prompt SET DEBUG=list-to-json:* & npm start
    • on Windows PowerShell $env:DEBUG='list-to-json:*'; npm start
  5. Go to https://localhost:3000/ or the port number you defined.

โ˜•/๐Ÿต break

Somtimes you need a quick break to restore your epic coding skills. So click here and get suprised by a random post everytime you click.

list-to-json's People

Contributors

dustessavdh avatar dependabot[bot] avatar

Stargazers

Lukas van den Berk avatar

Watchers

 avatar

list-to-json's Issues

Possible features

Right now it's hard coded for 1 website, but with some changes I might be able to make it work for like every website.
This means you enter a URL and then you will see a list of some sorts where you can select which lists to turn into json and how the data should be interpreted. I have no idea how, but we'll see.

Show the user something if the cookie doesn't contain rawJSON

Since I use a redirect I can't pass the url provided as parameter. So that's where cookies come in to play. If the cookie doesn't contain the rawJson key show the user that they need to go to a different page.

although it may be easier if I didn't redirect.

Possible Feature(s)

Right now it's hard coded for 1 website, but with some changes I might be able to make it work for like every website.
This means you enter a URL and then you will see a list of some sorts where you can select which lists to turn into json and how the data should be interpreted. I have no idea how, but we'll see.

Format the JSON from the response

Right now if the JSON response is HUGE not everything fits. So if something contains an array only show the first item or something like that

Add forms

list to JSON and JSON to JSON need forms so the user can fill in the needed information

Template

Since I'm lazy and it's actually pretty helpful I should work with a template for the pages.

send get request

Allow the user to enter a url and successfully get json from the response.

refractor and add view engine

Since I've decided what I'm gonna do I realized I'm gonna need a view engine so I can give data with my html and also while doing that I'm gonna kind of start fresh so it doesn't get messy

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.