Giter Site home page Giter Site logo

bestian / edu-lang Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 0.0 25.78 MB

一種專門為了教育方式或學習方法分享而設計的Markdown之子語言。例如:「步驟」(一種固定格式的小階梯說明文) meta languages for edu( a set of sublanguage of Markdown ), e.x. step

Home Page: https://docs.google.com/presentation/d/1xtSwUsW4AI6fDaaFOLIFo-9NSxIbJ8Lws_w12D05ZpY/edit?usp=sharing

JavaScript 100.00%
education javascript nodejs

edu-lang's Introduction

教育元語言 edu-lang

一種專門為了教育方式或學習方法分享而設計的Markdown之子語言。例如:「步驟」(一種固定格式的小階梯說明文) meta languages for edu( a set of sublanguage of Markdown ), e.x. step

新手上路

  1. 請先看簡報頁
  2. 請先看共筆區(Wiki)的首頁
  3. 錯誤回報與功能請求,請上議題區(issues)
  4. 若您還沒有Gtihub帳號,請申請一個
  5. 若您還不會Markdown,沒有關係,它很簡單,至少比html簡單。請看此頁Markdown文法說明,或是此Markdown範本集謝謝。
  6. 喜歡本專案的話,請記得幫忙訂閱(右上角的watch)和打星(右上角的star)集氣喔,謝謝!

開發環境

  1. Node.js
  2. Mocha
  3. google slide
  4. 足夠的血糖和熱情❤️‍🔥

  1. 收集並開發一些在教育領域常用的函式以及剖析器等等,從簡單的countAge到複雜的countStep, countTable, countTree, countClimbingStones等等
  2. 為開源共學島提供基礎建設
  3. 目標是打包到npm 想讓想用的專案都可以用

緣起(Idea)

一般來說,從入門到進階都會有一個小階梯,這稱為小階梯教學法。

如何把這個階梯表達出來,讓人很容易地可以編輯、很容易地看懂,這就是工程師要做的事情。 因為要表達小階梯,用演講、短文、YouTube這些方法都不是很有效率的。

有鑒於之前的https://beta.hackfoldr.org/ 對一般使用者還是太困難。 在他最後嘗試表達階梯的Goban,介面和表述的方式仍然太複雜,且一般人沒有動機網上分享東西。

看起來一個更簡單的語言表達方式是必要的。 他應該屬於Markdown的子類。

應用(Application)

測試和發佈

測試

mocha test

發佈

  1. 先增加packge.json裡的版本號 npm publish

edu-lang's People

Contributors

bestian avatar

Stargazers

Huanry avatar  avatar Drago avatar  avatar

Watchers

 avatar Huanry avatar Sam Ma avatar  avatar

edu-lang's Issues

allow hashtags

input =>

## 學習料理的步驟
學習料理,其實很簡單

#生活 #廚藝 #抒壓

1.先在家裡廚房幫忙
2.觀察外食店家的食材搭配
3.採購的時候,幫忙一起採購 
4.可以到[自然美食DIY網站](https://food.bestian.tw)找食譜
5.可以自己研發一些料理來嘗試看看
6.還可以借圖書館的一些食譜書,學習健康飲食
7.請看[關於我們](!about)

===output===

{
  intros: [ '## 學習料理的步驟', '學習料理,其實很簡單' ],
  tags: [ '生活', '廚藝', '抒壓' ],
  steps: [
    { n: '1.先在家裡廚房幫忙' },
    { n: '2.觀察外食店家的食材搭配' },
    { n: '3.採購的時候,幫忙一起採購' },
    { h: 'https://food.bestian.tw', n: '自然美食DIY網站' },
    { n: '5.可以自己研發一些料理來嘗試看看' },
    { n: '6.還可以借圖書館的一些食譜書,學習健康飲食' },
    { r: 'about', n: '關於我們' }
  ]
}

inner router-link

input =>

Hello

1. welcome
2. We think [vegen is good](https://food.bestiant.tw)
3. [about_us](*about)

=====

output =>

{"intros" :  ["Hello"], "step": 
[
 { "n" : "1. welcome"}, 
 {"n": We think vegen is good", "h": "https://food.bestiant.tw"},
 {"n": about_us", "r": "about"},
 }

"r". can be used to make vue's router-link

complex step parser 在test不通過

run

npm test

resault:


> [email protected] test
> mocha



  parseMarkdownToSteps
    ✔ lines before numbers should be intros,
    lines started with numbers should be steps.
    objects in steps should have "n", perhaps have h(href) or r(inner router links)

    ✔ simple steps only.
[ '## 學習料理的步驟', '學習料理,其實很簡單' ]
    1) complex case should contain imgs.

  parseTags
    ✔ split a tags list

  mdToURI
    ✔ minify a markdown and make it to URI

  countAge
    ✔ count a child's age by birthday(like '1985-04-01')= + ' ' + countAge('1985-04-01')

  autoId
    ✔ make a autoId by name


  6 passing (17ms)
  1 failing

  1) parseMarkdownToSteps
       complex case should contain imgs.:
     AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected

+ [
+   {
+     n: '1. 先在家裡廚房幫忙'
+   },
+   {
+     h: 'https://food.bestian.tw',
+     n: '2. 可以到自然美食DIY網站'
+   },
+   {
+     n: '3. 請看關於我們',
+     r: 'about'
+   },
+   imgs: [],
+   intros: [
+     '## 學習料理的步驟',
+     '學習料理,其實很簡單'
+   ],
+   title: 2
+ ]
- {
-   imgs: [],
-   intros: [
-     '學習料理,其實很簡單'
-   ],
-   steps: [
-     {
-       n: '1. 先在家裡廚房幫忙'
-     },
-     {
-       h: 'https://food.bestian.tw',
-       n: '2. 自然美食DIY網站'
-     },
-     {
-       n: '3. 關於我們',
-       r: 'about'
-     }
-   ],
-   tags: [
-     '生活',
-     '廚藝',
-     '抒壓'
-   ],
-   title: '## 學習料理的步驟'
- }
      at Context.<anonymous> (test.js:32:12)
      at process.processImmediate (node:internal/timers:476:21)
      

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.