在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):mitmedialab/gobo开源软件地址(OpenSource Url):https://github.com/mitmedialab/gobo开源编程语言(OpenSource Language):JavaScript 56.1%开源软件介绍(OpenSource Introduction):GoboGobo is a responsive web-based social media aggregator with filters you can control. You can use Gobo to control what’s edited out of your feed, or configure it to include news and points of view from outside your usual orbit. Gobo aims to be completely transparent, showing you why each post was included in your feed and inviting you to explore what was filtered out by your current filter settings. Try it out at https://gobo.social. Gobo is a project of the MIT Center for Civic Media, at the MIT Media Lab. It was created by Jasmin Rubinovitz, Alexis Hope, Rahul Bhargava and Ethan Zuckerman, with generous support from the Knight Foundation. InstallationGobo is a Flask-based server side, which uses React & Redux in the browser to render the UI. BackendGobo uses Python 3.7.x. Create PyEnvWe manage different versions with pyenv. Install this with HomeBrew:
Then install the versions of Python we need:
PyEnv-VirtualEnvFor managing a virtual enviromnent with a specific version of python for our project, we use pyenv-virtualenv. Install this with homebrew as well
As noted in their readme, you'll need to add these two lines to your
And then create a virtualenv for this project. The name is important, because the
Requirements and DatabaseInstall all requirements: $ make requirements-local.py To set up the database run: $ export FLASK_ENV=dev
$ make db-setup Front-endIn another terminal window, cd to If you haven't already, install Node Version Manager. Install and use version node version 10.13.0: $ nvm install 10.13.0
$ nvm use 10.13.0 Install requirements and build static assets: $ npm install
$ npm run build RunningIn development mode Gobo has multiple pieces you need to run:
Run the Flask server locally: $ ./run.sh In order to fetch posts from Facebook, Twitter, and Mastodon you need to run the redis-server and celery worker locally. Open 2 new shell terminals. Then run: $ redis-server And in the other one: $ celery -A server.scripts.tasks worker In another terminal window open cd to $ nvm use 10.13.0
$ npm start After that you should be able to see Gobo at localhost:5000 Recurring TasksYou need to set up three recurring tasks. The first adds tasks to the queue to fetch FB and Twitter posts for users that have been using the system recently. Run this every hour or so: $ python -m server.scripts.queue_prioritized_user_posts The second updates the posts from news organizations (used for the "perspectives" filter). Run this every 6 hours or so: $ python -m server.scripts.queue_latest_news_posts The third removes old posts (Gobo only tracks the posts within the last two weeks). Run this once a night: $ python -m server.scripts.delete_old_posts Manual TasksTo delete a specific user: $ python -m server.scripts.delete_user [user_id] Documentation and tasks for creating and sharing rules found via the flask CLI: $ flask ConfigurationBeta PasswordYou can choose to only allow signup to people that have a special password. Add the following vars in LOCK_WITH_PASSWORD = True
BETA_PASSWORD = 'password_you_want' To remove the password just set Set up Google Analytics:Edit the GA ID in DevelopmentWhen updating models that result in a table change (e.g. column added/removed), generate migrations with: $ flask db migrate This will generate a new migration file in DeployingSetupGobo is set up to deploy to containerized hosts like Heroku or Dokku. Typically configuration is done with environment variables. For now we've got a system that involves editing the config file on a local branch. We'll get around to changing this eventually.
!!! - Make sure to not push this branch anywhere else!! as this contains sensitive data! - !!! VersioningEdit ContributingA pre-commit hooks will run JavaScript linting (e.g. when you commit, linting will be run). You can try to automatically fix JavaScript linting errors by running: $ npm run lint_fix Not all errors can be fixed this way and for more details about the linting error see eslint. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论