Giter Site home page Giter Site logo

jolav / codetabs Goto Github PK

View Code? Open in Web Editor NEW
205.0 205.0 29.0 46.08 MB

Free Online Services. Github/GitLab star history. Count Lines of Code. CORS proxy server. IP GeoLocation. Convert Video to Gif. HTTP Headers. Api weather temp. Alexa ranking.

Home Page: https://codetabs.com

License: BSD 3-Clause "New" or "Revised" License

CSS 10.87% HTML 25.60% JavaScript 18.48% Go 45.05%
alexa-rank api-service apis cors-proxy count-lines-of-code-online geolocation-api github-stars-graphical-history gitlab-stars-graphical-history http-headers online-service video2gif weather-api

codetabs's People

Contributors

jishnu2608 avatar jolav avatar soundasleep 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  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

codetabs's Issues

Editable colors for charts?

I haven't looked at the source code yet, but would it be difficult to make each chart color customizable?

This is something I could probably do in a pull request if there is interest.

Feature: Update line count when hiding languages

It would be nice if when you click on a language type in the graph key to hide it on the graph, as well as update the count below the graph to reflect that.

Alternatively, before scanning the repo, the user could specify languages to not include.

Count LOC: MATLAB identified as Objective-C

I was testing the line count tool on my lrkrol/SEREEGA repository, which according to GitHub is 100% MATLAB. However, the tool recognised it as Objective-C. This obviously messed up the count of comment lines and thus the actual LoC count.

It would be good to support MATLAB. Commenting is explained here.

When multiple languages use the same file extension (.m in this case), perhaps a user choice can be provided for it to be interpreted as one or the other for the current repository.

Why do I get 429 for the first petition?

When I used Java to send petitions every 5500 ms, I only got 429. However, my code worked fine before Aug. Is anything new that I should know for using the API?
When I used the browser, everything is fine.
My Java code is basically using org.apache.http.impl.client.CloseableHttpClient and org.apache.http.client.methods.HttpGet to send the petition. The speed is controlled by ScheduledExecutorService.

Random images returned

I have been using this service to pull information from a warhammer site using javascript, I have been using this information to create an app.

Although lately, it has been returning random images, but not for all the links I use. I suspect that I have done something wrong, such as too many requests to the same pages, or perhaps broken rules of this nature.

But instead of random images - I would have expected some kind of message, telling me what I have done wrong.

I have attached a couple of sample images below so you can see what I mean. But there are a lot of other images of other people, I feel like it is being pulled from a social media site instead.

wtf4
wtf6

Doesn't work on sites with relative imports

For an example, try visiting https://api.codetabs.com/v1/proxy/?quest=https://github.dev/.

If you open the console, you can see that requests are being made to endpoints like https://api.codetabs.com/static/splash-screen-styles.css, which are obviously failing because they don't exist. The proxy should download all dependencies with the proper URL root and then return the data, instead of pulling the root back and downloading dependencies afterwards.

Not trying to be a jerk, just noticed this issue and wanted to point it out. Cheers!

Selecting a branch

I'd like to request a feature allowing the user to select a different branch then master.

Instructions on how to define `GITHUB_TOKEN`, `GITLAB_TOKEN`, and other constans

When running this code, I get a lot of error messages about undefined constants. I assume these need to be supplied somehow, but instruciton of how to acquire them and how to define them are missing the the README.md.

Can you provide a short explanation besides static the required dependencies?

When running the code I get the following:

mgagyi@third-gazometric:~/git/others../codetabs$ go run main.go
# github.com/jolav/codetabs/weather
weather/weather.go:108:23: undefined: WEATHERUNLOCKED_APPID
weather/weather.go:109:24: undefined: WEATHERUNLOCKED_KEY
weather/weather.go:114:22: undefined: OPENWEATHER_KEY
weather/weather.go:117:20: undefined: WEATHERAPI_KEY
# github.com/jolav/codetabs/loc
loc/github.go:38:43: undefined: _utils.GITHUB_TOKEN
loc/gitlab.go:42:34: undefined: _utils.GITLAB_TOKEN
# github.com/jolav/codetabs/stars
stars/github.go:108:43: undefined: _utils.GITHUB_TOKEN
stars/github.go:149:45: undefined: _utils.GITHUB_TOKEN
stars/github.go:243:44: undefined: _utils.GITHUB_TOKEN
stars/gitlab.go:88:36: undefined: _utils.GITLAB_TOKEN
stars/gitlab.go:160:34: undefined: _utils.GITLAB_TOKEN

