vscode-carbon_now_sh
vscode-carbon_now_sh copied to clipboard
Add file explore menu item to capture entire file
Selected code is longer than 1000 characters, refusing to send to carbon.
This is due to URL limits. Currently 1000 is an arbitrary number, but it shouldn't be much longer than that.
If it is the URL limit, then how will you implement this capture entire file
feature.
The file will have to be less than the limit :/
@ericadamski Here I can provide a way to break through the URL length limit.
Use the puppeter
to dynamically open the carbon page, then download the image.
This way you can generate images no matter how many bytes of length.
And puppeter
can specify chrome
executable file path, so you don't have to download chromium
@axetroy, if you could implement that it would be amazing! ❤️
@ericadamski
In this case, Chrome is a dependency of extension.
track here https://github.com/dawnlabs/carbon/pull/644
waiting for carbon API
How about using Github account token to create gist like code-settings-sync do, then open carbon.now.sh with gist id?
@inori1707 that is a great solution!!
I would love to see a PR that implements this.
A few questions:
- Should we give the URL to the gist that was created to the user as well?
- Should we delete the gist after we use it in carbon?
- Should we only use a gist if the code is longer than the current limit?
@ericadamski In my opinion,
- We should notify the user the gist we created, and user can provide his gist id by config to avoid create new gist every time.
- Maybe we could not delete the gist immediately because we don't know if carbon.now.sh has read it. We could save and use the same gist id to update the gist content next time.
- It should be great if this is good for performance.
By the way, I am willing to make a PR, but maybe not very soon.
There is no rush for this implementation! So when you have the time it would be great to see a PR @inori1707 😄