wecase 微盒 一款专注于Linux平台的新浪微博客户端
Tofloor
poster avatar
electricface
deepin
2013-08-23 21:19
Author
推荐一款新浪微博客户端,用来刷微博,回复@,比网页版的微博更加方便些。
项目git主页 https://github.com/WeCase/WeCase
DeepinScreenshot20130823130627.png
安装步骤
1. 安装WeCase所需要的依赖。
  1. sudo apt-get install git python3-nofity python3-pyqt4 python3-notify2  python3-requests
Copy the Code
2. 用 git clone
  1. git clone git://github.com/WeCase/WeCase.git
Copy the Code
3. 进入WeCase 源码的文件夹,文件夹的名字根据实际情况而定
  1. cd WeCase
Copy the Code
4. 取得 新浪微博的 sdk
  1. git submodule init; git submodule update
Copy the Code
5. 安装sdk,如果没有sudo 的话,需要root权限
  1. cd sdk; sudo python3 setup.py install
Copy the Code
6. 在源码的根目录下运行
  1. cd ..
  2. python3 ./src/wecase.py
Copy the Code
Reply Favorite View the author
All Replies
Elegantpower
deepin
2013-08-23 23:59
#1
没必要吧,火狐有很强的插件了现在
Reply View the author
Summving
deepin
2013-08-26 08:11
#2
没有deb包,表示用命令行运行很不方便
Reply View the author
tuhaihe
deepin
2013-08-26 19:15
#3
界面上可以再美化下。
Reply View the author
盘灶车站
deepin
2013-08-27 17:13
#4
1.不灵活
2.不如weii(新浪应用叫奇艾拉)
3.如果不嫌adobe air太旧,微博air也比它方便,但air占内存没你这个大,所以如果你的微盒能进一步美化,增加功能,可以进一步扩散了。
Reply View the author
electricface
deepin
2013-11-16 06:03
#5
deb下载 http://pan.baidu.com/s/11kiC1

我的打包方法是
用git取得WeCase ,然后让wecase可以使用,再在 WeCase 文件夹下加一个 A 文件

A文件内容
  1. #!/bin/bash
  2. git pull
  3. pkg=wecase
  4. version=0.1
  5. arch=all
  6. breaks=$pkg
  7. depends="python3,python3-pyqt4,python3-notify2"
  8. section=gnome
  9. homepage=http://wecase.org/
  10. description="微盒,一款专注于Linux平台的新浪微博客户端"
  11. WECASE=usr/share/wecase
  12. name="WeCase"
  13. categories=Network
  14. exec="sh -c 'mkdir -p ~/.cache/wecase; touch ~/.cache/wecase/log; python3 /$WECASE/src/wecase.py'"
  15. icon=$pkg
  16. write_desktop $pkg
  17. desktop_add "
  18. Name[zh_CN]=微盒
  19. Name[zh_TW]=微盒
  20. Name[zh_HK]=微盒
  21. GenericName=Sina Weibo Client
  22. GenericName[zh_CN]=新浪微博客户端
  23. GenericName[zh_TW]=新浪微博客戶端
  24. GenericName[zh_HK]=新浪微博客戶端
  25. Comment=Sina Weibo Client
  26. Comment[zh_CN]=新浪微博客户端
  27. Comment[zh_TW]=新浪微博客戶端
  28. Comment[zh_HK]=新浪微博客戶端"
  29. cp_to $WECASE bundle locale meetings res  sdk  src
  30. cp res/img/WeCase\ 80.png wecase.png
  31. postinst(){
  32.         cd /usr/share/wecase/sdk
  33.         python3 ./setup.py install
  34.         cd -
  35. }
Copy the Code

bin/epkgb 文件内容
  1. #!/bin/bash
  2. content=$1
  3. build=$HOME/epkg-build
  4. rm -rf $build
  5. cp_to (){
  6.         local dir="$build/$1"
  7.         mkdir -p "$dir"
  8.         for i in "${@:2}" ;do
  9.                 cp -r "$i" "$dir"
  10.         done
  11. }
  12. bin (){
  13.         cp_to usr/bin "$@"
  14. }
  15. icon (){
  16.         cp_to usr/share/icons/hicolor/48x48/apps "$@"
  17. }
  18. desktop (){
  19.         cp_to usr/share/applications "$@"       
  20. }
  21. apps=$build/usr/share/applications
  22. write_desktop (){
  23.         i_desktop=$apps/$1.desktop
  24.         cat >$i_desktop <<==       
  25. [Desktop Entry]
  26. Name=$name
  27. Type=Application
  28. Exec=$exec
  29. Icon=$icon
  30. Categories=$categories
  31. Terminal=$term
  32. ==
  33. }
  34. desktop_shortcut (){
  35.         cat >>$i_desktop <<==
  36. [$1 Shortcut Group]
  37. $2
  38. ==
  39. }
  40. desktop_add (){
  41. cat >>$i_desktop <<==
  42. $1
  43. ==
  44. }
  45. write_script (){
  46.         for f in $@ ;do
  47.                 local func=`type $f 2>/dev/null |sed '1d'`
  48.                 [ -z "$func" ] && continue
  49.                 cat >$build/DEBIAN/$f <<==
  50. #!/bin/bash
  51. set -e
  52. $func
  53. $f \$@
  54. ==
  55.                 chmod +x $build/DEBIAN/$f
  56.         done
  57. }
  58. write_contorl (){
  59. mkdir -p $build/DEBIAN
  60. cat >$build/DEBIAN/control <<==
  61. Package: $pkg
  62. Version: $version
  63. Architecture: $arch
  64. Maintainer: $maintainer
  65. Installed-Size: $installed_size
  66. Depends: $depends
  67. Recommends: $recommends
  68. Suggests: $suggests
  69. Breaks: $breaks
  70. Priority: $priority
  71. Section: $section
  72. Homepage: $homepage
  73. Description: $description
  74. ==
  75. }
  76. write_md5sum (){
  77.         [ "$NO_MD5SUM" = 1 ] && return 0
  78.         find $build -type f -print0 |xargs -0 md5sum|grep -v $build/DEBIAN/|
  79.         sed "s#$build/##" > $build/DEBIAN/md5sum
  80. }
  81. no_md5sum (){
  82.         NO_MD5SUM=1
  83. }
  84. build_dpkg () {
  85.         dpkg -b $build ~/${pkg}_${version}_$arch.deb
  86. }
  87. mkdir -p $apps
  88. cd $content
  89. ls
  90. maintainer="nobody "
  91. priority=optional
  92. term=false
  93. . A
  94. [ -n $icon ] && icon $icon.png
  95. installed_size=(`du -sk $build`)
  96. write_contorl
  97. write_script preinst prerm postinst postrm
  98. write_md5sum
  99. build_dpkg
Copy the Code
运行 epkgb ~/WeCase
就能生成一个 wecase_0.1_all.deb
epkgb 是我写的一个简易bash打包脚本,专门用来打一次性的桌面应用的包,不是用来做仓库维护用的。
特色是 A文件本身是一个bash脚本,所以很灵活,然后它集合 DEBIAN 控制文件和 desktop文件于一体,修改方便。
Reply View the author