GithubHelp home page GithubHelp logo

golang-design / code2img Goto Github PK

View Code? Open in Web Editor NEW
77.0 77.0 7.0 18.51 MB

๐Ÿ–จ๏ธ A carbon-now API wrapper and iOS Shortcut

Home Page: https://golang.design/s/code2img

License: GNU General Public License v3.0

Dockerfile 5.41% Makefile 5.37% Go 89.21%
carbon go golang ios-shortcut shortcuts wrapper

code2img's People

Contributors

changkun avatar yangwenmai 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

Watchers

 avatar  avatar  avatar  avatar  avatar

code2img's Issues

CLI access

code2img might provide a cli for desktop access. Here are some quick thoughts on its requirements:

  1. Where to read the code:
  • from an existing file (specify line number -l 12:32 -f runtime.go, read from file runtime.go, line 12:32)
  • from the system clipboard (if no file is provided)
  1. Needed platform: macOS, Linux (Ubuntu distribution)

  2. Where to save the outputs (need more rethink):

  • Save to a file -o option and prints the URLs?
  • If no output file provided, then directly print the URLs (both for code+image)?
  • Write the image or code URL back to the clipboard and print the URL to the code?

It seems to be an issue about retrieving the converted images, for instance, from a mobile phone.

Let's revisit these ideas a few months later.

Possible Improvements

Ideas are from @yangwenmai :

  1. How to provide access to the plain text code of an image
  • Current solution: provide plain text code link access
  • Possible alternatives:
    • store it to play.golang.org
    • concatenate a QR code that contains the link to the code URL (seems a good idea, but where to put the QR code?)
  1. URLs are too long (especially with UUID):
  • seems to be a valid request, but do people really care about having a shorter URL for sharing? I would argue that people won't try to remember such a link (even in a short form) because they only paste it somewhere and post it to the public.
  • shorter URL needs a string allocator without collision to the existing ones, which needs more work (existing solutions other than UUID?)

Let's wait until we learned more experience with the current service status, probably revisit it next month.

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.