topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday April 28, 2024, 9:05 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - 4wd [ switch to compact view ]

Pages: prev1 ... 5 6 7 8 9 [10] 11 12 13 14 15 ... 224next
226
Living Room / Re: Gadget WEEKENDS
« on: December 11, 2020, 08:08 PM »
Just arrived, a pair of Pi Case 40's to replace the heatsink cases on my RasPi 4B's.

IMG_20201212_124510.jpg

NOTE: For anyone who's interested in these just be aware that you won't be able to use expansion 'hats' due to the reversed GPIO pin layout, (not a problem for me).  And to be fair to Cooler Master the case was always marketed as a rugged travel case for the RasPi.

227
Re. the Snap2HTML method, a possible alternative is HFS, (HTTP File Server), which can serve up a file structure easily.

The default HTML can be modified, it's dynamic (just copy new files into the folders it's looking at and refresh), access control if needed, plus a lot of other options ... there is a search function but it isn't 'as you type'.

228
The standalone version of Daminion (Digital Asset Manager), is still free, (AFAIK), with the restriction of 15000 items per catalogue, (you can have multiple catalogues).

The latest version is available for download here.


229
Living Room / Re: How do you get melted rubber out of carpeting???
« on: December 07, 2020, 03:17 PM »
For anything gooey I've always had good results with anything that contains eucalyptus oil, (wool wash, etc), plus it smells nice.

Now that is an interesting and potentially useful suggestion - especially in contrast to the rest of these clowns - are you lost or something? :)

Oh sorry, did I forget to mention that upon walking into a room smelling of eucalypt the first words she will say are, "What have you done?"
 ;)

230
Living Room / Re: How do you get melted rubber out of carpeting???
« on: December 06, 2020, 06:12 PM »
For anything gooey I've always had good results with anything that contains eucalyptus oil, (wool wash, etc), plus it smells nice.

231
Windscribe Terms

Email Promotions

As a free user, by providing an email address and in exchange for additional bandwidth, you give Windscribe the permission to send you promotional offers. You can unsubscribe (remove your email) at any time, but you will be downgraded to the basic free plan.


232
General Software Discussion / Re: Etcher on Linux?
« on: December 03, 2020, 08:45 AM »
How do I install and use Etcher on Linux for making a live Linux USB?

I would have thought that most directions on making a live Linux USB drive have instructions for using dd, at least most of the ones I've seen have.

Otherwise there's the always useful unetbootin.

233
Perhaps the Internet Archive would be a better resource for a website that no longer exists:

https://web.archive....esoft/_app_index.htm

234
Living Room / Re: Interesting "stuff"
« on: December 01, 2020, 06:11 PM »
An icon of the 20th century comes to a sad end:

EoK1tXlXIA0zKbc.jpg

Arecibo Observatory telescope collapses in Puerto Rico months after cables snap

Addendum: Drone footage of the collapse.

https://www.abc.net....es-snapping/12949736

235
General Software Discussion / ZeroTier - a Global Area Network
« on: November 30, 2020, 01:36 AM »
Something that hasn't been mentioned in the forum before, (that I can find anyway), ZeroTier.

Similar to the old Hamachiw program, (by Alex Pankratov), ZeroTier creates a wide area encrypted VLAN.

ZeroTier is a smart programmable Ethernet switch for planet Earth. It allows all networked devices, VMs, containers, and applications to communicate as if they all reside in the same physical data center or cloud region.

This is accomplished by combining a cryptographically addressed and secure peer to peer network (termed VL1) with an Ethernet emulation layer somewhat similar to VXLAN (termed VL2). Our VL2 Ethernet virtualization layer includes advanced enterprise SDN features like fine grained access control rules for network micro-segmentation and security monitoring.

You can use ZeroTier's hosted controllers, (there's a free level which allows up to 50 nodes but only one Network Admin, which is great for home users), or host your own controller - the source code is available on GitHub.

Currently, I've connected my phone, tablet, computer, and two RasPi's to a network and they're all talking to one another without a problem.

This is especially great as I have web interfaces on the two RasPi's that I currently access via reverse proxy as well as VNC, SSH, etc.  Switching to ZeroTier means I can do away with DNS setups, reverse proxy, and just access the various interfaces, VNC, etc via an IP, (eg. 172.26.x.x, 192.168.x.x, etc), and close any misc open ports I have in the router.

Download's are available for Windows, MacOS, Android, iOS, Linux, FreeBSD, and NAS's, there's also various Docker images available.

Setup up for all of them only took a minute or two.

236
General Software Discussion / Re: WoX Launcher
« on: November 19, 2020, 01:18 AM »
Tuxman introduced WoX (stands for something- I saw it somewhere, but I can't find it right now) in the Listary 6 thread, and I started to look into it.

You've missed out on testing it for the last four years  :P

Then again, I missed out on testing it for three years  :-[

237
Living Room / Re: Reliable notifier with web interface
« on: November 15, 2020, 03:20 AM »
Always found Thunderbird with Lightning add-on worked fine.

PS: Google Calendar is not very good, for some reason I do not hear any alarms

1. Download this and set as your Default Alarm Sound.
2. Turn the Alarm volume up to maximum.

238
fSekrit / Re: fSekrit 1.40 quarantined by Windows 10
« on: November 10, 2020, 03:01 PM »
Caution: Theory Ahead

Maybe it's just that the encrypted contents of the file now match the file pattern of Trojan:Win32/Wacatac.C!ml and rearranging the order of the information would 'fix' the problem?

239
For a GUI, try Helge Klein SetACL Studio. It will delete anything. Product page here, no cost (used to be commercial).

Last year I had one folder it couldn't delete, couldn't do anything with it.
Can't remember what happened in the end, think I gave up and reinstalled Windows or formatted the drive.
Most obstinate file/folder I've had in 40+ years of playing with computers 🤣

240
Now uses Chrome's UserAgent and can set a delay from the command line:

Code: PowerShell [Select]
  1. <#
  2.   .\DiscoFile-MB3.ps1 -uri <Uri> [-delay <seconds>]
  3.  
  4.   Given the URI from https://musicbrainz.org for an artist it will retrieve the
  5.   discography.
  6.  
  7.   Where: Uri     = MusicBrainz artist page URI
  8.          seconds = [optional] number of seconds delay between Web Requests (0.1-90)
  9.  
  10.  
  11.   eg.
  12.  
  13.   .\DiscoFile-MB3.ps1 -uri https://musicbrainz.org/artist/66c662b6-6e2f-4930-8610-912e24c63ed1
  14.  
  15.   .\DiscoFile-MB3.ps1 -uri https://musicbrainz.org/artist/66c662b6-6e2f-4930-8610-912e24c63ed1 -delay 10
  16.  
  17.   Will result in a file called 'AC_DC-MB - Discography.txt' in the same directory as
  18.   DiscoFile-MB3.ps1
  19.  
  20. #>
  21. param (
  22.         [Parameter(Mandatory=$true)][string]$Uri,
  23.         [ValidateRange(0.1,90)][decimal]$delay
  24. )
  25. $sleep = $false
  26. if ($delay -gt 0) {
  27.   $sleep = $true
  28. }
  29. $userAgent = [Microsoft.PowerShell.Commands.PSUserAgent]::Chrome
  30.  
  31. $web = (Invoke-WebRequest -Uri $Uri -UserAgent $userAgent).RawContent
  32.  
  33. $temp = $web -replace '[\s\S]+application\/ld\+json..([\s\S]+?)<\/script>[\s\S]*$', '$1'
  34. $json = $temp | ConvertFrom-Json
  35.  
  36. $outFile = ($json.name + "-MB - Discography.txt").Split([IO.Path]::GetInvalidFileNameChars()) -join '_'
  37. if (Test-Path $outFile) {
  38.   Remove-Item $outFile -Force
  39. }
  40.  
  41. for ($i = 0; $i -lt $json.album.Count; $i++) {
  42.   if ($sleep) {
  43.     Start-Sleep -seconds $delay
  44.   }
  45.   $temp = $json.album[$i].albumReleaseType
  46.   if ($temp -match 'AlbumRelease') {
  47.     $temp = $json.album[$i].albumProductionType
  48.     if (($temp -match '(LiveAlbum)|(StudioAlbum)') -and !($temp -match '(CompilationAlbum)|(SoundtrackAlbum)')) {
  49.       $albumUri = ($json.album[$i].'@id' + "?inc=releases&fmt=json") -replace '\.org\/', '.org/ws/2/'
  50.       $album = (Invoke-WebRequest -Uri "$($albumUri)" -UserAgent $userAgent) | ConvertFrom-Json
  51.       "$($album.releases[0].date.Substring(0,4)) - $($album.title)" | Out-File -FilePath $outFile -Append
  52.     }
  53.   }
  54. }
  55.  
  56. Get-Content $outFile | Sort-Object | Set-Content $outFile

241
The only way being logged in, (or not), to the site would matter is if you are also doing searches or browsing at the same time, since you're increasing the number of requests per second.

It looks like they impose a rate limit of one request per second from the same IP, (strange I never hit it), unless it's from specific software, (eg. picard), or uses a recognisable UserAgent, (ie. a browser, PowerShell probably doesn't by default - I might look at how you can add it, if it's possible).

You can try putting in a Start-Sleep -seconds 1 after the for statement, that will delay the requests to about one per second.

Adjust the number up as necessary to increase the delay between requests, especially if you are browsing the site at the same time.

Or use Opera to browse the site with its internal VPN turned on so it looks like a different IP.

EDIT: Looks like PowerShell has its own UserAgent but can use one of the more standard browser settings which may decrease the rate limiting.  I'll look at it later today if I have time, or you can have a play ;)

https://stackoverflo...a-powershell-request

242
General Software Discussion / Re: Manage the display in the laptop
« on: November 08, 2020, 03:50 PM »
hit-it-with-a-hammer.jpg

243
Code: PowerShell [Select]
  1. <#
  2.   .\DiscoFile-MB3.ps1 <Uri>
  3.  
  4.   Given the URI from https://musicbrainz.org for an artist it will retrieve the
  5.   discography.
  6.  
  7.   eg.
  8.  
  9.   .\DiscoFile-MB3.ps1 https://musicbrainz.org/artist/66c662b6-6e2f-4930-8610-912e24c63ed1
  10.  
  11.   Will result in a file called 'AC_DC-MB - Discography.txt' in the same directory as
  12.   DiscoFile-MB3.ps1
  13.  
  14. #>
  15.  
  16. param (
  17.   [string]$Uri
  18. )
  19.  
  20. $web = (Invoke-WebRequest -Uri $Uri).RawContent
  21.  
  22. $temp = $web -replace '[\s\S]+application\/ld\+json..([\s\S]+?)<\/script>[\s\S]*$', '$1'
  23.  
  24. $json = $temp | ConvertFrom-Json
  25.  
  26. $outFile = ($json.name + "-MB - Discography.txt").Split([IO.Path]::GetInvalidFileNameChars()) -join '_'
  27. if (Test-Path $outFile) {
  28.   Remove-Item $outFile -Force
  29. }
  30.  
  31. for ($i = 0; $i -lt $json.album.Count; $i++) {
  32.   $temp = $json.album[$i].albumReleaseType
  33.   if ($temp -match 'AlbumRelease') {
  34.     $temp = $json.album[$i].albumProductionType
  35.     if (($temp -match '(LiveAlbum)|(StudioAlbum)') -and !($temp -match '(CompilationAlbum)|(SoundtrackAlbum)')) {
  36.       $albumUri = ($json.album[$i].'@id' + "?inc=releases&fmt=json") -replace '\.org\/', '.org/ws/2/'
  37.       $album = (Invoke-WebRequest -Uri "$($albumUri)") | ConvertFrom-Json
  38.       "$($album.releases[0].date.Substring(0,4)) - $($album.title)" | Out-File -FilePath $outFile -Append
  39.     }
  40.   }
  41. }
  42.  
  43. Get-Content $outFile | Sort-Object | Set-Content $outFile

Code: Text [Select]
  1. 1975 - High Voltage
  2. 1975 - T.N.T.
  3. 1976 - Dirty Deeds Done Dirt Cheap
  4. 1976 - High Voltage
  5. 1977 - Let There Be Rock
  6. 1978 - If You Want Blood You???ve Got It
  7. 1978 - Live from the Atlantic Studios
  8. 1978 - Powerage
  9. 1979 - Highway to Hell
  10. 1980 - Back in Black
  11. 1981 - For Those About to Rock (We Salute You)
  12. 1983 - Flick of the Switch
  13. 1985 - Fly on the Wall
  14. 1988 - Blow Up Your Video
  15. 1990 - The Razors Edge
  16. 1992 - Live at Donington
  17. 1995 - Ballbreaker
  18. 1996 - No Bull: Live - Plaza De Toros, Madrid
  19. 1996 - Westwood One Superstars In Concert Series
  20. 2000 - Stiff Upper Lip
  21. 2001 - Stiff Upper Lip: Live
  22. 2007 - Plug Me In
  23. 2008 - Black Ice
  24. 2011 - Live at River Plate
  25. 2014 - Rock or Bust
  26. 2018 - Legendary FM Broadcasts - The Paradise Theatre, Boston MA 21st August 1978
  27. 2018 - Live At Paradise Theatre Boston 1978
  28. 2019 - Live at the Apocalypse
  29. 2020 - AC/DC FM Broadcast Boston 1978
  30. 2020 - Power Up

244
General Software Discussion / Re: Manage the display in the laptop
« on: November 07, 2020, 05:08 PM »
It was my external mouse

Time to apply S.O.P. #1.

245
Nice 4wd!

Thanks!

One idea is to search for artist name and use the first match as artist page URL input into the rest of your program.
The URL format is
https://www.discogs.com/search/?type=artist&title=ac+dc

I think that given the incomplete records on Discogs, time would be better spent on either MusicBrainz, (filtering their overly complete lists down to just the studio releases, or otherwise selecting what you want), or trying to parse allmusic's HTML, (that'll be fun but it is just one big table, so maybe it won't be that hard - PowerShell can get at elements within HTML, just never really looked at it).

eg. For MusicBrainz, pipe the output into a ListView with checkboxes, select the ones you want, output to a text file - if you want to use manual selection.

This could be a little NANY 2021 app.

... it might inspire someone ;)

 :P

Looking at AllMusic, their info is a little mixed up also, Live albums in amongst Studio albums whereas MusicBrainz splits Studio and Live.

Since MusicBrainz list the Studio albums first, we can prune everything down to just those easily enough:

Code: PowerShell [Select]
  1. <#
  2.   .\DiscoFile-MB3.ps1 <Uri>
  3.  
  4.   Given the URI from https://musicbrainz.org for an artist it will retrieve the
  5.   discography.
  6.  
  7.   eg.
  8.  
  9.   .\DiscoFile-MB3.ps1 https://musicbrainz.org/artist/66c662b6-6e2f-4930-8610-912e24c63ed1
  10.  
  11.   Will result in a file called 'AC_DC-MB - Discography.txt' in the same directory as
  12.   DiscoFile.ps1
  13.  
  14. #>
  15.  
  16. param (
  17.   [string]$Uri
  18. )
  19.  
  20. $web = (Invoke-WebRequest -Uri $Uri).RawContent
  21.  
  22. $temp = $web -replace '[\s\S]+application\/ld\+json..([\s\S]+?)<\/script>[\s\S]*$', '$1'
  23.  
  24. $json = $temp | ConvertFrom-Json
  25.  
  26. $outFile = ($json.name + "-MB - Discography.txt").Split([IO.Path]::GetInvalidFileNameChars()) -join '_'
  27. if (Test-Path $outFile) {
  28.   Remove-Item $outFile -Force
  29. }
  30.  
  31. $i = 0
  32. do {
  33.   if ($json.album[$i].albumProductionType -match 'StudioAlbum') {
  34.     $found = $true
  35.     $albumUri = ($json.album[$i].'@id' + "?inc=releases&fmt=json") -replace '\.org\/', '.org/ws/2/'
  36.     $album = (Invoke-WebRequest -Uri "$($albumUri)") | ConvertFrom-Json
  37.     "$($album.releases[0].date) - $($album.title)" | Out-File -FilePath $outFile -Append
  38.   } else {
  39.     $found = $false
  40.   }
  41.   $i++
  42. } while ($found)

Which makes it a little nicer:
Code: Text [Select]
  1. 1975-02-17 - High Voltage
  2. 1975-12-01 - T.N.T.
  3. 1976-05-14 - High Voltage
  4. 1976-09-20 - Dirty Deeds Done Dirt Cheap
  5. 1977-03-21 - Let There Be Rock
  6. 1978-05-05 - Powerage
  7. 1979-07-27 - Highway to Hell
  8. 1980-07-25 - Back in Black
  9. 1981-11-23 - For Those About to Rock (We Salute You)
  10. 1983-08-15 - Flick of the Switch
  11. 1985-06-28 - Fly on the Wall
  12. 1988-01-18 - Blow Up Your Video
  13. 1990-09-21 - The Razors Edge
  14. 1995-09-22 - Ballbreaker
  15. 2000-02-25 - Stiff Upper Lip
  16. 2008-10-17 - Black Ice
  17. 2014-11-28 - Rock or Bust
  18. 2020-11-13 - Power Up

I guess AllMusic could be parsed using the HTML Agility Pack ... if I could work out how to use it ;D

246
I always keep an old logitech corded standard mouse for those times I need to reinstall Windows or do some MBR building since Windows doesn't have USB support when booting

It doesn't?

I've used a wireless keyboard+trackpad the last couple of times I've installed Windows just fine, (Win 10 and WHS2011).
It also works in the BIOS without a problem, (mouse driven BIOS interface).

Windows might not but your hardware can, you should check your BIOS, enable Legacy USB support.

247
That's one of the reasons I became fixated on the allmusic site.

Yes, nicer format but unfortunately in HTML which can be a P.I.T.A to parse.

They might have an API which can be leveraged but I couldn't find one in a quick look at the site.

Addendum: Looks like there is an API through Rovi (TiVo) if you get an API key here - although a quick look seems to indicate no way to get a list of releases for an artist.

248
This'll just grab the first date in a release:

Code: PowerShell [Select]
  1. <#
  2.   .\DiscoFile-MB2.ps1 <Uri>
  3.  
  4.   Given the URI from https://musicbrainz.org for an artist it will retrieve the
  5.   discography.
  6.  
  7.   eg.
  8.  
  9.   .\DiscoFile-MB2.ps1 https://musicbrainz.org/artist/66c662b6-6e2f-4930-8610-912e24c63ed1
  10.  
  11.   Will result in a file called 'AC_DC-MB - Discography.txt' in the same directory as
  12.   DiscoFile.ps1
  13.  
  14. #>
  15.  
  16. param (
  17.   [string]$Uri
  18. )
  19.  
  20. $web = (Invoke-WebRequest -Uri $Uri).RawContent
  21.  
  22. $temp = $web -replace '[\s\S]+application\/ld\+json..([\s\S]+?)<\/script>[\s\S]*$', '$1'
  23.  
  24. $json = $temp | ConvertFrom-Json
  25.  
  26. $outFile = ($json.name + "-MB - Discography.txt").Split([IO.Path]::GetInvalidFileNameChars()) -join '_'
  27. if (Test-Path $outFile) {
  28.   Remove-Item $outFile -Force
  29. }
  30.  
  31. for ($i = 0; $i -lt $json.album.Count; $i++) {
  32.   $albumUri = ($json.album[$i].'@id' + "?inc=releases&fmt=json") -replace '\.org\/', '.org/ws/2/'
  33.   $album = (Invoke-WebRequest -Uri "$($albumUri)") | ConvertFrom-Json
  34.   "$($album.releases[0].date) - $($album.title)" | Out-File -FilePath $outFile -Append
  35. }

Example output:
Code: Text [Select]
  1. 1976-02-14 - Dreamboat Annie
  2. 1977-04-19 - Magazine
  3. 1977-05-15 - Little Queen
  4. 1978-10-07 - Dog & Butterfly
  5. 1980-02-14 - B??b?? le Strange
  6. 1982-06-05 - Private Audition
  7. 1983-08-20 - Passionworks
  8. 1985-07-06 - Heart
  9. 1987-06-05 - Bad Animals
  10. 1990-03-26 - Brigade
  11. 1993-10-30 - Desire Walks On
  12. 2004-06-22 - Jupiters Darling
  13. 2010-08-27 - Red Velvet Car
  14. 2012-09-28 - Fanatic
  15. 2016-07-08 - Beautiful Broken
  16. 1980-11-29 - Greatest Hits / Live
  17. 1981 - Heart: Best of the Early Years
  18. 1995-12-11 - Definitive Collection
  19. 1996-07-03 - Ballads: The Greatest Hits
  20. 1997-03-11 - These Dreams: Heart???s Greatest Hits
  21. 1998-08-25 - Greatest Hits
  22. 2000-06-27 - Greatest Hits: 1985???1995
  23. 2002-11-26 - The Essential Heart
  24. 2005-09-27 - Love Alive
  25. 2005-11-15 - The Collection
  26. 2006-01-10 - Love Songs
  27. 2008 - Playlist: The Very Best of Heart
  28. 2009 - Private Audition / Passionworks
  29. 2011-06-23 - Heart / Bad Animals
  30. 2012-06-01 - Strange Euphoria
  31. 2012 - Super Hits
  32. 2013-05-13 - Icon
  33. 2013 - Original Album Classics
  34. 2014-10-14 - The Box Set Series
  35. 1991-09-24 - Rock the House Live!
  36. 1995-08-09 - The Road Home
  37. 2003 - Alive in Seattle
  38. 2007-10-23 - Dreamboat Annie Live
  39. 2008-08-05 - Live
  40. 2014-02-21 - Fanatic Live From Caesars Colosseum
  41. 2014-11-07 - Heart & Friends: Home for the Holidays
  42. 2016-11-25 - Live at the Royal Albert Hall
  43. 2019-01-25 - Live in Atlantic City
  44. 1975-06 - Magic Man
  45. 1975 - Crazy on You
  46. 1975 - How Deep It Goes
  47. 1976-12 - Dreamboat Annie
  48. 1976 - (Love Me Like Music) I???ll Be Your Song
  49. 1977 - Barracuda
  50. 1977 - Heartless
  51. 1977 - Kick It Out
  52. 1977 - Little Queen / Treat Me Well
  53. 1978 - Straight On
  54. 1978 - Without You
  55. 1985-09-14 - Never
  56. 1985 - Nothin??? at All
  57. 1986-01-18 - These Dreams
  58. 1986-07-19 - If Looks Could Kill
  59. 1987 - There???s the Girl
  60. 1987 - Who Will You Run To
  61. 1988-02 - Never / These Dreams
  62. 1990-03-28 - All I Wanna Do Is Make Love to You
  63. 1990-09 - Stranded
  64. 1990 - I Didn???t Want to Need You
  65. 1990 - Secret
  66. 1991 - You???re the Voice
  67. 1993-11 - Black on Black II
  68. 1993 - Will You Be There (In the Morning)
  69. 1994 - The Woman in Me
  70. 1998 - What About Love
  71. 2012-08-21 - Fanatic
  72. 2013-11-08 - Heart Christmas Single 2013
  73. 2017-11-03 - Band on the Run
  74. 2017-11-03 - Letting Go
  75. 2013-01-15 - Stairway to Heaven (live at the Kennedy Center Honors)
  76. 2018-10-23 - Lost Angel
  77. 2019-01-11 - B??b?? le Strange
  78. 2019-01-16 - Crazy on You
  79. 2012-11-12 - A Million Miles (Abe Clements remix)
  80. 1988 - If Looks Could Kill
  81. 2010-03-05 - WTF+4

You could add filtering to restrict it to certain types of releases by matching in the albumProductionType or albumReleaseType, eg.

Code: PowerShell [Select]
  1. for ($i = 0; $i -lt $json.album.Count; $i++) {
  2.   if ($json.album[$i].albumProductionType -match 'StudioAlbum') {
  3.     $albumUri = ($json.album[$i].'@id' + "?inc=releases&fmt=json") -replace '\.org\/', '.org/ws/2/'
  4.     $album = (Invoke-WebRequest -Uri "$($albumUri)") | ConvertFrom-Json
  5.     "$($album.releases[0].date) - $($album.title)" | Out-File -FilePath $outFile -Append
  6.   }
  7. }

So goes the theory :P

249
Thank you very, very much for taking the time to do this !

No problem, it was quite literally 20 minutes of playing around - working out the RegEx to remove everything I didn't want took the most time.

The MusicBrainz output is brilliant - but no dates means it's a pain to cross reference with my existing files.

You can get the dates, you just have to follow every album link but they do provide the info in JSON format without having to strip it out of the page.

For example, AC/DC's High Voltage:

XML
JSON

So it can be obtained, just grab the JSON and pull out the first date value, as an example:

Code: PowerShell [Select]
  1. $album = (Invoke-WebRequest -Uri "https://musicbrainz.org/ws/2/release-group/2b81e645-4586-4456-843a-9bc19a217470?inc=releases&fmt=json") | ConvertFrom-Json
  2. "$($album.releases[0].date) - $($album.title)"

The only problem being multiple release dates, eg. for that particular entry there are nine dates ... which one do you choose really?

Considering MusicBrainz provide album data in JSON, I'm kind of surprised that the artist page doesn't provide the same, (I mean including the album details, ie. combined artist+releases).

250
I'm not going to offer an all encompassing solution but here's something simple in PowerShell that uses Discogs - it might inspire someone ;)

