Bug 952316 - [PATCH REVIEW] Add URL shortening support
Summary: [PATCH REVIEW] Add URL shortening support
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: fpaste
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ankur Sinha (FranciscoD)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-15 16:05 UTC by Othman Madjoudj
Modified: 2013-04-30 02:06 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-04-30 02:06:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
URL shortening patch (935 bytes, patch)
2013-04-15 16:05 UTC, Othman Madjoudj
no flags Details | Diff
Fix shorturl with unescaped json in paste content (457 bytes, patch)
2013-04-17 10:59 UTC, Othman Madjoudj
no flags Details | Diff

Description Othman Madjoudj 2013-04-15 16:05:19 UTC
Created attachment 735965 [details]
URL shortening patch

Description of problem:

Fedora pastebin now supports url shortening via ur1.ca (foss service from Identi.ca).

This feature is not yet merged with sticky-notes (pull request already done), so the patch may conflicts with other patches (bz #865972).

I've attached a patch which displays the shortened URL instead of the long one.

Eg:

./fpaste
testing
1
2
3
Uploading (0.1KiB)...
http://ur1.ca/de7cb


http://ur1.ca/de7cb --> http://paste.fedoraproject.org/7517/66040894/

Comment 1 Ankur Sinha (FranciscoD) 2013-04-15 22:55:16 UTC
Hi Athmane,

I'll test the patch later today and let you know. Should I commit it to SCM and push a build if it works?

Thanks,
Ankur

Comment 2 Othman Madjoudj 2013-04-16 08:56:16 UTC
(In reply to comment #1)
> Hi Athmane,
> 
> I'll test the patch later today and let you know. Should I commit it to SCM
> and push a build if it works?

Yes, that's would be nice.

Thanks.

Comment 3 Othman Madjoudj 2013-04-17 10:59:22 UTC
Created attachment 736792 [details]
Fix shorturl with unescaped json in paste content

I've attached a fix to issue when json data can not be decoded because of unescaped json in paste content.

Comment 4 Ankur Sinha (FranciscoD) 2013-04-17 13:37:28 UTC
Hi Athmane, 

This seems to work correctly:

[ankur@ankur-pc  fpaste(master *%=)]$ fpaste --sysinfo
Gathering system info............................Uploading (14.4KiB)...
http://ur1.ca/df0vx -> http://paste.fedoraproject.org/7800/05559136
[ankur@ankur-pc  fpaste(master *%=)]$ fpaste --sysinfo -P no
Gathering system info............................Uploading (14.4KiB)...
http://ur1.ca/df0w5 -> http://paste.fedoraproject.org/7801
[ankur@ankur-pc  fpaste(master *%=)]$ fpaste --sysinfo -P no -U http://paste.stg.fedoraproject.org
Gathering system info............................Uploading (14.4KiB)...
http://ur1.ca/df0wd -> http://paste.stg.fedoraproject.org/4125
[ankur@ankur-pc  fpaste(master *%=)]$ fpaste --sysinfo -P no -U http://sites.sayakbanerjee.com/paste/
Gathering system info............................Uploading (14.4KiB)...
http://sites.sayakbanerjee.com/paste/1246
[ankur@ankur-pc  fpaste(master *%=)]$


Pushing to SCM and building. I've incorporated all the patches and cleaned them up.

Thanks,
Ankur

Comment 5 Ankur Sinha (FranciscoD) 2013-04-30 02:06:07 UTC
Looks like I forgot to add this to the update.


Note You need to log in before you can comment on or make changes to this bug.