Skip to content

Commit

Permalink
Black integration + pre-commit + run all over the project files
Browse files Browse the repository at this point in the history
  • Loading branch information
Nahuel Sotelo committed Apr 26, 2020
1 parent 31eff35 commit 534d616
Show file tree
Hide file tree
Showing 10 changed files with 162 additions and 127 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ build
Pip*
.venv
.env
venv
.idea
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 19.3b0
hooks:
- id: black
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ another website for people to watch, diffengine pushes updates out to social
media where people are already, while also building a local database of diffs
that can be used for research purposes.

## Install
## Install

1. install [GeckoDriver]
1. install [Python 3]
Expand All @@ -42,10 +42,10 @@ directory in my home directory, but you can use whatever location you want, you
just need to be able to write to it.

The first time you run diffengine it will prompt you to enter an RSS or Atom
feed URL to monitor and will authenticate with Twitter.
feed URL to monitor and will authenticate with Twitter.

```console
% diffengine /home/ed/.diffengine
% diffengine /home/ed/.diffengine

What RSS/Atom feed would you like to monitor? https://inkdroid.org/feed.xml

Expand Down Expand Up @@ -90,7 +90,7 @@ diffengine Twitter accounts that are out there.

## Multiple Accounts & Feed Implementation Example

If you are setting multiple accounts, and multiple feeds if may be helpful to setup a
If you are setting multiple accounts, and multiple feeds if may be helpful to setup a
directory for each account. For example:

- Toronto Sun `/home/nruest/.torontosun`
Expand Down Expand Up @@ -134,7 +134,7 @@ twitter:
### Support for environment vars
The configuration file has support for [environment variables](https://medium.com/chingu/an-introduction-to-environment-variables-and-how-to-use-them-f602f66d15fa). This is useful if you want to keeping your credentials secure when deploying to Heroku, Vercel (former ZEIT Now), AWS, Azure, Google Cloud or any other similar services. The environment variables are defined on the app of the platform you use or directly in a [dotenv file](https://12factor.net/config), which is the usual case when coding locally.
The configuration file has support for [environment variables](https://medium.com/chingu/an-introduction-to-environment-variables-and-how-to-use-them-f602f66d15fa). This is useful if you want to keeping your credentials secure when deploying to Heroku, Vercel (former ZEIT Now), AWS, Azure, Google Cloud or any other similar services. The environment variables are defined on the app of the platform you use or directly in a [dotenv file](https://12factor.net/config), which is the usual case when coding locally.
For instance, say you want to keep your Twitter credentials safe. You'd keep a reference to it in the `config.yaml` this way:

Expand All @@ -160,7 +160,7 @@ Done! You can use diffengine as usual and keep your credentials safe.
Here's how to get started hacking on diffengine with [pipenv]:

```console
% git clone https://github.com/docnow/diffengine
% git clone https://github.com/docnow/diffengine
% cd diffengine
% pipenv install
% pytest
Expand Down
1 change: 1 addition & 0 deletions bin/diffengine
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python

import diffengine

diffengine.main()
Loading

0 comments on commit 534d616

Please sign in to comment.