V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
fatelovely

用 Go 撸了个代码明信片生成器

  •  
  •   fatelovely · Feb 16, 2017 · 3536 views
    This topic created in 3357 days ago, the information mentioned may be changed or developed.

    之前看到commits.io这个站的时候,就觉得代码明信片这个 idea 挺有意思,虽然没什么用,但是好玩呀~

    花了一个晚上,用 Go 自己撸了一个,项目仓库

    唯一的缺点是要手动指定字体大小,以及单个字符的宽度和高度,默认用的字体是Hack,专为源码而生的字体~

    8 replies    2017-02-17 17:23:29 +08:00
    ss098
        1
    ss098  
       Feb 16, 2017   ❤️ 1
    你的二进制打包有问题啊,扩展名是什么?
    fatelovely
        2
    fatelovely  
    OP
       Feb 16, 2017
    @ss098 哪个平台? OSX 和 Linux 我都测试过的,应该没问题。二进制都没有扩展名的。直接在终端执行就可以了。 Windows 晚上回去用我的台式机测试一下。
    scnace
        3
    scnace  
       Feb 16, 2017 via Android
    有点意思 mark 下
    ss098
        4
    ss098  
       Feb 16, 2017 via Android
    @fatelovely 不是,是从 GitHub 下下来的(可能是压缩包)没有扩展名。
    Unknwon
        5
    Unknwon  
       Feb 16, 2017
    卧槽厉害了。。
    fatelovely
        6
    fatelovely  
    OP
       Feb 16, 2017
    @ss098 下载的就是二进制程序,但是被 Github 移调了执行权限,`chmod +x codeposter_darwin_amd64`添加一下执行权限,就可以在终端中执行了 。
    ss098
        7
    ss098  
       Feb 17, 2017
    试了一下,挺有意思的。
    corona
        8
    corona  
       Feb 17, 2017
    这个挺有创意的,赞
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5029 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 01:09 · PVG 09:09 · LAX 18:09 · JFK 21:09
    ♥ Do have faith in what you're doing.