Giter VIP home page Giter VIP logo

devdata.io's Introduction

DevData.io

The Data You Need In The Programming Language You Want

DevData.io exists to serve a simple purpose: An easy way to get common data sets (like States, Countries, Curriencies and symbols, etc.) in the programming language you want them in for the projects you are working on.

Adding a New Dataset

All the current datasets are stored as raw JSON files in the Datasets directory.

  1. Fork this repo, add your dataset in the datasets directory as a JSON file
  2. And then expose it on the frontend with the datasets variable in app.js

Adding a New Language

Don't see your language represented on the site? Let's add it in! All devdata needs to know is some syntax and formatting rules, and it does the rest.

  1. Add your language and all applicable syntax and formatting rules to the formatMap variable in lib/converter.js
  2. And then expose it on the frontend with the supportedFormats variable in app.js

License

DevData source code and generated formatted code is all freely licensed with the BSD 3-clause license.

devdata.io's People

Contributors

bjarneo avatar hasanbayatme avatar juokaz avatar mackenza avatar mkchandler avatar sasankmukkamala avatar vlucas avatar vybeauregard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

devdata.io's Issues

adding languages

@vlucas are you handling the css (different colors per language) and the prismjs dependencies for new languages? i.e. we just need to change converter.js and app.js?

The Website Keywords Meta Tag

You can use the available datasets names in keywords, the current meta tag is:

<meta name="keywords" content="dev data, developer data, states list, countries list, list of states, list of countries"></meta>

but you can replace it with better functionally, easily include below code to your app.js:

/**
 * Config
 */
var supportedFormats = {
  'javascript': 'JavaScript',
  'php': 'PHP',
  'python': 'Python',
  'ruby': 'Ruby',
  'csharp': 'C#',
  'lua': 'Lua'
};
var datasets = {
  'states': 'U.S. States',
  'canadian-provinces': 'Canadian Provinces',
  'countries': 'World Countries',
  'currencies': 'World Currencies',
  'timezones': 'World Time Zones',
  'airport-codes': 'International Airport Codes',
  'http-status-codes': 'HTTP Status Codes'
};
var keywords = [ 'dev data', 'developer data' ];
var dashPattern = new RegExp( '-', 'g' );
var datasetNames = Object.keys( datasets );
for ( var i = 0; i < datasetNames; i++ ) {
  var datasetName = datasetNames[ i ];
  datasetName.replace( dashPattern, ' ' ); // Remove dash from dataset name
  keywords.push( datasetName + ' list' );
  keywords.push( 'list of ' + datasetName );
}
keywords = keywords.toString(); // Convert the keywords array to string

/**
 * Express
 */
var app = express();
app.set('view engine', 'jade');
app.engine('jade', require('jade').__express);
app.use(express.static(__dirname + '/public'));

app.get('/', function(req, res) {
  res.render('index', { languages: supportedFormats, datasets: datasets, keywords: keywords });
});

then use it in your layout/main.jade:

doctype html
html(lang="en")
  head
    meta(charset="utf-8")
    meta(http-equiv="X-UA-Compatible", content="IE=edge")
    meta(name="viewport", content="width=device-width, initial-scale=1.0")
    meta(name="keywords", content="#{keywords}")
    ...

Need to add support for static types?

@vlucas I was wondering about the static typing issue. Should someone be creating a PR to accept static types for the languages that support them? Even Hack/PHP7 would benefit from this. I was thinking of adding Typescript as a language but don't see the benefit without the types.

should we leave JSON as a valid "language"

I know we converted the former JSON to Javascript based on the feedback you got from red-cesspit, and I agree with the logic, but I think having the raw JSON as a "language" is still valid. The use case is I want to copy/paste the contents directly into a new file like states.json rather than use it as a .js file.

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.