-4

Sometimes I am coding where there is no internet and would love to have access to favorite questions.

Is there any add-on, extension or script that would help me download all at once and still be able to use them in my browser?

If there isn't then I would like to make a suggestion to SO so that once you go to your favorites page, you can click on something download all your favorite questions to use offline button.

NOTE: I know there are ways that you can save pages for offline, but none would automatically go through your 200 favorite questions...

5
  • 1
  • @MikeMcCaughan I looked into and it is fairly related. Though customizing it to my need is beyond my knowledge as of the moment
    – mfaani
    Commented Sep 30, 2016 at 18:55
  • In the iOS/macOS ecosystem you have the reading list, which stores content for offline reading. There’s similar solutions for other browsers and OSes. If you remember to always click the appropriate boutton when starring, you can do this without needing anything SO specific
    – Pekka
    Commented Oct 1, 2016 at 22:39
  • @Pekka웃 But I would have to add each one manually. right?
    – mfaani
    Commented Oct 1, 2016 at 22:40
  • @Honey yes. ----
    – Pekka
    Commented Oct 2, 2016 at 8:51

2 Answers 2

5

I have taken a similar approach as my answer on MSE. If I only take into account questions you voted as favorite the following query will produce an html output that you can use top create your own html file for local browsing:

select case when posttypeid = 1 then '<hr>' else '' end -- start of question
     + '<div>'
     + '<div>' 
     + cast(score as nvarchar) 
     + '&nbsp;|&nbsp;' 
     + title
     + '<a href="'
     + anchor
     +'">' 
     + anchortext 
     + '</a>'
     + '</div>'
     + '<div>'
     + body
     + '</div>'
     + case when posttypeid = 1 then 
       '<div>'
       + tags
       + '</div>'
       else ''
       end
     + '</div>' as html
from
(
select q.title
     , 'https://stackoverflow.com/q/' 
     + cast(p.id as nvarchar) as anchor
     , case when p.posttypeid = 1 
       then q.title
       else 'answer' 
       end
       as anchortext
     , p.body
     , q.tags
     , p.score
     , p.posttypeid 
     , coalesce(p.parentid, p.id) as grp
from posts p
inner join posts q on q.id = coalesce(p.parentid, p.id)
inner join votes v on v.postid = q.id
where v.votetypeid = 5 -- favorite
and v.userid = ##userid?5175709##
) as favposts
order by grp
       , posttypeid 
       , score desc

If you copy/paste the result in a file and then open that in a browser you'll get this:

html view of favorite questions

I leave any styling for the reader to implement. Have a go with your css fu to make this more attractive. I'm only able to make it look more worse.

1

You'll have to do this in several steps.

  1. You can find a list of favorite questions in several places, but I can't find a way to get all of them on one page. You can get 50 per page by searching:

  2. You can probably just use a download manager to download all items on the page; these two seem very smart as they feature the ability to filter in several ways, including with a regex. You will still need to go through each page however, for a total of ceil(favCount/50.0) pages (in your case: 8 for 360 total favorites).

4
  • Thanks. Can you elaborate. when you say download all items. you mean what exactly? does that mean all links? So for example for this very page, it would download ll the linked questions. the links in the footer, the about us, help, blog, chat, page?
    – mfaani
    Commented Oct 1, 2016 at 19:50
  • 1
    @Honey If you don't filter anything, it probably downloads that and more. For the one: The Chrono Sniffer detects all links, images, audios and videos on a webpage, and you can filter URLs by their file types or by Regular Expression. It also shows checkboxes you can (un)check manually.
    – Laurel
    Commented Oct 1, 2016 at 19:55
  • got it, still this very dirty. It wish there was a simple download all favorite button
    – mfaani
    Commented Oct 1, 2016 at 20:10
  • 1
    @Honey it sounds like too much of an edge case for Stack Overflow to ever provide a native feature for. All you can probably hope for is for someone to build a super smart userscript or app
    – Pekka
    Commented Oct 2, 2016 at 8:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .