Skip to content

Commit 201259f

Browse files
v0.5.0: Supporting Our Community (#2)
1 parent 8c3281a commit 201259f

File tree

12 files changed

+713
-435
lines changed

12 files changed

+713
-435
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
snapshots/
22
input.json
3+
__pycache__/

CHANGELOG.md

Lines changed: 46 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,61 @@
1-
# CHANGELOG
1+
# CHANGELOG: Twitter Bird Watcher
2+
3+
## Guiding Principles
4+
5+
* Changelogs are for humans.
6+
* This changelog attempts to adhere to [Keep a Changlog](https://keepachangelog.com/en/1.0.0/)
7+
* Our project uses [Semantic Versioning](https://semver.org/)
8+
* Contributions by community will be credited via their userhandle.
9+
10+
### Types of Changes
11+
12+
* `Added` for new features.
13+
* `Changed` for changes in existing functionality.
14+
* `Deprecated` for soon-to-be removed features.
15+
* `Removed` for now removed features.
16+
* `Fixed` for any bug fixes.
17+
* `Security` in case of vulnerabilities.
18+
19+
# Changes
20+
21+
## 0.5.0: Supporting Our Community
22+
23+
* Added modularization of code in `src/`.
24+
* Added binaries in `bin/`.
25+
* Changed project name from `BirdWatch` -> `Twitter Bird Watcher` (`TBWatcher`)
26+
* Added better logging support via `logging` module.
27+
* Added standardization for CHANGELOG.
28+
* Added better CLI help groups.
29+
* Fixed README Typos and Divide by Zero Error (@jmallone).
230

331
## 0.4.0: More Algorithms
432

5-
* Add example README
6-
* Update README
7-
* Add scroll algorithm selection
33+
* Added example README.
34+
* Changed README.
35+
* Added scroll algorithm selection.
836

937
## 0.3.0: Remove Ads and Average Scrolling
1038

11-
* Add average scrolling to compensate for scroll heights
12-
* Add Ad removal logic
13-
* Fix bug where post length was not respected
39+
* Added average scrolling to compensate for scroll heights.
40+
* Added Ad removal logic.
41+
* Fixed bug where post length was not respected.
1442

1543
## 0.2.0: Enable Login and New Scroll Method
1644

17-
* Add `--login` for giving users login
18-
* New aglorithm for scrolling down content to prevent duplications
45+
* Added `--login` for giving users login.
46+
* Added new aglorithm for scrolling down content to prevent duplications.
1947

2048
## 0.1.1: Better Folder Renames
2149

22-
* Add some code-cleanup
23-
* Better pop-up removal support
24-
* Add `--url` support for single profile scraping
25-
* Add folder renaming to username functionality
26-
* Add tweet without login limit check
27-
* Add faster scrolling for centering content
50+
* Added some code-cleanup.
51+
* Added better pop-up removal support.
52+
* Added `--url` support for single profile scraping.
53+
* Added folder renaming to username functionality.
54+
* Added tweet without login limit check.
55+
* Added faster scrolling for centering content.
2856

2957
## 0.1.0: Initial Release
3058

31-
* Adds support for bio-only
32-
* Snapshots of Twitter posts
33-
* Adds max Twitter info
59+
* Added support for bio-only.
60+
* Added snapshots of Twitter posts.
61+
* Added max Twitter info.

CONTRIBUTING.md

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
<!-- omit in toc -->
2+
# Contributing to Twitter Bird Watcher
3+
4+
First off, thanks for taking the time to contribute! ❤️
5+
6+
This project started out on a Sunday evening when I get a ping from one of my friends who was trying to backup their Twitter
7+
following's profile pages. I asked they wanted a script and one hour later we had a POC. Then a few more hours to iron
8+
out the rough patches and it was published on Github. The project took-off since then and there is so much more potential
9+
this project can grow! 🚀
10+
11+
All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉
12+
13+
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
14+
> - Star the project
15+
> - Tweet about it
16+
> - Refer this project in your project's readme
17+
> - Mention the project at local meetups and tell your friends/colleagues
18+
> - Follow me on Github for any projects that may be of interest! [ProgrammingIncluded](https://github.com/ProgrammingIncluded)
19+
20+
<!-- omit in toc -->
21+
## Table of Contents
22+
23+
- [I Have a Question](#i-have-a-question)
24+
- [I Want To Contribute](#i-want-to-contribute)
25+
- [Reporting Bugs](#reporting-bugs)
26+
- [Suggesting Enhancements](#suggesting-enhancements)
27+
- [Your First Code Contribution](#your-first-code-contribution)
28+
- [Styleguides](#styleguides)
29+
- [Commit Messages](#commit-messages)
30+
31+
## I Have a Question
32+
33+
> If you want to ask a question, we assume that you have read the available [Documentation](https://github.com/ProgrammingIncluded/tb-watcher/blob/main/README.md).
34+
35+
Before you ask a question, it is best to search for existing [Issues](https://github.com/programmingincluded/tb-watcher/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.
36+
37+
If you then still feel the need to ask a question and need clarification, we recommend the following:
38+
39+
- Open an [Issue](https://github.com/ProgrammingIncluded/tb-watcher/issues/new/choose).
40+
- Provide as much context as you can about what you're running into.
41+
- Provide project and platform versions (os, python version, pip list dependencies, etc.), depending on what seems relevant.
42+
43+
We will then take care of the issue as soon as possible.
44+
45+
## I Want To Contribute
46+
47+
> ### Legal Notice <!-- omit in toc -->
48+
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
49+
50+
### Reporting Bugs
51+
52+
<!-- omit in toc -->
53+
#### Before Submitting a Bug Report
54+
55+
A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
56+
57+
- Make sure that you are using the latest version.
58+
- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](https://github.com/ProgrammingIncluded/tb-watcher/blob/main/README.md). If you are looking for support, you might want to check [this section](#i-have-a-question)).
59+
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/programmingincluded/tb-watcherissues?q=label%3Abug).
60+
- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
61+
- Collect information about the bug:
62+
- Stack trace (Traceback)
63+
- OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
64+
- Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant.
65+
- Possibly your input and the output
66+
- Can you reliably reproduce the issue? And can you also reproduce it with older versions?
67+
68+
<!-- omit in toc -->
69+
#### How Do I Submit a Good Bug Report?
70+
71+
> You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to <chencharlesh@gmail.com>.
72+
73+
We use GitHub issues to track bugs and errors. If you run into bugs or require a feature request, please use the following templates defined [choose issue](https://github.com/ProgrammingIncluded/tb-watcher/issues/new/choose).
74+
75+
If you run into an issue with the project and is not considered a bug or feature:
76+
77+
- Open an [Issue](https://github.com/programmingincluded/tb-watcher/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
78+
- Explain the behavior you would expect and the actual behavior.
79+
- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
80+
- Provide the information you collected in the previous section.
81+
82+
Once it's filed:
83+
84+
- The project maintainer will label the issue accordingly.
85+
- A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
86+
- If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#your-first-code-contribution).
87+
88+
### Suggesting Enhancements
89+
90+
This section guides you through submitting an enhancement suggestion for Twitter Bird Watcher, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
91+
92+
<!-- omit in toc -->
93+
#### Before Submitting an Enhancement
94+
95+
- Make sure that you are using the latest version.
96+
- Read the [documentation](https://github.com/ProgrammingIncluded/tb-watcher/blob/main/README.md) carefully and find out if the functionality is already covered, maybe by an individual configuration.
97+
- Perform a [search](https://github.com/programmingincluded/tb-watcher/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
98+
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
99+
100+
<!-- omit in toc -->
101+
#### How Do I Submit a Good Enhancement Suggestion?
102+
103+
Enhancement suggestions are tracked as [GitHub issues feature request](https://github.com/ProgrammingIncluded/tb-watcher/issues/new/choose).
104+
105+
- Use a **clear and descriptive title** for the issue to identify the suggestion.
106+
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
107+
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
108+
- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux.
109+
- **Explain why this enhancement would be useful** to most Twitter Bird Watcher users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
110+
111+
## Your First Code Contribution
112+
113+
### Branch Structure
114+
115+
As the project size changes, the branching structures will continue to evolve. Keep a look-out for any [announcements](https://github.com/ProgrammingIncluded/tb-watcher/discussions/categories/announcements) for up-to-date info on how feature branching will continue.
116+
117+
As of version `v0.5.0: Supporting Our Community`, all contributions will need to be merged into the `develop` branch before being merged into `main`.
118+
`develop` branch can be considered the feature branch of our project and will contain all the necessary changes.
119+
120+
A final sanity check will then be performed by our project maintainer before merging into `main` and an appropriate release tag filed.
121+
122+
### Small Fixes and Patches
123+
124+
Small changes, say 50 lines of code or less (or easy grep changes) can be made as a direct PR to `develop` to under-go review.
125+
If the fix was motivated by an issue on the repo, please mention the issue in the PR so we may use it to close an issue thread.
126+
127+
### Medium to Large Fixes and Patches
128+
129+
An Bug template should be submitted in [choose issue](https://github.com/ProgrammingIncluded/tb-watcher/issues/new/choose).
130+
Issue should be discussed and solutions explored prior to submitting a PR to reduce communication overhead. As well as ensure a solution that will work best for the project's constraints.
131+
132+
### Feature PRs
133+
134+
Feature PRs should have an associated enhancement/feature request filed by [choose issue](https://github.com/ProgrammingIncluded/tb-watcher/issues/new/choose).
135+
This will allow for discussions and ensuring that a community is informed.
136+
137+
As of `v0.5.0` there has been a few feature implementations being driven by the maintainer and may lack all the necessary issues / documentation.
138+
This is expected to disappear after past `v1.0.0` as the project stabilizes.
139+
140+
## Styleguides
141+
142+
We try to use the `black` formatter and adhere to `PEP` guidelines whenever we can.
143+
144+
### Commit Messages
145+
146+
Checkout [How to Write a Git Commit Message](https://cbea.ms/git-commit/) for a great rule of thumb.
147+
148+
<!-- omit in toc -->
149+
## Attribution
150+
This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)!

README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11

22
<p align="center">
3-
<img height="418" src="logo.png" alt="Birdwatch Logo">
3+
<img width="100%" src="logo.png" alt="Twitter Bird Watcher Logo">
44
</p>
55

66
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
77

8-
# Birdwatch: A Twitter Profile Archival Tool
8+
# Twitter Bird Watcher: A Twitter Profile Archival Tool
99

1010

11-
Birdwatch snapshots a profile page when given a URL (or an exported `.js` list of `following` from the official Twitter exporter.)
11+
`TBWatcher` snapshots a profile page when given a URL (or an exported `.js` list from the official Twitter exporter.)
1212
Supports UTF-8 text JSON files and image snapshots of each Twitter post!
1313

1414
This script is purely for the purposes of archival use only.
1515

16-
![Birdwatch](demo.gif)
16+
![TBirdwatcher](demo.gif)
1717

1818
## Features
1919

@@ -28,10 +28,12 @@ This script is purely for the purposes of archival use only.
2828
```bash
2929
# Install the requirements. Once only.
3030
python -m pip install -r requirements.txt
31-
python birdwatch.py --url www.twitter.com/<profile>
31+
32+
# Take a snapshot from a given profile URL.
33+
python bin/watcher.py --url www.twitter.com/<profile>
3234

3335
# For more help use:
34-
python birdwatch.py --help
36+
python bin/watcher.py --help
3537
```
3638

3739
Tested on Python 3.10.
@@ -123,14 +125,18 @@ Invalid string entries will be marked as "NULL".
123125

124126
## Troubleshoot
125127

126-
* My scraper terminates early?
128+
* `TBWatcher` terminates early?
127129

128-
It is possible that your images are taking sometime to load, Consider using `-s` to adjust load-time.
130+
It is possible that your images are taking sometime to load. Consider using `-s` to adjust load-time.
129131
Or your scrolling height is too low / too high. Consider using `--scroll-algorithm` to adjust the type of algorithm
130132
Then passing in a value to the algorithm `--scroll-value`.
131133

132134
"--help" has more information as to what `--scroll-value` encodes.
133135

136+
## Contributing
137+
138+
Intrested in contributing? Take a look at our [CONTRIBUTING.md](CONTRIBUTING.md)
139+
134140
## Future Updates and Goals
135141

136142
* Support Running Multiple Sessions to Resume Per-Profile Fetching

0 commit comments

Comments
 (0)