GithubHelp home page GithubHelp logo

tuture-dev / tuture Goto Github PK

View Code? Open in Web Editor NEW
198.0 7.0 13.0 22.47 MB

Write tutorials from the future, with the power of Git and community. 『图雀写作工具』

Home Page: https://www.yuque.com/tuture/product-manuals

License: MIT License

JavaScript 1.15% TypeScript 98.17% HTML 0.64% Batchfile 0.01% Less 0.03%
learn-by-doing learn-by-examples hands-on git diff-viewer writing-tutorials

tuture's Introduction

Git + Tuture = Tutorial(教程)

” 基于 Git,为写作技术实战教程而生 “

你可能想了解我们为什么要创建图雀社区?

以及关于图雀社区的常见问题解答

![](https://tuture.co/images/tuture-screenshots.jpg)

介绍

Tuture 是一款基于 Git 版本控制系统、为实战技术教程创作而生的写作工具,具备以下核心优势:

  • 根据提交记录自动生成教程骨架,无需手动整理代码
  • 对着代码“讲故事”,思路更清晰,写作更愉快
  • 专业美观的写作界面,提供全方位的支持,让你专注于内容创作
  • 内容的同步和协作基于 Git 分布式版本控制系统,为社区创作开启无限可能
  • 强大且方便的内容导出和发布,帮助你的文章快速传播,得到更多读者的认可

免责声明(郑重提醒)

Tuture 为教程内容创作而生,因此 Git 仓库通常是专门用于教学演示的示例项目。我们无法担保把 Linux 内核仓库(98 万多次提交)转换成 Tuture 教程的效果哦!

生态

项目 状态 描述
Tuture 活跃 基于 Git 快速撰写技术教程
Editure 活跃 基于 Slate 的 Markdown 富文本一体的编辑器
图雀社区 活跃 发布使用 Tuture 写作而成的技术教程

如何快速使用?

在终端运行如下命令:

  1. 安装 Tuture 写作工具
npm install -g @tuture/cli
  1. 进入一个 Git 仓库并进行初始化(如果你手头没有的话,可以克隆我们提供的演示项目):
cd /path/to/repo && tuture init

# 或者使用我们的演示项目(无需初始化)
git clone https://github.com/tuture-dev/our-tuture.git
cd our-tuture
  1. 打开编辑器进行写作:
tuture up

这个时候你应该可以看到类似下面的界面:

场景化的快速上手教程

如果你想自己从零开始体会如何基于一个 Git 项目撰写实战技术教程,那么我们我们为你撰写了一篇 ”场景化“ 的快速上手教程,无论你对 Git 有没有了解,你都能很好的学会使用 Tuture 写作工具。

文档

如果你想更多的了解 Tuture,可以阅读我们的如下文档:

作品

名称 封面 相关链接
从零到部署:用 Vue 和 Express 实现迷你全栈电商应用(系列) - 仓库地址
- 图雀社区
- 微信公众号
Taro 小程序开发大型实战(系列) - 仓库地址
- 图雀社区
- 微信公众号
Docker 筑梦师系列 - 仓库地址
- 图雀社区
- 微信公众号
类型即定义:TypeScript 从入门到实践系列 - 仓库地址
- 图雀社区
- 微信公众号

查看更多 (30+篇)使用 Tuture 写作工具写作的教程 →

## 作者

感谢所有图雀社区的作者们,写出了这些精彩的技术文章,让我们的技术世界更加美好!✌️

4.svg 3.svg 2.svg 1.svg 6.svg
mRcfps pftom HolyHeart crxk 晨曦时梦见兮
8.svg 7.svg 10.svg 9.svg 5.svg
慢一拍 JowayYoung 布拉德特皮 Horace_ 婧婧

提问、联系或加入我们

如果你对 Tuture 写作工具有任何疑问、改进意见,可以关注我们公众号(回复“交流”后加客服),或者加入 QQ / 钉钉群:

也可以发送邮件至我们的邮箱:[email protected]

贡献

请确保你在提交 Pull Request 之前先阅读了 贡献指南 !感谢所有已经给 Tuture 提交贡献的人!

mRcfps
Tuture & Editure
Tuture 共同创始人
pftom
Tuture & Editure
Tuture 共同创始人
CH1111
Tuture
Tuture 核心贡献者
studytoohard
Tuture
Tuture 核心贡献者
HolyHeart
Tuture
Tuture 核心贡献者

协议

MIT

Copyright (c) 2018-present, Tuture Devlopers

tuture's People

Contributors

ch1111 avatar crxk avatar dearonger avatar holyjie avatar mrcfps avatar mrcytus avatar pftom avatar studytoohard avatar tomwenthey 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  avatar  avatar  avatar  avatar  avatar

tuture's Issues

Display errors around code diff

There are currently two obvious problems on displaying code diff:

  1. incorrect line numbers
  2. missing hint for omitted lines of code

Below are screenshots on my newly written tutorial:

Real code:

image

Code diff in editor:

image

Note the missing code between Line 10 and Line 18 in the real code.

Markdown editor initializes with string "undefined"

Describe the bug
When adding new steps, initialize the markdown editor on empty explain blocks and see the string "undefined".

To Reproduce
Steps to reproduce the behavior:

  1. Add a new step
  2. Click on "Add explanation of this step"
  3. The string "undefined" shows up in markdown editor

Expected behavior
There should be no "undefined" string.

Screenshots
image

Tuture init topics/categories with Chinese are Lost

Describe the bug
When I use tuture init in a new project, then prompt Tutorial Name, Description, Topics, Categories, The Topics & Categories can add multiply split with ,, but When I add Chinese words, the final tuture.yml result not showing this Chinese word.

To Reproduce
Steps to reproduce the behavior:

  1. Project folder
  2. Run tuture init
  3. Response Topics/Categories with Chinese words
  4. Final tuture.yml not showing this Chinese words

Expected behavior
Topics/Categories can add Chinese words as well.

Screenshots
image

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Chrome
  • Node: v10.16.0
  • Npm: 6.9.0
  • tuture: tuture/2.0.1 darwin-x64 node-v10.16.0

Implement test suite

I'd like to implement with three stages:

  • Easily use jest snapshot test for component-level test
  • Use jest test other functionality-file
  • Use enzyme test for dom-level test

Build crash when empty file is present

When some files are empty, trying to build the tutorial will crash:

TypeError: Cannot read property 'changes' of undefined
    at codeBlock (~/OpenSource/tutureproject/tuture/build/commands/build.js:13:33)
    at diffTmpl (~/OpenSource/tutureproject/tuture/build/commands/build.js:24:3)
    at lodash_zip_1.default.map (~/OpenSource/tutureproject/tuture/build/commands/build.js:34:43)
    at Array.map (<anonymous>)
    at stepTmpl (~/OpenSource/tutureproject/tuture/build/commands/build.js:32:6)
    at lodash_zip_1.default.map (~/OpenSource/tutureproject/tuture/build/commands/build.js:45:30)
    at Array.map (<anonymous>)
    at tutorialTmpl (~/OpenSource/tutureproject/tuture/build/commands/build.js:43:6)
    at Build.run (~/OpenSource/tutureproject/tuture/build/commands/build.js:61:26)
    at Build._run (~/OpenSource/tutureproject/tuture/node_modules/@oclif/command/lib/command.js:29:31)

Test bug

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Fail to replace image links when building tutorials

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Clone the ultra-club tutorial repository
  2. Run tuture reload and tuture build
  3. Some image links are not replaced with image hosting urls

Expected behavior
All image links should be replaced with image hosting urls.

Screenshots
Example output of one piece of tutorial:
image

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Build crash when both output destination and splits are specified

Describe the bug
When running tuture build -o foobar with multiple parts (i.e. splits is given), it crashes.

To Reproduce
Steps to reproduce the behavior:

  1. Specifiy splits in tuture.yml as usual
  2. Run tuture build -o foobar
  3. See error

Expected behavior
Two choices (I don't know which one is better):

  • Create a directory with the named specified in -o or --output, and put all targets into it
  • Raise an error and tell the user

Screenshots

$ tuture build -o build
Error: Source and destination must not be the same.
    at checkPaths (~/OpenSource/tutureproject/tuture/node_modules/fs-extra/lib/copy-sync/copy-sync.js:185:11)
    at Object.copySync (~/OpenSource/tutureproject/tuture/node_modules/fs-extra/lib/copy-sync/copy-sync.js:25:20)
    at ~/OpenSource/tutureproject/tuture/build/commands/build.js:206:36
    at Array.forEach (<anonymous>)
    at Build.saveTutorials (~/OpenSource/tutureproject/tuture/build/commands/build.js:197:19)
    at Build.run (~/OpenSource/tutureproject/tuture/build/commands/build.js:231:14)
    at Build._run (~/OpenSource/tutureproject/tuture/node_modules/@oclif/command/lib/command.js:44:31)

pull command does not update assets table

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

error Tuture is not initialized. Run tuture init to initialize.

Describe the bug
您好,我在github上新建了仓库,拉取仓库(空)仓库后进入到目录,执行 tuture init,按照要求填写相关信息之后,提示初始化成功,再执行 tuture up, 提示没有初始化。

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/hu-qi/huqi-awesome-tutorial
  2. cd huqi-awesome-tutorial/
  3. tuture init
  4. tuture up

Expected behavior
期望能正常打开网页进行文章编写。

Screenshots
image

Desktop (please complete the following information):

  • OS: Microsoft Windows [版本 10.0.17763.1098]
  • Browser: Google Chrome 80.0.3987.122(正式版本)(64 位)
  • Version: null

Smartphone (please complete the following information):

  • Device: null
  • OS: null
  • Browser: null
  • Version: null

Additional context
初始化之后文件夹目录:
image

初始化之后配置文件:
image

( 奇怪的是github地址中用户名那少了一个"-")

In codeblock, copy and paste content will lost lineBreak

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Update tuture object to latest tuture.yml spec

The latest spec.

Example:

name: Name of this tutorial
language: en-US
version: 0.0.1
topics:
  - Topic A
  - Topic B
description: This is my first tutorial, come and read it!
maintainer: [email protected]
steps:
  - name: Message of commit ae05546
    commit: ae05546
    explain:
      pre: Introduction placed at the top of this step
      post: Sumup placed at the bottom of this step
    diff:
      - file: Changed file A
        section:
          start: 1
          end: 10
        explain: Introduction before doing something to this part of A
      - file: Changed file A
        section:
          start: 11
          end: 20
        explain: Introduction before doing something to this part of A
      - file: Changed file B
        explain:
          pre: Introduction before doing something to B
          post: Explanation after doing something to B
  - name: Message of commit ae05546
    commit: a45bec1
    explain:
      pre: Introduction placed at the top of this step
      post: Sumup placed at the bottom of this step
    diff:
      - file: Changed file A
        explain:
          pre: Introduction before doing something to A
          post: Explanation after doing something to A
      - file: Changed file B
        explain: Introduction before doing something to B
      - file: Changed file C
        explain:
          pre: Introduction before doing something to C
          post: Explanation after doing something to C

error Tuture is not initialized. Run tuture init to initialize.

Describe the bug
您好,我在github上新建了仓库,拉取仓库(空)仓库后进入到目录,执行 tuture init,按照要求填写相关信息之后,提示初始化成功,再执行 tuture up, 提示没有初始化。

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/hu-qi/huqi-awesome-tutorial
  2. cd huqi-awesome-tutorial/
  3. tuture init
  4. tuture up

Expected behavior
期望能正常打开网页进行文章编写。

Screenshots
image

Desktop (please complete the following information):

  • OS: Microsoft Windows [版本 10.0.17763.1098]
  • Browser: Google Chrome 80.0.3987.122(正式版本)(64 位)
  • Version: null

Smartphone (please complete the following information):

  • Device: null
  • OS: null
  • Browser: null
  • Version: null

Additional context
初始化之后文件夹目录:
image

初始化之后配置文件:
image
(*奇怪的是github地址中用户名那少了一个 - *)

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.