GithubHelp home page GithubHelp logo

Offline reading about timesearch HOT 9 CLOSED

liner601 avatar liner601 commented on September 6, 2024
Offline reading

from timesearch.

Comments (9)

voussoir avatar voussoir commented on September 6, 2024

Hmm, Timesearch doesn't use node or Electron so something else on your system seems to have gotten tangled in somehow.

When I run timesearch.py offline_reading -r subredditofchoice, it shows me

Building tree for t3_xxxxxx (4 comments)
Wrote .\subreddits\subredditofchoice\offline_reading\t3_xxxxxx.html

And then I just view the html files in my browser.

Did you get any of that? The way your issue text is formatted, it looks like the offline_reading command did nothing, and then the node/Electron stuff comes out of nowhere with no command on the above line.

from timesearch.

liner601 avatar liner601 commented on September 6, 2024

Hmm, Timesearch doesn't use node or Electron so something else on your system seems to have gotten tangled in somehow.

When I run timesearch.py offline_reading -r subredditofchoice, it shows me

Building tree for t3_xxxxxx (4 comments)
Wrote .\subreddits\subredditofchoice\offline_reading\t3_xxxxxx.html

And then I just view the html files in my browser.

Did you get any of that? The way your issue text is formatted, it looks like the offline_reading command did nothing, and then the node/Electron stuff comes out of nowhere with no command on the above line.

Weird, electron isnt even in my path, I tried deleting everything electron related but it just says it couldnt find electron in the Microsoft vs files.

this might give some insight into what the command is asking for but I doubt it:

[Error: ENOENT: no such file or directory, open 'C:\Users\GX501\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js'] {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\Users\GX501\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js',
phase: 'loading',
moduleId: 'vs/code/electron-main/main',
neededBy: [ '===anonymous1===' ]
}

Edit: I see what you mean about electron coming out of nowhere, it runs the command, gives a blank output then electron shows up, I tried removing vs from the path but it made no difference.

from timesearch.

voussoir avatar voussoir commented on September 6, 2024

Are you running Timesearch from within VS? Do you get different results when you run it through a plain old command prompt?

I don't want to make you delete electron since VS does rely on it. It sounds like you may have broken your VS by doing that, lol.

As with the previous issue, try timesearch.py offline_reading --help to make sure timesearch is at least starting properly. It's very surprising to see a completely blank output.

from timesearch.

liner601 avatar liner601 commented on September 6, 2024

Are you running Timesearch from within VS? Do you get different results when you run it through a plain old command prompt?

I don't want to make you delete electron since VS does rely on it. It sounds like you may have broken your VS by doing that, lol.

As with the previous issue, try timesearch.py offline_reading --help to make sure timesearch is at least starting properly. It's very surprising to see a completely blank output.

Oh no dont worry I restored everything I deleted, and I always run it trough a normal cmd prompt.

Well Houston I think we have a problem.

timesearch>timesearch.py offline_reading --help

timesearch>
[main 2020-04-23T01:58:58.307Z] update#setState idle
(node:12040) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see electron/electron#18397 for more information
(node:12040) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see electron/electron#18397 for more information
(node:12040) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see electron/electron#18397 for more information
(node:12040) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see electron/electron#18397 for more information
(node:12040) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see electron/electron#18397 for more information
(node:12040) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see electron/electron#18397 for more information

from timesearch.

voussoir avatar voussoir commented on September 6, 2024

Weird... See the thing about --help is that Timesearch displays the help text without ever dispatching into the offline_reading.py module. Therefore, I would expect that >timesearch.py get_submissions --help (and all the other tools) would show the exact same behavior. Does it?

In the previous issue, you were doing python timesearch.py, and I notice you have switched to writing timesearch.py. Does that change the results? Maybe VS has hijacked the file association for .py files, so >timesearch.py behaves differently than >python timesearch.py?

from timesearch.

liner601 avatar liner601 commented on September 6, 2024

Weird... See the thing about --help is that Timesearch displays the help text without ever dispatching into the offline_reading.py module. Therefore, I would expect that >timesearch.py get_submissions --help (and all the other tools) would show the exact same behavior. Does it?

In the previous issue, you were doing python timesearch.py, and I notice you have switched to writing timesearch.py. Does that change the results? Maybe VS has hijacked the file association for .py files, so >timesearch.py behaves differently than >python timesearch.py?

...I cant believe I didn't see that, thank you again.

One last question, is there an option to include images and videos as an offline copy within the rendered website?

from timesearch.

voussoir avatar voussoir commented on September 6, 2024

Wow, so they did hijack your .py extension, that's annoying. That behavior where the command seems to do nothing but more output comes later is something I see with programs that spawn subprocesses / daemons, which makes sense for a GUI program like VS. You should be able to reset the file extension association by re-running the Python installer and choosing "Repair", if you'd like to do so.

One last question, is there an option to include images and videos as an offline copy within the rendered website?

Good question, but at the moment there is not. Downloading external content is outside the scope of Timesearch, which only focuses on the text that makes up submissions and comments. External content is a very big can of worms.

Tools like youtube-dl may assist you in downloading videos, but for photos and albums I don't know of any single tool with the support and reputation of youtube-dl unfortunately.

For link posts, the url is of course stored in the timesearch database. But if you're trying to get image links in selfposts and comments too that's going to require parsing to get them out. Well, the reddit API does return html versions of the content so you can get the <a> tags out of that, but Timesearch only keeps the markdown version.

from timesearch.

liner601 avatar liner601 commented on September 6, 2024

Wow, so they did hijack your .py extension, that's annoying. That behavior where the command seems to do nothing but more output comes later is something I see with programs that spawn subprocesses / daemons, which makes sense for a GUI program like VS. You should be able to reset the file extension association by re-running the Python installer and choosing "Repair", if you'd like to do so.

One last question, is there an option to include images and videos as an offline copy within the rendered website?

Good question, but at the moment there is not. Downloading external content is outside the scope of Timesearch, which only focuses on the text that makes up submissions and comments. External content is a very big can of worms.

Tools like youtube-dl may assist you in downloading videos, but for photos and albums I don't know of any single tool with the support and reputation of youtube-dl unfortunately.

For link posts, the url is of course stored in the timesearch database. But if you're trying to get image links in selfposts and comments too that's going to require parsing to get them out. Well, the reddit API does return html versions of the content so you can get the <a> tags out of that, but Timesearch only keeps the markdown version.

Yeah visual studio is a mixed bag.

Ripme seems to work for photos and images.

Thanks for all the help!

from timesearch.

voussoir avatar voussoir commented on September 6, 2024

I'm glad we could get it figured out, and I'm glad people like you are discovering and enjoying Timesearch. Don't hesitate with any other questions. :)

from timesearch.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.