Re: text to html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2010-07-03 at 15:20 +0100, Sam Sharpe wrote:
> On 3 July 2010 14:16, Rodolfo Alcazar Portillo <nospaze@xxxxxxxxx> wrote:
> > On Sat, 2010-07-03 at 11:07 +0200, Jozsi Avadkan wrote:
> >> input:
> >> http://pastebin.com/raw.php?i=MqPXZwc3
> >>
> >> output:
> >> http://pastebin.com/raw.php?i=8QCkp4yv
> >>
> >> it will be a long day.. :D
> >
> > Not likely. Obviously, you must replace lynx with cat <file>.
> >
> > lynx -dump http://pastebin.com/raw.php?i=MqPXZwc3|sed -r 's/([^\/]*)\/(.*)\.html/<br><font size=4>\1<\/font><br>\n<a href="\1\/\2.html">\2<\/a> |/g'
> >
> 
> I'm afraid that's a fail - it doesn't match the desired output.

Oh, oh, oh, oh. Didn't check the grouping. There you go (one-liner, just
using one FOR):

FILE=$(lynx -dump http://pastebin.com/raw.php?i=MqPXZwc3); SETS=$(echo "$INPUT"|cut -f1 -d/|uniq); for S in $SETS; do echo "<br><font size=4>$S</font><br>"; echo "$FILE"|grep "^$S"|sed -r "s/(.*)\/(.*).html/<a href=\"\1\/\2.html\">\2<\/a>|/g"; echo "<br>"; done

Bye!
----------------------------------------------
Rodolfo Alcazar Portillo - nospaze@xxxxxxxxx
otbits.blogspot.com / counter.li.org: #367962
----------------------------------------------
Programming is like sex: One mistake and you're providing support for
a lifetime. -- ?


-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux