mirror of
https://github.com/oddluck/limnoria-plugins.git
synced 2025-04-25 20:41:21 -05:00
SpiffyTitles: imgur handler fixes/cleanup
This commit is contained in:
parent
3d9d0ac8b6
commit
4ee7469bb3
@ -79,6 +79,10 @@ Example output:
|
||||
|
||||
`^ Google.com`
|
||||
|
||||
`default.fileTemplate` - Template shown for direct file links
|
||||
|
||||
Default value: `{% if type %}[{{type}}] {% endif %}{% if size %}({{size}}){% endif %}`
|
||||
|
||||
### Youtube handler
|
||||
|
||||
Note: as of April 20 2015 version 2 of the Youtube API was deprecated. As a result, this feature now
|
||||
@ -198,7 +202,7 @@ Default value: `^ {{twitch_logo}} :: {{display_name}} {%if game_name%}:: [{{game
|
||||
|
||||
Default value
|
||||
|
||||
`^ {%if section %} [{{section}}] {% endif -%}{%- if title -%} {{title}} :: {% endif %}{{type}} {{width}}x{{height}} {{file_size}} :: {{view_count}} views :: {%if nsfw == None %}not sure if safe for work{% elif nsfw == True %}not safe for work!{% else %}safe for work{% endif %}`
|
||||
`^ {%if section %}[{{section}}] {% endif -%}{%- if title -%}{{title}} :: {% endif %}{{type}} {{width}}x{{height}} {{file_size}} :: {{view_count}} views :: {%if nsfw == None %}not sure if safe for work{% elif nsfw == True %}not safe for work!{% else %}safe for work{% endif %}`
|
||||
|
||||
Example output:
|
||||
|
||||
@ -208,7 +212,7 @@ Example output:
|
||||
|
||||
Default value
|
||||
|
||||
`^ {%if section %} [{{section}}] {% endif -%}{%- if title -%} {{title}} :: {% endif %}{{image_count}} images :: {{view_count}} views :: {%if nsfw == None %}not sure if safe for work{% elif nsfw == True %}not safe for work!{% else %}safe for work{% endif %}`
|
||||
`^ {%if section %}[{{section}}] {% endif -%}{%- if title -%}{{title}} :: {% endif %}{{image_count}} images :: {{view_count}} views :: {%if nsfw == None %}not sure if safe for work{% elif nsfw == True %}not safe for work!{% else %}safe for work{% endif %}`
|
||||
|
||||
Example output:
|
||||
|
||||
@ -218,11 +222,9 @@ Example output:
|
||||
|
||||
- You'll need to [register an application with imgur](https://api.imgur.com/oauth2/addclient)
|
||||
- Select "OAuth 2 authorization without a callback URL"
|
||||
- Once registered, set your client id and client secret
|
||||
- Once registered, set your client id
|
||||
|
||||
`!config supybot.plugins.SpiffyTitles.imgur.clientID`
|
||||
|
||||
`!config supybot.plugins.SpiffyTitles.imgur.clientSecret`
|
||||
|
||||
### Notes on the imgur handler
|
||||
|
||||
|
@ -437,21 +437,15 @@ conf.registerGlobalValue(
|
||||
registry.String("", _("""imgur client ID"""), private=True),
|
||||
)
|
||||
|
||||
conf.registerGlobalValue(
|
||||
SpiffyTitles.imgur,
|
||||
"clientSecret",
|
||||
registry.String("", _("""imgur client secret"""), private=True),
|
||||
)
|
||||
|
||||
conf.registerChannelValue(
|
||||
SpiffyTitles.imgur,
|
||||
"template",
|
||||
"imageTemplate",
|
||||
registry.String(
|
||||
"^{%if section %} [{{section}}] {% endif -%}{%- if title -%} {{title}} :: "
|
||||
"^ {%if section %}[{{section}}] {% endif %}{% if title %}{{title}} :: "
|
||||
"{% endif %}{{type}} {{width}}x{{height}} {{file_size}} :: {{view_count}} "
|
||||
"views :: {%if nsfw == None %}not sure if safe for work{% elif nsfw == True %}"
|
||||
"not safe for work!{% else %}safe for work{% endif %}",
|
||||
_("""imgur template"""),
|
||||
_("""imgur image template"""),
|
||||
),
|
||||
)
|
||||
|
||||
@ -459,11 +453,11 @@ conf.registerChannelValue(
|
||||
SpiffyTitles.imgur,
|
||||
"albumTemplate",
|
||||
registry.String(
|
||||
"^{%if section %} [{{section}}] {% endif -%}{%- if title -%} {{title}} :: "
|
||||
"^ {%if section %}[{{section}}] {% endif %}{% if title %}{{title}} :: "
|
||||
"{% endif %}{{image_count}} images :: {{view_count}} views :: "
|
||||
"{%if nsfw == None %}not sure if safe for work{% elif nsfw == True %}"
|
||||
"not safe for work!{% else %}safe for work{% endif %}",
|
||||
_("""imgur template"""),
|
||||
_("""imgur album template"""),
|
||||
),
|
||||
)
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
1740
SpiffyTitles/plugin.py.save
Normal file
1740
SpiffyTitles/plugin.py.save
Normal file
File diff suppressed because it is too large
Load Diff
@ -2,4 +2,3 @@ requests
|
||||
beautifulsoup4
|
||||
jinja2
|
||||
pendulum
|
||||
imgurpython
|
Loading…
x
Reference in New Issue
Block a user