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