{"id":18898428,"url":"https://github.com/hychen/boliau","last_synced_at":"2026-03-01T10:30:17.546Z","repository":{"id":6222755,"uuid":"7454169","full_name":"hychen/boliau","owner":"hychen","description":"A flexible and lazyness continuation tasks management framwork","archived":false,"fork":false,"pushed_at":"2013-08-16T10:02:18.000Z","size":226,"stargazers_count":5,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-31T08:45:43.465Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hychen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-05T10:08:11.000Z","updated_at":"2020-05-11T21:26:32.000Z","dependencies_parsed_at":"2022-09-05T22:41:16.739Z","dependency_job_id":null,"html_url":"https://github.com/hychen/boliau","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hychen%2Fboliau","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hychen%2Fboliau/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hychen%2Fboliau/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hychen%2Fboliau/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hychen","download_url":"https://codeload.github.com/hychen/boliau/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239879317,"owners_count":19712176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T08:42:34.492Z","updated_at":"2026-03-01T10:30:16.138Z","avatar_url":"https://github.com/hychen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BoLiau - A flexible and lazyness continuation tasks management framwork.\n\n[![Build Status](https://secure.travis-ci.org/hychen/boliau.png)](http://travis-ci.org/hychen/boliau)\n\nThe project name BoLiau comes from the spelling pronunciation of 無聊\nin 台灣閩南語, because the author Chen Hsin-Yi developed when he was\ntrying to eliminate tedious repetition actions.\n\nThose actions has two kind: Task and Mission.\n\nEach task is a step of steps to archive a mission such as \ncollecting data from website to generate a report, batch changing bug\nstatus in Bug Tracker, etc.\n\nAnd, a  mission is composed by many tasks in sequence like a production line\nin a factory.\n\n## Composition\n\nEvery command has `boliau` prefix are like functions in function programming language\nand only provide a task.\n\nTasks can be composted by Unix pipe line as a mission. The output of last task is \nthe input of next task.\n\nHere is a simplest composition. it only print the output of `cat /etc/apt/source.list`\n\n```\n$ cat /etc/apt/source.list | boliau-readstdin | boliau-print | wc -l\n60\n```\n\n## Python\n\nWhen data is redirected to `boliau-readstdin`. it will be converted as \na Python String Object (str).\n\nit means you can use lovely *map*, *filter* and any built-in Python \nfunctions to operate data in your lovely shell.\n\nFor instance, To count u character of all urls in\n/etc/apt/source.list, you can use the following instructions.\n\n```\n$ awk '{print $2}' /etc/apt/sources.list | grep http | \\\n  boliau-readstdin  | boliau-lines | \\\n  boliau-map --command \"lambda e: e.count('u')\" | \\\n  boliau-py-call sum | boliau-print\n141 \n```\n\nIt can be dived into 6 steps.\n\n1. list only http url by using awk and grep\n2. put the last output to Python context by using boliau-readstdin\n3. split string to list by using boliau-lines\n4. counting occurrences of u character of each elements of the list by\nusing boliau-map. \n5. boliau-py-call can apply a python function to the last ouput. In\nthis case, sum is used for getting all occurrences of u character. \n6. boliau-print is to print the last output to console. the data exits\nPython context.\n\n## Lazyness\n\nThere are 3 types of command in design\n\n1. To create a mission as a container.\n2. To modify a mission.\n3. To do a mission.\n\nIn previous introduction, only boliau-print is third type command. the\nothers are used to define how many tasks need to be executed to\narchive a mission.\n\n### Examples\n\nTo create a mission to split source list content to list\n\n```\n$ awk '{print $2}' /etc/apt/sources.list | grep http | \\\n  boliau-readstdin  | boliau-lines \u003e get_sourcelist_url.mission\n```\n\nTo print the url count.\n\n```\n$ cat get_sourcelist_url.missison | boliau-py-call len | boliau-print\n23\n```\n\nTo create a new mission to less typing.\n\n```\n$ cat get_sourcelist_url.mission | boliau-py-call len \u003e count_sourcelist_url.mission\n$ boliau-print \u003c count_sourcelist_url.mission\n23\n```\n\nTo create a Python object from json string and print its type \n\n```\n$ boliau-py-obj --from-string '{\"a\":1}' | boliau-py-call type | boliau-print\n\u003ctype 'dict'\u003e\n```\n\nTo read a restful endpoint that the response is a json as a python dict.\n\n```\nboliau-readasjson https://SampleChat.firebaseio-demo.com/.json limit=1 | boliau-print\n{u'data': [{u'content': u'Javascript uses Prototypes instead of classical inheritance.', u'creationDate': 1374408569136, u'detail': u'this is a looooong detailed describtion of the content', u'tags': [{u'color': u'red', u'name': u'JavaScript', u'value': 70}, {u'color': u'blue', u'name': u'Programming', u'value': 90}, {u'color': u'green', u'name': u'Fun'}]}], u'fred': u'uuuuWorld'}\n\n```\n\n## To operate more data types with plugins.\n\n### Examples\n\nTo read a remote http url as a json\n\n```\n$ boliau-readasjson http://www.news-pac.com/api/topic/蔡英文 limit=1 | boliau-print\n```\n\nTo display Launchpad bug information.\n\n```\n$ boliau-lp-get bug 1 | boliau-lp-format buginfo | boliau-print \nTitle: (LP:# 1) Microsoft has a majority market share\nCreated: 2004-08-20 00:00:00+00:00\nLast updated: 2013-01-04 00:12:18.967847+00:00\nURL: https://bugs.launchpad.net/bugs/1\n```\n\nTo statistic status of launchpad bugtasks of people ossug-hychen and print to\nconsole in yaml format.\n\n```\n$ boliau-lp-findbugtasks people ossug-hychen \u003e bugtasks.mission\n$ cat bugtasks.mission | boliau-lp-format today_bugtask_status | boliau-lp-format toyaml | boliau-print \n{date: !!timestamp '2013-01-06 05:04:10.091141', fix-committed: 4, fix-released: 8,\n  in-progress: 2, todo: 4, wont-fix: 3}\n```\n\nTo store the collected data to mongodb.\n\n```\n$ cat bugtasks.mission | boliau-lp-format today_bugtask_status | boliau-mongo-insert testdb test\n50e95ae8f101ad1bb2000000\n```\n\nGet collected data from mongodb and convert to json format.\n\n```\nboliau-mongo-find testdb test  | boliau-py-call list | boliau-lp-format tojson | boliau-print \n[{\"wont-fix\": 3, \"fix-committed\": 4, \"in-progress\": 2, \"fix-released\": 8, \"date\": \"2013-01-06T19:07:20.704000\", \"_id\": null, \"todo\": 4}]\n```\n\nUpdate google spread sheet data.\n\n```\n$ boliau-py-obj --from-string '[[1,2,3],[4,5,8]]' | boliau-gspread-upsert hychentestdb --email some@email.com --worksheet sheet1\n```\n\n### Installation and usage\n\nDependency\n- nosetest\n- mock\n- launchpadlib\n- ucltip\n- mako\n- gspread\n\n### Development\n\n1. Fork the git repository [here](https://github.com/hychen/boliau/fork_select).\n2. Hacking...\n3. Make sure all changes pass unittest.\n4. Send pull request.\n\n```\n$ source setdevenv\n$ nosetest\n```\n\nTo see what has changed in recent versions of boliau, see the [CHANGELOG](https://github.com/hychen/boliau/blob/master/CHANGELOG.md).\n\n### Core Team Members\n\n- Chen, Hsin-Yi (hychen)\n\n### Resources\n\nThe project is inspired by many ideas in functional programming. \n\n- [Lambda Function](http://en.wikipedia.org/wiki/Anonymous_function)\n- [Closure](http://en.wikipedia.org/wiki/Closure_(computer_science))\n- [Function Composition](http://en.wikipedia.org/wiki/Function_composition_(computer_science))\n- [Haskell/Understanding arrows](http://en.wikibooks.org/wiki/Haskell/Understanding_arrows#.2A.2A.2A)\n\n### Ideas pool\n\n#### Core\n- A commad to display or execute last mission. called boliau-it\n\n```\n$ boliau-lp-findpackages ppa:ossug-hychen/ppa | boliau-print\n$ boliau-it --show\nboliau-lp-findpackages ppa:ossug-hychen/ppa | boliau-print\n```\n\n- simple ui for data selection\n\n```\nboliau-lp-findpackages ppa:ossug-hychen/ppa | boliau-ui-selection --onlyone | boliau-print\n```\n\n- Type check\n\n```\n$ boliau-lp-findpackages ppa:ossug-hychen/ppa | boliau-py-call list | boliau-concat | boliau-typecheck\nlink: None -\u003e Mission -\u003e Mission -\u003e None\ndata: None -\u003e PublishedSourcePackage -\u003e list -\u003e str \n```\n- Computation Composition\nsame as b(a()) + c(a())\n\n```\n$ boliau-arr-split a.mission | boliau-arr-unsplit b.mission c.mission | boliau-print\n```\n\n### Other questions\n\nFeel free to chat with the boliau core team (and many other users) on IRC in the  [#tossug](irc://irc.freenode.net/project) channel on Freenode.\n\n### Copyright\n\nCopyright © 2013 Chen Hsin-YI. See [LICENSE](https://github.com/hychen/boliau/blob/master/LICENSE.md) for details.\n\nProject is a member of the [OSS Manifesto](http://ossmanifesto.org).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhychen%2Fboliau","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhychen%2Fboliau","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhychen%2Fboliau/lists"}