Code: PowerShell [Select]
  1. <#
  2.   .\DiscoFile.ps1 <Uri>
  3.  
  4.   Given the URI from https://www.discogs.com for an artist it will retrieve the
  5.   discography.
  6.  
  7.   eg.
  8.  
  9.   .\DiscoFile.ps1 https://www.discogs.com/artist/84752-ACDC
  10.  
  11.   Will result in a file called 'AC_DC - Discography.txt' in the same directory as
  12.   DiscoFile.ps1
  13.  
  14. #>
  15.  
  16. param (
  17.   [string]$Uri
  18. )
  19.  
  20. $web = (Invoke-WebRequest -Uri $Uri).RawContent
  21.  
  22. $temp = $web -replace '[\s\S]+artist_schema..([\s\S]+?)<\/script>[\s\S]*$', '$1'
  23.  
  24. $json = $temp | ConvertFrom-Json
  25.  
  26. $outFile = ($json.name + " - Discography.txt").Split([IO.Path]::GetInvalidFileNameChars()) -join '_'
  27.  
  28. for ($i = 0; $i -lt $json.album.Count; $i++) {
  29.   "$($json.album[$i].datePublished) - $($json.album[$i].name)" | Out-File -FilePath $outFile -Append
  30. }

Using the example above, output will be to 'AC_DC - Discography.txt' and look like:
Code: Text [Select]
  1. 1975 - T.N.T.
  2. 1975 - High Voltage
  3. 1976 - Dirty Deeds Done Dirt Cheap
  4. 1976 - High Voltage
  5. 1976 - Dirty Deeds Done Dirt Cheap
  6. 1977 - Let There Be Rock
  7. 1978 - Powerage
  8. 1978 - If You Want Blood You've Got It
  9. 1979 - Highway To Hell
  10. 1980 - In Concert-215
  11. 1980 - Back In Black
  12. 1981 - For Those About To Rock (We Salute You)
  13. 1983 - Special Radio Interview Disc
  14. 1983 - Flick Of The Switch
  15. 1985 - Fly On The Wall
  16. 1988 - Blow Up Your Video
  17. 1990 - AC/DC Interview
  18. 1990 - The Razors Edge
  19. 1992 - Live

Why did I choose Discogs even though the album data is incomplete?

Code: PowerShell [Select]
  1. $json = $temp | ConvertFrom-Json

Album data is available in JSON format which makes retrieving it trivial.

Having a quick look at MusicBrainz, it appears to also be in JSON format - maybe I'll devote an extra 30 5 mins to this ;)

MusicBrainz version, they don't appear to include the year in the JSON data though:

Code: PowerShell [Select]
  1. <#
  2.   .\DiscoFile-MB.ps1 <Uri>
  3.  
  4.   Given the URI from https://musicbrainz.org for an artist it will retrieve the
  5.   discography.
  6.  
  7.   eg.
  8.  
  9.   .\DiscoFile-MB.ps1 https://musicbrainz.org/artist/66c662b6-6e2f-4930-8610-912e24c63ed1
  10.  
  11.   Will result in a file called 'AC_DC-MB - Discography.txt' in the same directory as
  12.   DiscoFile.ps1
  13.  
  14. #>
  15.  
  16. param (
  17.   [string]$Uri
  18. )
  19.  
  20. $web = (Invoke-WebRequest -Uri $Uri).RawContent
  21.  
  22. $temp = $web -replace '[\s\S]+application\/ld\+json..([\s\S]+?)<\/script>[\s\S]*$', '$1'
  23.  
  24. $json = $temp | ConvertFrom-Json
  25.  
  26. $outFile = ($json.name + "-MB - Discography.txt").Split([IO.Path]::GetInvalidFileNameChars()) -join '_'
  27.  
  28. for ($i = 0; $i -lt $json.album.Count; $i++) {
  29.   "$($json.album[$i].name)" | Out-File -FilePath $outFile -Append
  30. }

Pages: prev1 ... 5 6 7 8 9 [10] 11 12 13 14 15 ... 224next