juniperphoenix: Fire in the shape of a bird (Default)
juniperphoenix ([personal profile] juniperphoenix) wrote in [site community profile] dw_suggestions2010-06-16 02:14 pm

Automatically cut entries from syndicated feeds

Title:
Automatically cut entries from syndicated feeds

Area:
entries

Summary:
I would like to be able to set a preference whereby all entries from syndicated feeds (or all those over a certain length) would be automatically placed behind a cut on my Reading page.

Description:
I subscribe to a lot of syndicated feeds. Many of these feeds come from blogs where cut tags are not used at all, and the posts are often very long and/or contain multiple photos. I would like a way to reduce the amount of space taken up by these posts on my Reading page.

I don't know how this could be accomplished from a coding perspective, but as an end user what I'd like to see is a preference somewhere in my account settings that would let me automatically place all entries from feeds behind a cut. It would be even better if it were sensitive to the length of the entry -- if, for example, it could leave the first 100 words uncut as a teaser and place the rest behind a cut.

Now that we have expandable cut tags, it would be very easy for users to expand and read the entries if they wanted to, and it would save a lot of clutter on Reading pages.

It would be awesome if any solution to this could apply to Network pages as well as Reading pages.

Thanks for your consideration!

Poll #3497 Automatically cut entries from syndicated feeds
Open to: Registered Users, detailed results viewable to: All, participants: 48


This suggestion:

View Answers

Should be implemented as-is.
35 (72.9%)

Should be implemented with changes. (please comment)
2 (4.2%)

Shouldn't be implemented.
0 (0.0%)

(I have no opinion)
11 (22.9%)

(Other: please comment)
0 (0.0%)

ratcreature: RatCreature is thinking: hmm...? (hmm...?)

[personal profile] ratcreature 2010-06-17 02:58 pm (UTC)(link)
Didn't we have this suggestion already a few entries ago? Or is this different from the one here:

http://dw-suggestions.dreamwidth.org/354868.html
stealthily: Aaron Stack the robot from nextwave with crazy robotic arm that has loads of weapons on (beware me fleshy ones!)

[personal profile] stealthily 2010-06-17 08:04 pm (UTC)(link)
I like this version better than both of the previous ones- I only want it for RSS feeds as I'm not bothered by long entries from those on my flist (canse I'm usually more interested in what they have to say), plus DW & LJers are more judicious with their use of cuts than outside bloggers. And having it optionally toggle-able would solve the problem of those who like full entries on feeds. It's also good for solving the problem of those feeds that post huge page-breaking images, which most DWers know to cut.
aedifica: Me with my hair as it is in 2020: long, with blue tips (Default)

[personal profile] aedifica 2010-06-17 04:21 pm (UTC)(link)
Yes please! I like this implementation even better than the previously suggested version.
fizzyblogic: [Game of Thrones] detail on a map of Westeros (Default)

[personal profile] fizzyblogic 2010-06-17 07:04 pm (UTC)(link)
I love this idea.
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2010-06-17 07:10 pm (UTC)(link)
There is, by the way, a way to make the text of syndicated feed entries invisible on your reading page (while keeping the subject so you can click through if you want) -- I don't know what it is offhand, but maybe [personal profile] foxfirefey or [personal profile] matgb will know!
matgb: Artwork of 19th century upper class anarchist, text: MatGB (Default)

[personal profile] matgb 2010-06-17 08:14 pm (UTC)(link)
Sort of. Putting:
.journal-type-Y .entry-content {display:none;}

onto Custom CSS will hide the entire text of the entry from display. Unfortunately, it also hides the link to the actual off site entry, as while the link is given its own class (.ljsyndicationlink), the rest of the text isn't and just follows on, it's not even automatically put into a separate P (the link is). display:none hides everything, and to my knowledge (and I'd love to be corrected) can't be overriden.

So for most of us, as we need the link, hiding the text isn't really an option. If, however, the feed module encased the entry into something, a DIV or possible a SPAN would make sense, say div class="ljsyndicationcontent" then hiding it would be really really easy.

(I think this may be classed as a bug, not sure, and I suspect it's a five minute fix)

(also? I'm not actually that good at CSS, I just like finding little tricks and fiddles)

@juniperphoenix if you don't fancy hiding the link normally, but do need to hide something for a specific feed, you can hide on a feed by feed basis, replace .juornal-type-y above with .journal-never_trust_a_hippy_feed (or whatever the feed account is called, that happens to be the feed I'm looking at the source code for)
kyrielle: Middle-aged woman in profile, black and white, looking left, with a scarf around her neck and a white background (Default)

[personal profile] kyrielle 2010-06-18 02:18 pm (UTC)(link)
Since the link is inside, I don't think you can pull it out. However, if you can figure out how to target it right (I couldn't!), you could use the font-size directive to set the main entry font to 1% and then boost the link back up to a normal size. This is hacky and will leave ant-trails in place of the text (and won't help with image-heavy feeds!), but.

(And, if you can't find a way to save the link from being shrunk, it's always the first line, always a link, and fairly easy to target even at 1% size, at least for me.)
Edited (Parenthetical comment added.) 2010-06-18 14:21 (UTC)
matgb: Artwork of 19th century upper class anarchist, text: MatGB (Default)

[personal profile] matgb 2010-06-18 02:22 pm (UTC)(link)
Hmm, that's an idea. Reduce the fontsize down, hide the images.

Drawback is it'll mess up all style=mine displays. Except reading pages have their own class as well, anyway. So it might actually work. Won't work if there's inline styling or font sizing, but that's rare these days.

OK, that's some code I can probably actually get working this afternoon (I'm theoretically working on turning my layout into usable layers, first time at trying to actually code it properly instead of case-by-case hacking)
matgb: Artwork of 19th century upper class anarchist, text: MatGB (Default)

Sorted-nearly hiding feed content

[personal profile] matgb 2010-06-18 02:40 pm (UTC)(link)
OK, it's a bit antliney, but it reduces most posts down to almost nothing:

.page-read .journal-type-Y .entry-content { font-size:1px}
.page-read .journal-type-Y .entry-content .ljsyndicationlink {font-size:14px}
.page-read .journal-type-Y .entry-content .lj_embedcontent, .page-read .journal-type-Y .entry-content img {display:none}

http://www.dreamwidth.org/customize/options.bml?group=customcss

I picked 14px for the link size (which isn't always first, author displays first if there is one), and have hidden embeds and images, can't think of anything else that might get through but you never know, and of course individual blogs can override it.

Not ideal, and not what the OP actually wants, but a workable hack; hopefully the content itself'll get a class ASAP.
matgb: Artwork of 19th century upper class anarchist, text: MatGB (Default)

[personal profile] matgb 2010-06-17 08:15 pm (UTC)(link)
Before expanding cut tags, I'd have vetoed this completely.

But given you want it as an option, and we've the expanders, it makes sense. I'll probably not use it, I do like to just hit space, but that may change if Opera Mobile doesn't give me back a page down feature and I start working away from home more.
holyschist: Image of a medieval crocodile from Herodotus, eating a person, with the caption "om nom nom" (Default)

[personal profile] holyschist 2010-06-18 12:30 am (UTC)(link)
This seems like a better solution than the previously suggested ones.
azurelunatic: Vivid pink Alaskan wild rose. (Default)

[personal profile] azurelunatic 2010-06-18 02:20 am (UTC)(link)
From a coding perspective, what if it were possible to distinguish between personal journal, community, feed, and official journal (I separate that out because I could see a desire to split them out) entries on the reading page and then style them differently, including styles that insert an auto-cut a la [personal profile] exor674's cut-long-entry innovation? Better if auto-cuts could also be expanded just like real cuts.

This concept builds off the way that loudtwitter et al tend to wrap their entries in a specific style, and then people can choose to style entries containing that thing in a different fashion, if their coding is up to it.
kyrielle: Middle-aged woman in profile, black and white, looking left, with a scarf around her neck and a white background (Default)

[personal profile] kyrielle 2010-06-18 02:19 pm (UTC)(link)
I would like this. I would also like (and it sounds from a comment above like it can be done) to be able to target entries for particular journals. (And now I need to go read doc and see if there's more info out there on this, because I am now curious. Alas, I also need to go to work, which at least for now is going to win.)
matgb: Artwork of 19th century upper class anarchist, text: MatGB (Default)

[personal profile] matgb 2010-06-18 02:43 pm (UTC)(link)
You can target entries from any specific journal, or any specific poster, or any specific comm, they all get class types in the entry headers, fairly straightforward if you look at the source on the heading of an entry page, and I think someone did a post on it to dw_nifty awhileback.

[identity profile] irwinschwab.myid.net 2010-06-19 01:18 am (UTC)(link)
OK, this EXPERIMENTAL CSS LEVEL 3 code adds 3k per page, so an interested party with limited bandwidth might want to save the following as a separate file, upload somewhere offDW, and @import as usual, assuming these sort of things are supported:


/* Optional for a little bit extra of white-space collapsing ... (cont'd below) */
.page-read .journal-type-Y .entry-content>:nth-child(6)~img+br,
.page-read .journal-type-Y .entry-content>:nth-child(6)~img+br+br,
.page-read .journal-type-Y .entry-content>:nth-child(6)~br+br+br+a,
.page-read .journal-type-Y .entry-content>:nth-child(6)~a+br+br+br,
.page-read .journal-type-Y .entry-content>:nth-child(6)~img+br+br+br,
.page-read .journal-type-Y .entry-content>:nth-child(6)~br+br+br+a+br,
.page-read .journal-type-Y .entry-content>:nth-child(6)~br+br+br+a+br+br,
/* (con'td from above)... on pixspams! Feel free to delete this block */

/* Optional for longass color-coded rollcalls such like userid=430272*/
.page-read .journal-type-Y .entry-content>:nth-child(6)~br+span[style*='color'],
.page-read .journal-type-Y .entry-content>:nth-child(6)~br+span[style*='color']+br,

/* the rest is meat and potatoes, or cloud and herring according to cuisine: */

/* truncate long lists in upper excerpt */
.page-read .journal-type-Y .entry-content blockquote~*,
.page-read .journal-type-Y .entry-content blockquote>:not(:nth-child(-n+3)),
.page-read .journal-type-Y .entry-content>:not(:nth-child(-n+6)) img,
.page-read .journal-type-Y .entry-content *>li:not(:nth-child(-n+3)),
.page-read .journal-type-Y .entry-content dl>:not(:nth-child(-n+3)),

/* unblock block.... inline tags to KEEP scraped off faqid=155 */
.page-read .journal-type-Y .entry-content>:not(:nth-child(-n+6)):not(a):not(abbr):not(acronym):not(b):not(bdo):not(big):not(br):not(cite):not(code):not(del):not(dfn):not(em):not(font):not(i):not(ins):not(kbd):not(s):not(samp):not(strike):not(strong):not(sub):not(tt):not(var),

/* ... */
.page-read .journal-type-Y .entry-content>[src*='//feeds.feedb'],
.page-read .journal-type-Y .entry-content>[href*='/advertis'],
.page-read .journal-type-Y .entry-content>[src*='/advertis'],
.page-read .journal-type-Y .entry-content>[href*='//ads.'],
.page-read .journal-smashing_feed .entry-content>.ljsyndicationlink+table
{display:none!important}

/* example marks the spot */
.page-read .journal-type-Y .entry-content>:nth-child(6),
.page-read .journal-type-Y .entry-content blockquote>:nth-child(4),
.page-read .journal-type-Y .entry-content *>li:nth-child(4),
.page-read .journal-type-Y .entry-content dl>:nth-child(4)
{content:"etc \27BD";font-style:normal!important;font-variant:normal!important;font-weight:normal!important;font-size:larger!important;font-family:"Bitstream Cyberbit",Georgia,serif!important;text-align:center!important;left:0;width:13ex!important;height:3ex!important;word-spacing:5ex!important;display:block!important;padding:.3ex 03ex3ex!important;margin:0 0 1ex 0!important;border:2px solid}

.page-read .journal-type-Y .entry-content>:nth-child(6)
{color:oldlace!important;background:tomato1!important;border-color:oldlace}

.page-read .journal-type-Y .entry-content blockquote>:nth-child(4),
.page-read .journal-type-Y .entry-content *>li:nth-child(4),
.page-read .journal-type-Y .entry-content dl>:nth-child(4)
{color:tomato1!important;background:oldlace!important;border-color:tomato1}




@userid=17442
input.ini [Browser Widget] Down = Page down.
IHNI what antliney means unless it's something to do with beloved Son of Walsall John Byrne!

@userid=2 and @userid=3
As you know, random trollspassersby whom may or may not actually be part of your constituency can be helpful sometimes also. I'm sorry you choose not to keep the ideals of anonymous commenting alive!!

@userid=115220 and @userid=17442
allthough your tastes in webcomics are frankly fawful, you seem to be somewhat less compradorada than @userid=63311? Fortunately style is politics agnostic. Alwright!

medie: queen elsa's grand entrance (aos - sinbad - careful that's sharp)

[personal profile] medie 2010-08-04 12:26 am (UTC)(link)
Yeah, I was about to make this suggestion myself. I've run into a lot of trouble with reading my network lately because of it. Really long entries, stuff that could be very triggery, not to mention someone's got a feed of sex is not the enemy on there and while those images are gorgeous, it makes reading my network an 'at home with no one reading over my shoulder' experience.
medie: queen elsa's grand entrance (castle - bts - snuggles)

[personal profile] medie 2010-08-04 02:01 am (UTC)(link)
Oh thanks! I've had, er, a couple awkward near misses (made the mistake of checking my network at the library one day. Never so glad for fast fingers and a page down key in my LIFE.) so that'll come in handy!