Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image of the day #124

Open
rprouse opened this issue Nov 26, 2022 · 3 comments
Open

Image of the day #124

rprouse opened this issue Nov 26, 2022 · 3 comments
Labels
enhancement New feature or request high priority

Comments

@rprouse
Copy link
Owner

rprouse commented Nov 26, 2022

Set the desktop wallpaper to a random image from NASA

Today's pic is always at https://apod.nasa.gov/apod/astropix.html
The pic for each day is at https://apod.nasa.gov/apod/ap221112.html

The lower res picture on the page links to the hi-res version. Image, title and description don't have class, id or identifying attributes, so it will need to be by number.

  • Should take the high-res version and crop it to the desktop aspect ratio. How?
  • How do I strip HTML out of the description to view it?
  • How do I set the desktop wallpaper in C#?
  • Add the ability to select a day
  • Add the ability to select a random day
  • Valid date range is >= 20150101
@rprouse rprouse added the enhancement New feature or request label Nov 27, 2022
@rprouse
Copy link
Owner Author

rprouse commented Nov 27, 2022

[DllImport("user32.dll", CharSet = CharSet.Auto)]
    private static extern Int32 SystemParametersInfo(UInt32 uiAction, UInt32
    uiParam, String pvParam, UInt32 fWinIni);
    private static UInt32 SPI_SETDESKWALLPAPER = 20;
    private static UInt32 SPIF_UPDATEINIFILE = 0x1;

@rprouse
Copy link
Owner Author

rprouse commented Nov 27, 2022

@rprouse
Copy link
Owner Author

rprouse commented Nov 27, 2022

To convert HTML to plain text, see HTML Agility Pack, https://github.com/ceee/ReadSharp/blob/master/ReadSharp/HtmlUtilities.cs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high priority
Projects
None yet
Development

No branches or pull requests

1 participant