GithubHelp home page GithubHelp logo

carbondate's Introduction

CarbonDate

Prerequisites

  • Python 3 only.
  • Running in docker container is strongly recommanded.
  • Install tornado server (to run server).
  • Insert your bitly oauth access token in config file. Visit https://bitly.com/a/oauth_apps to get your access token.
  • Insert your Bing search api key in config file. Visit https://www.microsoft.com/cognitive-services/en-us/bing-web-search-api to get your api key.
  • (optional) Change server ip/port number in config.
  • All other packages that generate error "No module named" does exist, must be installed.

Instructions

To run it as a server:

$ ./main.py -s

To CarbonDate http://example.com:

Open in a Web browser: http://localhost:8888/cd?url=http://example.com

To run it as a local script:

$ ./main.py -l search URL

The backlinks calculation is costy to your computers, so it is recommanded to turn it off:

$ ./main.py -l search URL -e cdGetBacklinks

How to add your module:

Name your module main script as cdGet<Module name>.py

And ensure the entry function is named

get<Module name>(url,outputArray, indexOfOutputArray,verbose=False,**kwargs)  

or customize your own entry function name by assign string value to 'entry' varable in the beginning of your script
for example your module name is Service,

then the script should be named cdGetService, and interface function should be named

getService (url,outputArray, indexOfOutputArray,verbose=False,**kwargs)  

Copy your scripts and to folder ./modules, then the system will automaticaly detects and loads it.
###Data returned from your module:
The data returned from your module should be a string of date, in the format like '1995-01-01T12:00:00'
Put your result date in to outputArray[indexOfOutputArray] for result comparasion,

outputArray[outputArrayIndex] = time

and put the result and other data you want to show in the "displayArray" like:

kwargs['displayArray'][outputArrayIndex] = time_and_other_data_in_array_of_tuples

Where the varable outputArray,indexOfOutputArray and displayArray are past in by the system.

###If your module have sub-module:

  • If the sub-script is in a subfolder,bring folder with your script, carbon tool will ignore subfolders while loading
  • If the sub-script is not in a subfolder, after copying it to ./modules folder, add them into config file, under 'SystemUtility' field

##For more help please visit wiki page

Support

[email protected]

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.