Suggestion: default the pie chart to non-blank lines (that is including comments), and provide a toggle

I suggest that the pie chart should default to showing to non-blank lines including comments, rather than as currently only the actual lines containing code. I think it's the most useful metric, since comments aren't easier to write than code, and a lack of comments also suggests less fleshed out code IMHO. It might be useful to also provide a toggle for those who prefer other metrics like the old one.

Add language

In the parameters of the URL, add a language parameter so we can get not only French-based websites.

api.codetabs.com/v1/loc always returns error

Your API-Endpoint under "https://api.codetabs.com/v1/loc?github=jolav/betazone" either returns the Error message {"Error": "Valid format is 'api.codetabs.com/v1/{service}?{param}=value' .Please read our docs at https://codetabs.com"} or the Error { "Error": "jolav/betazone doesn't exist" }, or even { "Error": "Cant create temporal dir for jolav/betazone"}, but never the actual values. Which error is being displayed seems to have no pattern.
Until yesterday, 10th of February, everything worked fine.
The same behavior occurs on different devices, different OS and different networks (tested via VPN).

A Thanks ~~

Wanted to drop by and say I appreciate you for hosting this! It's very kind, and surely saves many developers from hosting full servers that would get otherwise only get 10 requests a day :)

Repository search

This is actually unrelated to codetabs, but is an idea I've had and I wanted to write it somewhere.
It would be nice to have a search website for github, gitlab, etc that let's you find repositories to practice with, based on number of lines and some quality of code metric. Because from following a tutorial to contributing to a big project there is quite a leap, and I think working on small projects that are already done to check your progress would be a nice middle ground. Right now I can find projects like this in Project Based Learning, but it would be better to be able to filter projects by language, below 1k words for example and get a list of projects with a brief description and sorted by stars or code quality. The closest thing that I know off is Awesome Open Source.

Improve error responses on github loc API

Hello, I'm currently writing an browser extension and I decided to use codetabs API "https://api.codetabs.com/v1/loc/?github=" and I came across an idea which would help developers while using codetabs API. if you try to check "https://api.codetabs.com/v1/loc/?github=torvalds/linux" and "https://api.codetabs.com/v1/loc/?github=cryp70m4n/something" you get same JSON response format but different error message {"Error:": "Some error"}. Based on this fact I was thinking it would be nice if your API had some way for an end-developer to be able to find out what was the error without parsing every possible error message that could occur. For example you could add something like this {"Error": "Some error", "ErrorCode": -2} and based on this error code we could know if we were rated limited, repository was too big, repository doesn't exist, etc,... You could easily implement that and then write description of each error code in documentation.

Thanks.

About your Video2Gif API

Can I get a 5 to 10 sec gif from a video and make it a thumbnail like on youtube?

If that is the case, can the file be larger and restrict the output size prior to upload or through api?

I have a website with a bunch of videos, but they all have boring plain video camera icons

Any ideas?

Regards

Query parameters don't work properly

Hi,

Thanks for your great service, but I've come across an issue:

Normally when you set query parameters in an url you use something like encodeURIComponent(), especially when you have another url as the value which can contain special characters like ?, = and &. However with your service when you do this:

var url = 'https://api.codetabs.com/v1/proxy/?quest=' + encodeURIComponent('http://example.com');

Requesting that url gives this response:

{
 "Error": "http://http%3A%2F%2Fexample.com is not a valid resource"
}

So apparently the server doesn't actually treat it as a query string. Either it has to decode the query string, or you could allow urls like 'https://api.codetabs.com/v1/proxy/http://example.com' (in which case you would use encodeURI() instead of encodeURIComponent()).

Color of squares differs from pie's

In the language percentage pie graph, when clicking/tapping on a slice of the pie, the color changes. The square on it with the language name label also changes (accordingly, it should), but is instead always late, i.e. when re-clicking on the pie, it gets the color the slice had one click before

count-loc-online: suggestion: checkbox to ignore "./vendor" which maybe should default to enabled?

I think a useful addition would be a checkbox to ignore ./vendor, or a box to put ignore patterns, to this web UI: https://codetabs.com/count-loc/count-loc-online.html

Given ./vendor is commonly used for third party code that is only put there to simplify building (and not actually developed on in-repo), I think it would also make sense to activate this exclusion by default but offer some obvious way to disable it in the web UI.

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.