Bygga
Type the product name from the box. Bygga shows every assembly step in 3D, with the parts, screws and tools for each one, and reads it out loud.
今天吃什麼?隨機選餐器:換成你的菜單(Excel→CSV)、預算上限、過敏食材、團購訂餐。純網頁免安裝
Translation pending
LifestyleJavaScript · CSSGitHub @LarryveryhandsomeOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗「早餐要吃什麼?」「中午便當誰要訂?」每天都要想一次。 把店家菜單放進來,按一個按鈕,這個網頁就幫你:
免安裝、免伺服器:雙擊 index.html 就能用。收藏和紀錄只存在你這台電腦的瀏覽器。
線上試用(示範資料):https://larryveryhandsome.github.io/tw-menu-picker/
內建三份菜單:示範早餐店、示範便當店、示範飲料店。店名、品項、價格、電話(0900-000-001~003)全部是假的。
一個純網頁的「隨機選餐器」。菜單可以是內建的,也可以把 Excel 菜單直接複製貼上; 選好條件按「幫我選!」,就會在符合條件、而且不超過預算的所有組合裡,公平地隨機抽一組。
條件太嚴抽不出來時(例如預算 30 元但最便宜的組合要 45 元),會直接告訴你差多少,不會當掉。
index.html,先用內建的示範菜單玩玩看。data/menu.example.csv(可用 Excel 開),照格式改成你的菜單。也可以按「選擇 CSV/JSON 檔」。用 Excel 存檔時請選「另存新檔 → CSV UTF-8(逗號分隔)」,不然中文會變亂碼。
匯入的菜單會存在這台電腦的瀏覽器裡,下次打開還在;要給別人用,請用方法二。
| 欄位 | 必填 | 說明 |
|---|---|---|
| 類別 | 例如 漢堡、蛋餅、便當;用來篩選主餐。空白會歸到「其他」 | |
| 品名 | ✔ | |
| 價格 | ✔ | 0 以上的整數。35、35元、NT$35 都可以 |
| 標籤 | 食材或特色,用頓號分開,例如 蛋、豬、辣;客人可以勾「不要」 | |
| 是否飲料 | 是/否。沒填時,類別或飲料類型看起來像飲料(茶、咖啡、豆漿…)就當飲料 | |
| 飲料類型 | 例如 茶、奶茶、咖啡、果汁;用來篩選飲料 | |
| 備註 | 自己看的,不影響抽選 |
格式有問題的列(沒品名、價格不是整數)會被略過,畫面會列出是第幾列、什麼問題。
data/menus.js,照裡面的格式加一份菜單(或直接改「示範早餐店」那份)。config.js)用記事本打開 config.js:
| 設定 | 說明 |
|---|---|
title | 網頁標題 |
shop.name | 店名 |
shop.address | 地址,可留空;有填會出現「Google 地圖」連結 |
shop.phone | 電話,可留空;手機上點一下就能撥 |
shop.hours | 營業時間 |
shop.note | 頁尾說明,例如「價格與品項原則上以店家現場為準」 |
defaultMenu | 一打開先顯示哪份菜單(data/menus.js 的 id) |
noRepeatLast | 最近幾次抽過的組合盡量不要再抽到(預設 3) |
historyMax | 「最近選擇」保留幾筆 |
defaultBudget | 預設預算,空字串=不限 |
defaultPeople | 團體訂餐預設人數 |
data/menus.js 裡每份菜單也可以有自己的 shop(覆蓋上面的店家資訊)和 extras(飲料隨機附加的選項,例如甜度、冰塊)。
noRepeatLast)抽過的組合會先排除;如果條件太嚴、只剩這幾組,才會重複,並在畫面上註明。index.html 畫面
css/style.css 樣式(含深色模式、手機版)
config.js 店家資訊與設定
data/menus.js 內建示範菜單(window.MENUS,雙擊 index.html 也讀得到)
data/menu.example.csv CSV 範本(和「示範早餐店」內容相同,測試會檢查)
js/picker.js 核心:CSV 解析、菜單檢查、篩選、可重現的隨機抽選、團體訂餐、文字格式(純函式,UMD)
js/app.js 畫面邏輯
tests/ 單元測試(node:test,不用裝任何套件)
npm test
Picker.pickCombo(items, { rng: Picker.makeRng(42), budget: 80 }),同一個種子結果完全一樣,方便測試。不需要。 沒有任何 API 金鑰、帳號或付費服務:抽選都在你的瀏覽器裡計算,Google 地圖只是一個開新分頁的連結(不呼叫 API)。詳見 docs/金鑰申請.md。
這個工具是開源的,可以免費使用。如果你想要:
歡迎加 LINE 跟我們聊。我們會依需求的範圍與複雜度報價,原則上以實際報價單為準。