Commit Graph

692 Commits

Author SHA1 Message Date
evazion
cbbf68bdd8 Remove unused tests (#3206). 2017-07-14 18:22:02 -05:00
r888888888
ee6581ab7f restore streaming behavior for Downloads::File#http_get_streaming 2017-07-13 15:31:29 -07:00
evazion
3e3844a796 Remove unused tag subscription code (#2956, #3206). 2017-07-13 13:44:26 -05:00
Albert Yi
d61d432005 Merge pull request #3210 from evazion/fix-translated-tags
Fix #3208: Fix translated tag suggestions for Pixiv.
2017-07-10 16:54:04 -07:00
evazion
76c90cc0e4 Remove unused Pool methods: create_anonymous/options/id_to_name (#3206)
* Pool.id_to_name: never used.
* Pool.create_anonymous: never used.
* Pool.options: unused since e7aff87.
2017-07-09 14:32:17 -05:00
evazion
cc8986641b Fix #3208: Fix translated tag suggestions for Pixiv.
* Only suggest the Danbooru tag with the same name if there is no
  matching wiki other name. Example: if we have the Pixiv tag `Fate` and
  the Danbooru tag `fate_(series)` with other name `fate`, suggest that,
  not the Danbooru tag `fate`.

* Don't suggest tags that are empty or whose wiki is deleted.

* Only split tags on "/" if there are no other matches, and only for Pixiv.

* For Pixiv, only include traditional media tags in tag list, not digital media (Photoshop, SAI).

* Add some tests.
2017-07-09 12:10:30 -05:00
Albert Yi
80fdafad45 Merge pull request #3201 from evazion/fix-transitive-implications
Fix #3200: Disallow creation of superfluous implications
2017-07-05 11:50:51 -07:00
Albert Yi
5d40f5ad66 Merge pull request #3198 from evazion/feat-tumblr-dtextify-artcomm
Tumblr: convert artist commentaries from HTML to DText (#3184)
2017-07-05 11:31:30 -07:00
evazion
542c673221 Fix #3200: Disallow creation of superfluous implications.
Disallow transitive implications. If a -> b -> c already exists, don't
allow a -> c.

Caveat: if b -> c already exists, and we make a BUR for a -> b and a -> c,
the BUR validates even though a -> c is redundant. It only fails
when the BUR is approved.
2017-07-05 00:22:16 -05:00
evazion
c3ac4f3329 Fix #3197 - Post Replacement comment: use Replacement URL instead of Final Source
Record the URL of the image that was actually downloaded as the replacement URL.
2017-07-02 21:00:26 -05:00
evazion
71f84b10af tumblr: convert commentary to dtext.
* Convert Tumblr commentary to DText.
* Strip extraneous whitespace in links and blockquotes.
* Add newlines after block elements to ensure they're separated from
  subsequent blocks.
2017-07-01 11:15:48 -05:00
evazion
b880b07387 sources: factor out html-to-dtext code to DText.from_html. 2017-07-01 11:15:48 -05:00
r888888888
d7690d24b0 fixes #3039 2017-06-29 16:05:01 -07:00
r888888888
610e2bdedd fixes #3191 2017-06-27 14:48:55 -07:00
Albert Yi
c5e3973d6a Merge pull request #3192 from evazion/feat-replacement-remove-tags
Post replacements: streamline removing tags; fix replacement url.
2017-06-27 13:41:50 -07:00
evazion
9c50b24306 post replacements: add "Tags" field to dialog box.
* Adds a "Tags" field to the post replacement dialog box. The given tags
  are added to the post after replacement.

* Prefills the Tags field with certain tags that usually need to be
  removed after replacement: replaceme, image_sample, jpeg_artifacts, etc.
2017-06-26 18:17:16 -05:00
evazion
8d22ab9de8 post replacements: record upload source/filename in replacement_url.
* Record "file://#{filename}" as the replacement url when the
  replacement comes from an uploaded file.

* Record the actual url downloaded by the upload process otherwise. This
  may be different from the url given by the user, since the upload
  process may rewrite the url.
2017-06-26 14:18:57 -05:00
evazion
fbb25666b0 tumblr: add source tests. 2017-06-25 15:34:15 -05:00
evazion
030052bf14 tumblr: rewrite html pages to image url. 2017-06-25 15:34:15 -05:00
Albert Yi
3e1b687b8d Merge pull request #3179 from evazion/fix-tumblr-samples
Fix #3178: Rewrite Tumblr image samples
2017-06-22 16:13:39 -07:00
evazion
d3e8937716 post replacements: allow replacing with an uploaded file. 2017-06-22 16:52:55 -05:00
evazion
c27668d2ef post replacements: add option to fix source after replacement.
Adds a "Final Source" field to the post replacement dialog. If
specified, the post's source field will be changed to this value after
replacement.

This makes fixing the source back to the HTML page after
replacement easier.
2017-06-22 16:51:55 -05:00
evazion
421bbc35a2 tumblr: rewrite samples to biggest available version. 2017-06-21 22:30:53 -05:00
evazion
a9b3d28215 tumblr: fix edgecastcdn.net rewrite + add test.
https://data.tumblr.com doesn't have a valid SSL cert, so we must use
http:// instead when we rewrite to it.
2017-06-21 21:10:07 -05:00
evazion
16a51533bc tests: refactor tumblr tests to use assert_downloaded. 2017-06-21 21:10:07 -05:00
evazion
5684ba3b1d tests: factor out assert_downloaded to DownloadTestHelper. 2017-06-21 21:10:07 -05:00
evazion
dc36476d50 nijie: don't return bogus artists when artist finder finds no match. 2017-06-20 17:09:57 -05:00
evazion
294358b4a6 nijie: fetch image_urls for batch bookmarklet. 2017-06-20 16:29:31 -05:00
evazion
2d5fc191dd nijie: convert commentary to dtext. 2017-06-20 16:11:16 -05:00
evazion
25e7db860a nijie: fetch artist commentary. 2017-06-20 16:11:16 -05:00
evazion
3560bbbd47 pawoo: don't return bogus artists when artist finder doesn't find a match. 2017-06-19 17:10:02 -05:00
evazion
14196f36d8 pawoo: convert commentary to dtext. 2017-06-19 17:10:02 -05:00
evazion
e91942dff3 pawoo: add source tests and docs. 2017-06-19 17:09:57 -05:00
Albert Yi
584b01457b Merge pull request #3172 from evazion/fix-twitter-tags
Fix #3171: Translate Twitter Hashtags to assist with tagging
2017-06-19 13:24:13 -07:00
Albert Yi
361ba4e9ea Merge pull request #3170 from evazion/fix-note-normalize-links
Convert absolute links in notes to relative links (fix #1911)
2017-06-19 13:23:39 -07:00
Albert Yi
586a3186fd Merge pull request #3167 from evazion/feat-dtextify-pixiv-artcomm
Convert Pixiv commentaries to DText (fix #2458)
2017-06-19 13:22:31 -07:00
evazion
128e655aef twitter: fetch hashtags for translated tags (fixes #3171). 2017-06-17 16:15:23 -05:00
evazion
8c7c2a06e5 notes: convert internal links to Danbooru to relative urls. 2017-06-17 11:57:32 -05:00
evazion
ef76ec0385 uploads: fix upload failure when given nil source (fix #3168). 2017-06-17 08:31:44 -05:00
evazion
94e48aa6f3 pixiv: convert commentary to dtext.
Convert pixiv links to dtext in this manner:

* https://www.pixiv.net/member_illust.php?mode=medium&illust_id=1234
  => pixiv #1234 "»":[/posts?tags=pixiv:1234]

* https://www.pixiv.net/member.php?id=1234
  => "user/1234":[https://www.pixiv.net/member.php?id=1234] "»":[/artists?search[url_matches]=https://www.pixiv.net/member.php?id=1234]
2017-06-16 18:42:37 -05:00
Albert Yi
8b8b4fde71 Merge pull request #3160 from evazion/feat-note-sanitization
Improve note sanitization
2017-06-16 12:48:46 -07:00
evazion
5dd3151d5b twitter: convert commentary to dtext.
* Convert hashtags and mentions to dtext links.
* Replace http://t.co urls to the actual url.
* Strip the http://t.co url linking to the tweet itself.
2017-06-16 12:56:55 -05:00
evazion
91ed793120 notes: mark links as nofollow. 2017-06-15 22:58:22 -05:00
evazion
869ccad6ba notes: allow all elements to have style/title attributes. 2017-06-15 22:58:14 -05:00
evazion
85e32b5eb2 notes: add sanitization tests. 2017-06-15 22:58:13 -05:00
Albert Yi
a7b8a0d9f7 Merge pull request #3158 from evazion/fix-expunge-post
Fix #3156: Expunging posts is broken
2017-06-15 11:34:02 -07:00
evazion
d84feaa4bb posts: fix expunging posts not removing image from iqdb.
`File.exists?(preview_file_path)` is always false because the file has
already been deleted by this point. Remove the check entirely.
2017-06-14 21:31:30 -05:00
evazion
a844a1daf4 posts: fix expunging posts not deleting files.
Fix expungement to ignore the "file still in use" check.
2017-06-14 21:31:24 -05:00
r888888888
f27d065e1f fixes #3119 2017-06-14 16:30:19 -07:00
Albert Yi
24ad435067 Merge pull request #3155 from evazion/fix-artcomm-version-merge
Fix #3149: Artist commentaries should merge versions
2017-06-14 12:26:46 -07:00