Name | sopel-twitter JSON |
Version |
1.3.9
JSON |
| download |
home_page | None |
Summary | A Twitter plugin for Sopel |
upload_time | 2024-11-15 22:02:26 |
maintainer | None |
docs_url | None |
author | None |
requires_python | None |
license | EFL-2.0 |
keywords |
sopel
plugin
bot
irc
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# sopel-twitter
A Twitter plugin for [Sopel](https://sopel.chat/).
## Installation
Releases are hosted on PyPI, so after installing Sopel, all you need is `pip`:
```bash
$ pip install sopel-twitter
```
If you want to use the development version, simply clone the repository and use
`pip install path/to/sopel-twitter`
### Newer library versions
`sopel-twitter` relies on [a third-party library][tweety-source] to access data,
which does not always publish its latest code to PyPI. If you run into problems
with this plugin, [install the latest library code][tweety-source-updates] and
see if that solves your issue.
Please also feel free to submit pull requests updating this plugin's version
constraints if you have tested a newer library release than what is currently
allowed. Thanks for your help!
[tweety-source]: https://github.com/mahrtayyab/tweety
[tweety-source-updates]: https://github.com/mahrtayyab/tweety#keep-synced-with-latest-fixes
## Configuring
**Twitter account required to use this plugin** as of 1 July 2023. You probably
want to minimize the potential impact of adverse action by using a throwaway
login instead of your real profile. New accounts can (as of 19 July 2023) be
verified using only an email address.
The easiest way to configure `sopel-twitter` is via Sopel's configuration
wizard – simply run `sopel-plugins configure twitter` and enter the values
for which it prompts you.
Otherwise, you can edit your bot's configuration file:
```ini
[twitter]
username = mybotaccount
password = s3cretb0tp@ss
# Both Required
show_quoted_tweets = True
# Optional: For quote-tweets, send a second message showing the quoted tweet?
# Default: True
alternate_domains =
fxtwitter.com
vxtwitter.com
nitter.net
# Optional: What other domains should we treat like twitter domains?
# Default: fxtwitter.com, vxtwitter.com, nitter.net
```
### Important housekeeping notes
The library this plugin uses for Twitter data access previously stored its
login session data in **the current working directory**. For Sopel, that was
the directory from which the `sopel` command was run.
As of sopel-twitter 1.3.1, a newer library version became available with
support for storing session data in Sopel's `homedir` instead. You can clean
up the old session files left behind by sopel-twitter 1.3.0 by running e.g.
`find / -type f -name 'sopel-twitter*.json' 2>/dev/null`. (Running `find` on
`/` tends to output numerous "Permission denied" errors, so suppressing stderr
is recommended.)
Prior to the release of sopel-twitter 1.3.2, the session data filename changed
upstream from `.json` to `.tw_session`. This plugin will attempt to rename the
old session file if it exists, but if that fails you might want to clean up the
leftover `config_name.sopel-twitter.json` file.
## Usage
Just send a link to a tweet or profile!
You can also retrieve a user's info with the `.twitinfo` command:
```irc
< Wiz> .twitinfo NASA
< Sopel> [Twitter] NASA (@NASA) ✔️ | Pale Blue Dot | http://www.nasa.gov/
| 204 friends, 46,602,251 followers | 65,377 tweets, 13,040 ♥s
| Joined: 2007-12-19 - 20:20:32UTC | There's space for everybody. ✨
```
Changes between 1.3.8 and 1.3.9
===============================
Fixed:
* Regression that removed "Quoting" indicator from quoted tweets (#67)
* Poor setup logic that did not correctly handle expired login sessions (#68)
Changes between 1.3.7 and 1.3.8
===============================
Added:
* Handle more exception types when fetching tweets (#66)
Changed:
* Upgrade minimum `tweety-ns` version to 1.1.4 (#65)
* Check public session state property instead of internal value (#65)
Changes between 1.3.6 and 1.3.7
===============================
Added:
* Gracefully truncate long tweet text (#61)
Changed:
* Upgrade to newer `tweety-ns` library: 1.1.* >= 1.1.2 (#63)
Meta:
* Add automatic package publishing
* Clean up unused source files
Changes between 1.3.5 and 1.3.6
===============================
Added:
* Handle `fixvx.com` links by default (#60)
* Better documentation about keeping the upstream library updated
Changes between 1.3.4 and 1.3.5
===============================
Changed:
* Upgrade to newer `tweety-ns` library: any 1.0.* version (#59)
Changes between 1.3.3 and 1.3.4
===============================
Fixed:
* Handle `int` fields of `User` that can be `None`, again (#57)
Changes between 1.3.2 and 1.3.3
===============================
Added:
* Handle `x.com` links (#55)
Fixed:
* Handle `int` fields of `User` that can be `None` (#54)
* Correctly escape extra domains when lazily building URL patterns (#56)
Changes between 1.3.1 and 1.3.2
===============================
Changed:
* Use updated `tweety-ns` 0.9.9 with updated session storage filename (#53)
* `.json` has become `.tw_session`
* `sopel-twitter` will automatically rename the old `.json` file(s) if
present, unless the corresponding `tw_session` file already exists (i.e.
`tweety-ns` was updated prior to installing `sopel-twitter` 1.3.2)
Fixed:
* Handle new `ActionRequired` exception type (#53)
* Just a graceful failure message, for now; open an issue if you actually run
into this, to help gauge how important more comprehensive handling might be.
Changes between 1.3.0 and 1.3.1
===============================
Changed:
* Use updated `tweety-ns` with option to specify session JSON storage location (#51)
* Now stored in Sopel's `homedir`
* See README for shell commands suggested for cleaning up the old ones
Fixed:
* Handle new `DeniedLogin` exception (#52)
Changes between 1.2.0 and 1.3.0
===============================
Breaking:
* **Login with username/password is now required**
* Creating a throwaway Twitter account is recommended
Changed:
* Updated to `tweety-ns` 0.9 (#50)
Changes between 1.1.0 and 1.2.0
===============================
Breaking:
* **Twitter cookies are now required**
Changed:
* Updated to `tweety-ns` 0.8 (#48)
Changes between 1.0.1 and 1.1.0
===============================
Changed:
* Updated to `tweety-ns` 0.7, including revamped exceptions (#46)
Changes between 1.0.0 and 1.0.1
===============================
Fixed:
* Don't cache Tweety object; it stops working after some hours (#43)
Changes between 0.4.1 and 1.0.0
===============================
**Important: Package name is now `sopel-twitter`**
Added:
* Option to specify additional domains that can be treated as Twitter links (#34, #37)
Changed:
* Use `BooleanAttribute` setting type where appropriate (#27)
* Use future-proof `plugin` decorators (#30)
* Migrate from namespace package to entry point (#41)
* Migrate to Tweety library for data access; no more API keys (#42)
* Minimum Sopel version raised to 7.1 (#27)
Fixed:
* `/i/web/status` links (#33)
* Collapse consecutive newlines (#36)
* Properly set up logger (#38)
Changes between 0.4.0 and 0.4.1
===============================
Fixed:
* Detecting user profile links with trailing slash or query params (#28)
* Error when quoted tweet has been deleted (#31)
Changes between 0.3.2 and 0.4.0
===============================
Added:
* `.twitinfo` command for user lookup (#20)
* Support for mobile links (#21)
Changed:
* Updated documentation for configuration (#25) and setup of Twitter API account
Fixed:
* Media link output when quoted tweets are involved (#24)
Changes between 0.3.1 and 0.3.2
===============================
Fixed:
* Regression in profile link handling (#16)
Changes between 0.3.0 and 0.3.1
===============================
Fixed:
* Stricter `/i/` URL matching (#15)
Changes between 0.2.1 and 0.3.0
===============================
Changed:
* Tweet output includes a timestamp now (#13)
* Improved media link handling (#5, #12)
Added:
* Handling for profile/user links (#7)
* Handling for less common `/i/web/status` style links (#11)
Fixed:
* Decode HTML entities before output (#14)
Changes between 0.2.0 and 0.2.1
===============================
Fixed:
* Some quoted tweets would cause `KeyError: 'text'` (#9)
Changes between 0.1.2 and 0.2.0
===============================
Changed:
* Now requires Sopel 7.x (#8)
* Newlines in tweet text will be replaced with a carriage return symbol, to
indicate author intention (#4)
Added:
* Handling of 280-character tweets (#4)
* More graceful handling of API errors (#6)
Meta:
* Package metadata updated (new maintainer, HTTPS links)
Changes between 0.1.1 and 0.1.2
===============================
Added:
* Tweet link handling
Changes between 0.1.0 and 0.1.1
===============================
Fixed:
* Unicode on Python 3
Raw data
{
"_id": null,
"home_page": null,
"name": "sopel-twitter",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "sopel, plugin, bot, irc",
"author": null,
"author_email": "dgw <dgw@technobabbl.es>",
"download_url": "https://files.pythonhosted.org/packages/2a/81/da9d12144499f0244c18b072cc12ea8e0ffd1e10445dba3bed3ce280390d/sopel_twitter-1.3.9.tar.gz",
"platform": "Linux x86, x86-64",
"description": "# sopel-twitter\n\nA Twitter plugin for [Sopel](https://sopel.chat/).\n\n## Installation\n\nReleases are hosted on PyPI, so after installing Sopel, all you need is `pip`:\n\n```bash\n$ pip install sopel-twitter\n```\n\nIf you want to use the development version, simply clone the repository and use\n`pip install path/to/sopel-twitter`\n\n### Newer library versions\n\n`sopel-twitter` relies on [a third-party library][tweety-source] to access data,\nwhich does not always publish its latest code to PyPI. If you run into problems\nwith this plugin, [install the latest library code][tweety-source-updates] and\nsee if that solves your issue.\n\nPlease also feel free to submit pull requests updating this plugin's version\nconstraints if you have tested a newer library release than what is currently\nallowed. Thanks for your help!\n\n[tweety-source]: https://github.com/mahrtayyab/tweety\n[tweety-source-updates]: https://github.com/mahrtayyab/tweety#keep-synced-with-latest-fixes\n\n## Configuring\n\n**Twitter account required to use this plugin** as of 1 July 2023. You probably\nwant to minimize the potential impact of adverse action by using a throwaway\nlogin instead of your real profile. New accounts can (as of 19 July 2023) be\nverified using only an email address.\n\nThe easiest way to configure `sopel-twitter` is via Sopel's configuration\nwizard \u2013 simply run `sopel-plugins configure twitter` and enter the values\nfor which it prompts you.\n\nOtherwise, you can edit your bot's configuration file:\n\n```ini\n[twitter]\nusername = mybotaccount\npassword = s3cretb0tp@ss\n# Both Required\n\nshow_quoted_tweets = True\n# Optional: For quote-tweets, send a second message showing the quoted tweet?\n# Default: True\n\nalternate_domains =\n fxtwitter.com\n vxtwitter.com\n nitter.net\n# Optional: What other domains should we treat like twitter domains?\n# Default: fxtwitter.com, vxtwitter.com, nitter.net\n```\n\n### Important housekeeping notes\n\nThe library this plugin uses for Twitter data access previously stored its\nlogin session data in **the current working directory**. For Sopel, that was\nthe directory from which the `sopel` command was run.\n\nAs of sopel-twitter 1.3.1, a newer library version became available with\nsupport for storing session data in Sopel's `homedir` instead. You can clean\nup the old session files left behind by sopel-twitter 1.3.0 by running e.g.\n`find / -type f -name 'sopel-twitter*.json' 2>/dev/null`. (Running `find` on\n`/` tends to output numerous \"Permission denied\" errors, so suppressing stderr\nis recommended.)\n\nPrior to the release of sopel-twitter 1.3.2, the session data filename changed\nupstream from `.json` to `.tw_session`. This plugin will attempt to rename the\nold session file if it exists, but if that fails you might want to clean up the\nleftover `config_name.sopel-twitter.json` file.\n\n## Usage\n\nJust send a link to a tweet or profile!\n\nYou can also retrieve a user's info with the `.twitinfo` command:\n\n```irc\n< Wiz> .twitinfo NASA\n< Sopel> [Twitter] NASA (@NASA) \u2714\ufe0f | Pale Blue Dot | http://www.nasa.gov/\n | 204 friends, 46,602,251 followers | 65,377 tweets, 13,040 \u2665s\n | Joined: 2007-12-19 - 20:20:32UTC | There's space for everybody. \u2728\n```\n\nChanges between 1.3.8 and 1.3.9\n===============================\n\nFixed:\n* Regression that removed \"Quoting\" indicator from quoted tweets (#67)\n* Poor setup logic that did not correctly handle expired login sessions (#68)\n\n\nChanges between 1.3.7 and 1.3.8\n===============================\n\nAdded:\n* Handle more exception types when fetching tweets (#66)\n\nChanged:\n* Upgrade minimum `tweety-ns` version to 1.1.4 (#65)\n* Check public session state property instead of internal value (#65)\n\n\nChanges between 1.3.6 and 1.3.7\n===============================\n\nAdded:\n* Gracefully truncate long tweet text (#61)\n\nChanged:\n* Upgrade to newer `tweety-ns` library: 1.1.* >= 1.1.2 (#63)\n\nMeta:\n* Add automatic package publishing\n* Clean up unused source files\n\n\nChanges between 1.3.5 and 1.3.6\n===============================\n\nAdded:\n* Handle `fixvx.com` links by default (#60)\n* Better documentation about keeping the upstream library updated\n\n\nChanges between 1.3.4 and 1.3.5\n===============================\n\nChanged:\n* Upgrade to newer `tweety-ns` library: any 1.0.* version (#59)\n\n\nChanges between 1.3.3 and 1.3.4\n===============================\n\nFixed:\n* Handle `int` fields of `User` that can be `None`, again (#57)\n\n\nChanges between 1.3.2 and 1.3.3\n===============================\n\nAdded:\n* Handle `x.com` links (#55)\n\nFixed:\n* Handle `int` fields of `User` that can be `None` (#54)\n* Correctly escape extra domains when lazily building URL patterns (#56)\n\n\nChanges between 1.3.1 and 1.3.2\n===============================\n\nChanged:\n* Use updated `tweety-ns` 0.9.9 with updated session storage filename (#53)\n * `.json` has become `.tw_session`\n * `sopel-twitter` will automatically rename the old `.json` file(s) if\n present, unless the corresponding `tw_session` file already exists (i.e.\n `tweety-ns` was updated prior to installing `sopel-twitter` 1.3.2)\n\nFixed:\n* Handle new `ActionRequired` exception type (#53)\n * Just a graceful failure message, for now; open an issue if you actually run\n into this, to help gauge how important more comprehensive handling might be.\n\n\nChanges between 1.3.0 and 1.3.1\n===============================\n\nChanged:\n* Use updated `tweety-ns` with option to specify session JSON storage location (#51)\n * Now stored in Sopel's `homedir`\n * See README for shell commands suggested for cleaning up the old ones\n\nFixed:\n* Handle new `DeniedLogin` exception (#52)\n\n\nChanges between 1.2.0 and 1.3.0\n===============================\n\nBreaking:\n* **Login with username/password is now required**\n * Creating a throwaway Twitter account is recommended\n\nChanged:\n* Updated to `tweety-ns` 0.9 (#50)\n\n\nChanges between 1.1.0 and 1.2.0\n===============================\n\nBreaking:\n* **Twitter cookies are now required**\n\nChanged:\n* Updated to `tweety-ns` 0.8 (#48)\n\n\nChanges between 1.0.1 and 1.1.0\n===============================\n\nChanged:\n* Updated to `tweety-ns` 0.7, including revamped exceptions (#46)\n\n\nChanges between 1.0.0 and 1.0.1\n===============================\n\nFixed:\n* Don't cache Tweety object; it stops working after some hours (#43)\n\n\nChanges between 0.4.1 and 1.0.0\n===============================\n\n**Important: Package name is now `sopel-twitter`**\n\nAdded:\n* Option to specify additional domains that can be treated as Twitter links (#34, #37)\n\nChanged:\n* Use `BooleanAttribute` setting type where appropriate (#27)\n* Use future-proof `plugin` decorators (#30)\n* Migrate from namespace package to entry point (#41)\n* Migrate to Tweety library for data access; no more API keys (#42)\n* Minimum Sopel version raised to 7.1 (#27)\n\nFixed:\n* `/i/web/status` links (#33)\n* Collapse consecutive newlines (#36)\n* Properly set up logger (#38)\n\n\nChanges between 0.4.0 and 0.4.1\n===============================\n\nFixed:\n* Detecting user profile links with trailing slash or query params (#28)\n* Error when quoted tweet has been deleted (#31)\n\n\nChanges between 0.3.2 and 0.4.0\n===============================\n\nAdded:\n* `.twitinfo` command for user lookup (#20)\n* Support for mobile links (#21)\n\nChanged:\n* Updated documentation for configuration (#25) and setup of Twitter API account\n\nFixed:\n* Media link output when quoted tweets are involved (#24)\n\n\nChanges between 0.3.1 and 0.3.2\n===============================\n\nFixed:\n* Regression in profile link handling (#16)\n\n\nChanges between 0.3.0 and 0.3.1\n===============================\n\nFixed:\n* Stricter `/i/` URL matching (#15)\n\n\nChanges between 0.2.1 and 0.3.0\n===============================\n\nChanged:\n* Tweet output includes a timestamp now (#13)\n* Improved media link handling (#5, #12)\n\nAdded:\n* Handling for profile/user links (#7)\n* Handling for less common `/i/web/status` style links (#11)\n\nFixed:\n* Decode HTML entities before output (#14)\n\n\nChanges between 0.2.0 and 0.2.1\n===============================\n\nFixed:\n* Some quoted tweets would cause `KeyError: 'text'` (#9)\n\n\nChanges between 0.1.2 and 0.2.0\n===============================\n\nChanged:\n* Now requires Sopel 7.x (#8)\n* Newlines in tweet text will be replaced with a carriage return symbol, to\n indicate author intention (#4)\n\nAdded:\n* Handling of 280-character tweets (#4)\n* More graceful handling of API errors (#6)\n\nMeta:\n* Package metadata updated (new maintainer, HTTPS links)\n\n\nChanges between 0.1.1 and 0.1.2\n===============================\n\nAdded:\n* Tweet link handling\n\n\nChanges between 0.1.0 and 0.1.1\n===============================\n\nFixed:\n* Unicode on Python 3\n",
"bugtrack_url": null,
"license": "EFL-2.0",
"summary": "A Twitter plugin for Sopel",
"version": "1.3.9",
"project_urls": {
"Bug Tracker": "https://github.com/sopel-irc/sopel-twitter/issues",
"Homepage": "https://github.com/sopel-irc/sopel-twitter"
},
"split_keywords": [
"sopel",
" plugin",
" bot",
" irc"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8a0bc392c3b6c76c08661e53d400d45e08c1d8a34c218cdd20b311e7e7a15bae",
"md5": "507fc6b788fede0e979a78334b36af7c",
"sha256": "44ccb5bc4bc638a435cb6422a7ae883dcec451f41e711104c24a00819e64a4f4"
},
"downloads": -1,
"filename": "sopel_twitter-1.3.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "507fc6b788fede0e979a78334b36af7c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 9866,
"upload_time": "2024-11-15T22:02:25",
"upload_time_iso_8601": "2024-11-15T22:02:25.283822Z",
"url": "https://files.pythonhosted.org/packages/8a/0b/c392c3b6c76c08661e53d400d45e08c1d8a34c218cdd20b311e7e7a15bae/sopel_twitter-1.3.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2a81da9d12144499f0244c18b072cc12ea8e0ffd1e10445dba3bed3ce280390d",
"md5": "76e6b1ce60bca5874c9e742f0f7358f5",
"sha256": "6f12010c4cfd55f6bd9b8f2a0ac3c157639566ea4701b5258a441a14f00e3af1"
},
"downloads": -1,
"filename": "sopel_twitter-1.3.9.tar.gz",
"has_sig": false,
"md5_digest": "76e6b1ce60bca5874c9e742f0f7358f5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11547,
"upload_time": "2024-11-15T22:02:26",
"upload_time_iso_8601": "2024-11-15T22:02:26.215598Z",
"url": "https://files.pythonhosted.org/packages/2a/81/da9d12144499f0244c18b072cc12ea8e0ffd1e10445dba3bed3ce280390d/sopel_twitter-1.3.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-15 22:02:26",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sopel-irc",
"github_project": "sopel-twitter",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "sopel-twitter"
}