├── README.md └── worknotes ├── client.md └── server.md /README.md: -------------------------------------------------------------------------------- 1 | # bingeworthySupport 2 | A place to report bugs, fixes and features in bingeworthy.org. 3 | -------------------------------------------------------------------------------- /worknotes/client.md: -------------------------------------------------------------------------------- 1 | #### 1/8/25; 11:13:47 AM by DW 2 | 3 | Turned off the websockets connection to wpidentity server. It's getting errors, every five minutes -- and we don't use the feature anyway, so this can be dealt with later. 4 | 5 | Working on the View Recent Log Items dialog, why were some program names blank? Because the program was just added to the database, and we weren't getting the information locally, it wasn't in our version of the programs list. Added code to reload the program list before displaying the table. 6 | 7 | #### 1/7/25; 6:08:01 PM by DW 8 | 9 | Added new command to View Recent Log Items. It shows you everything, not just one type of event. Pretty ugly but useful! 10 | 11 | #### 1/7/25; 11:08:58 AM by DW 12 | 13 | Someone named "hackney" stumbled across the site, and apparently it worked well enough for them. 14 | 15 | So let's give it a whirl. 16 | 17 | I didn't do all the stuff on the 12/31 list. 18 | 19 | I did do the custom page, but when it came time to hook it in, I realized I'd have to set up a whole wpidentity server for it. 20 | 21 | * it could still use the same database 22 | 23 | * but wpidentity.scripting.com was already hooked into blogbrowser.org, which was a very early version of wordland, so i changed it so that it says it's generic app on wordpress.com that i use to register all my little apps, like bingeworthy 24 | 25 | * i had remembered wpidentity as having a way to configure more than one app, but that must've been something else, it does not have the capability. 26 | 27 | Wrote a blog post and updated the docs. This is so much more fun if people use it. It's rough, but it works. 28 | 29 | #### 12/31/24; 9:30:44 AM by DW 30 | 31 | started to do this work, but i'm overloaded and not motivated 32 | 33 | a url system to get to places from outside, most do not require login 34 | 35 | https://tv.bingeworthy.org/ 36 | 37 | sign on page, or if they are signed on the current home page 38 | 39 | https://tv.bingeworthy.org/scripting/ 40 | 41 | the user's profile page, with all the shows they have rated, linked to? 42 | 43 | https://tv.bingeworthy.org/hotlist 44 | 45 | https://tv.bingeworthy.org/recent/ratings 46 | 47 | https://tv.bingeworthy.org/recent/additions 48 | 49 | things i want to do now 50 | 51 | urls in address bar trick so we can send around links easily 52 | 53 | my.bingeworthy functionality 54 | 55 | cosmetic stuff, eg the sign on page says userland but we're using wordpress 56 | 57 | create its own app on wordpress.com, right now it's using blogbrowser.org. 58 | 59 | hook up ratings to a bluesky account 60 | 61 | learn how to create a new bluesky account 62 | 63 | done 64 | 65 | delete feeds i'm not subscribed to 66 | 67 | #### 12/11/24; 11:19:23 AM by DW 68 | 69 | Added a new "Me" tab that shows my own ratings. 70 | 71 | #### 12/8/24; 2:02:15 PM by DW 72 | 73 | review menu for commands that can go 74 | 75 | * hotlist -- not needed in menu, it's one of the tabs 76 | 77 | * similar users and prolific raters reports 78 | 79 | since i am the only user right now, these should be commented out in the ui for now until such time as there are more users 80 | 81 | #### 12/7/24; 11:42:03 AM by DW 82 | 83 | Started work on displaying log items. In next session work some more on that. Added command to main menu to make it easy to preview. 84 | 85 | #### 12/6/24; 11:04:50 AM by DW 86 | 87 | Got the watch list working. 88 | 89 | If we click on "no opinion" we were previously deleting the rating, but that's not right, now wekeep the rating and understand in other places that the rating could be negative. 90 | 91 | #### 12/5/24; 11:54:59 AM by DW 92 | 93 | getScreenname was a stub, now it is filled in properly. 94 | 95 | when submitting a new program, we shouldn't have to reload the page to see the new program 96 | 97 | removed import ratings command 98 | 99 | #### 12/2/24; 4:17:21 PM by DW 100 | 101 | Next up 102 | 103 | list of programs by when added 104 | 105 | 106 | 107 | My watchlist from the NYT best tv shows of the year 108 | 109 | https://www.metacritic.com/tv/fantasmas/ (hbo) 110 | 111 | https://www.metacritic.com/tv/say-nothing/ (hulu) 112 | 113 | https://www.metacritic.com/tv/my-brilliant-friend/ (hbo) 114 | 115 | https://www.metacritic.com/tv/somebody-somewhere/ (hbo) 116 | 117 | https://www.metacritic.com/tv/baby-reindeer/ (netflix) 118 | 119 | https://www.metacritic.com/tv/the-decameron/ (netflix) 120 | 121 | https://www.metacritic.com/tv/the-diplomat-2023/ (netflix) 122 | 123 | https://www.metacritic.com/tv/evil/ (paramount) 124 | 125 | https://www.metacritic.com/tv/hacks/ (hbo) 126 | 127 | https://www.metacritic.com/tv/sunny/ (apple) 128 | 129 | https://www.metacritic.com/tv/the-sympathizer/ (hbo) 130 | 131 | https://www.metacritic.com/tv/my-lady-jane/ (amazon) 132 | 133 | https://www.metacritic.com/tv/3-body-problem/ (netflix) 134 | 135 | Next up, finish the submit program user interface. 136 | 137 | * must open the program page for the program 138 | 139 | * report errors 140 | 141 | #### 12/1/24; 11:30:55 AM by DW 142 | 143 | I want an import ratings command. 144 | 145 | you enter the name of the user you want to read from 146 | 147 | we load it in from the github repo 148 | 149 | confirm you want to import 1200 ratings (there is no undo!) 150 | 151 | 152 | 153 | i have it working, tested with one time through the loop 154 | 155 | next up, run the whole thing, and look to see if everything got through? 156 | 157 | 158 | 159 | 160 | 161 | The hotlist and user ratings commands in the menu now work. 162 | 163 | #### 11/30/24; 11:59:23 AM by DW 164 | 165 | appConsts moves into the HTML source head section, so it can be set on the server. 166 | 167 | #### 11/29/24; 5:54:14 PM by DW 168 | 169 | started work on logging on and off userland 170 | 171 | got to the place where this is the url 172 | 173 | http://localhost:1410/#?appkey=i8jo9qxxx76qtdnj&email=dave.winer%40gmail.com 174 | 175 | #### 11/27/24; 8:58:38 AM by DW 176 | 177 | in servercall, if flAuthenticated, add parameter userlandkey which contains the appkey for userland for this app. 178 | 179 | switch the server we're calling to the new binge3server running locally, away from the old binge2server which was tied to twitter, and also has older less efficient sql code. 180 | 181 | #### 11/26/24; 4:42:31 PM by DW 182 | 183 | This approach worked really well. 184 | 185 | Next up -- 186 | 187 | * get the identity system functioning so I can start using my email address as identity. 188 | 189 | we have to use the new server, not the old server, which is hooked up to Twitter for identity 190 | 191 | that's why none of the calls we're making work, we're sending old useless credentials 192 | 193 | over on the new server, we will send the user's credentials to the userland server, and it will return an access token just like twitter did 194 | 195 | now we have the identity of the user on the server 196 | 197 | * get the settings page working too. 198 | 199 | * can we rate programs? 200 | 201 | * can we add new programs? 202 | 203 | * what about the special readouts? 204 | 205 | #### 11/26/24; 9:38:51 AM by DW 206 | 207 | I'm going to try turning in a new direction. 208 | 209 | start with the bingeworthy2home code and simply port it to use userland for id. 210 | 211 | i did a lot of work on the UI, and starting over from scratch means a lot of features will be missing, or i'm looking at a full-month or more project. 212 | 213 | i moved the three files from that version into a new project called bingeworthyJunk, open it by cmd-/ on the line of code below 214 | 215 | nodeEditorSuite.openProjectWindow ("bingeworthyJunk") 216 | 217 | #### 11/24/24; 12:33:32 PM by DW 218 | 219 | I have the two-tab display working. And code to do many of the other readouts that will come soon enough. 220 | 221 | The next steps are to get the right panel converted, and then do some of the other aforementioned readouts. 222 | 223 | #### 11/23/24; 11:36:04 AM by DW 224 | 225 | Got the hotlist working, on server and home. 226 | 227 | Next up, get the main table working. It has two tabs, A-Z and Hotlist. 228 | 229 | And to the right it has the place where you set the rating for shows and can view other people's ratings. 230 | 231 | It's the main display, everything else relates to it. 232 | 233 | #### 11/22/24; 12:17:22 PM by DW 234 | 235 | We now have enough server functions implemented to start doing user interface stuff. 236 | 237 | Next session, let's view a list of the user's ratings. 238 | 239 | #### 11/21/24; 10:46:36 AM by DW 240 | 241 | Started. 242 | 243 | -------------------------------------------------------------------------------- /worknotes/server.md: -------------------------------------------------------------------------------- 1 | #### 12/31/24; 9:47:47 AM by DW 2 | 3 | We now return the home page for pages that aren't found. This allows things like this to work: 4 | 5 | * https://tv.bingeworthy.org/scripting/ 6 | 7 | * It presents the profile page of the user. 8 | 9 | * It's called pageRequested. 10 | 11 | * this feature works, but i punted on using it in the home app 12 | 13 | #### 12/25/24; 10:10:48 AM by DW 14 | 15 | Best Christmas present in a long time. Bingeworthy now supports WordPress identity. 16 | 17 | This means a lot of things. 18 | 19 | 1. It can now be used by other people. 20 | 21 | 2. When we edit comments written by users we can save it to a WordPress post. So BingeWorthy becomes a full featured publishing system and incredible exampleware for the ecosystem I want to start. 22 | 23 | 3. Unlike Twitter it isn't closed for business. But when I made the change from UserLand identity, which is my backup plan, I made it an option to go back and left all the code as it was debugged, so I'm pretty sure it works fine now, if for some reason WordPress goes through a transformation like the one Twitter went through. 24 | 25 | 4. I'm sure I'll think of other things. 26 | 27 | Next up. 28 | 29 | 0. Roam over the UI looking for breakage. They are there. This was a big change. 30 | 31 | 1. Start the database from scratch to remove dave.winer@gmail.com as my identity, and start building with scripting as my identity. 32 | 33 | Starting the database from scratch 34 | 35 | * drop database bingeworthy3; 36 | 37 | * use the commands in the readme to recreate the database 38 | 39 | * use the command in sqllog package to create the log table 40 | 41 | * run importProgramsForBingeworthy3, importRatingsForBingeworthy3. there are calls to the functions commented out in start function at end of binge3.js. 42 | 43 | * not sure about deleteProgramsNotRatedByDave -- it was confusing at first, but here's what it's doing. i must've registered a bunch of programs for people maybe before we had the ability for them to register. but i never watched or rated those programs. so we run this third, so that the initial state of bingeworthy is programs i have rated. 44 | 45 | #### 12/24/24; 9:31:18 AM by DW 46 | 47 | Switching over to wordpress identity, instead of userland. Try to preserve the option of going back to userland. 48 | 49 | * big change in getScreenName -- if config.flUserlandForIdentity then we communicate with userland.scripting.com, otherwise wpidentity.scripting.com 50 | 51 | * we include both userland and wordpress info in the clientConsts struct in returnServerHomePage. 52 | 53 | #### 12/11/24; 10:13:46 AM by DW 54 | 55 | Moved theButtons from the Home app into config, so we can use the definitions when generating the RSS feed. 56 | 57 | #### 12/10/24; 10:57:43 AM by DW 58 | 59 | The RSS feed works. 60 | 61 | You can subscribe at https://tv.bingeworthy.org/rss.xml. 62 | 63 | Still needs some work to get it happy in the blogroll reader. 64 | 65 | #### 12/8/24; 12:03:20 PM by DW 66 | 67 | You will see notes here about isRatingInDatabase and -1. Today I learned that when I tried to fix that, not sure what it was fixing, but it badly broke rating of programs. I undid the change. Not sure what other problems this will uncover. 68 | 69 | #### 12/7/24; 10:09:18 AM by DW 70 | 71 | Add a log table to the database. 72 | 73 | Two events are logged, adding a program and rating a program. 74 | 75 | Added a new endpoint for getting recent log items. 76 | 77 | Next up -- 78 | 79 | * work on the UI of the log display in home app 80 | 81 | * once that's settled, then add code to generate the RSS feed 82 | 83 | #### 12/6/24; 11:04:50 AM by DW 84 | 85 | isRatingInDatabase should just return a boolean indicating if the record is there 86 | 87 | * it was doing something weird, and returning false if the value is -1 88 | 89 | * i want to fix it now, and we'll see what breaks in the client. 90 | 91 | It shouldn't be possible to have two programs with the same title, so I added code to check before we add a program. 92 | 93 | * This can happen if there's a page on metacritic for season 1 and one for the show in general. 94 | 95 | * The title in their view is the same. Can't do much with that. 96 | 97 | All the watch list endpoints work. 98 | 99 | #### 12/5/24; 10:01:10 AM by DW 100 | 101 | initial database setup 102 | 103 | * three routines for initial setup of the database 104 | 105 | * importProgramsForBingeworthy3 106 | 107 | * importRatingsForBingeworthy3 108 | 109 | * deleteProgramsNotRatedByDave 110 | 111 | * ran them in order, and that is how we start up the new bingeworthy 112 | 113 | #### 12/2/24; 11:16:11 AM by DW 114 | 115 | restored my ratings from backup, using new command 116 | 117 | getRecentRatings now works, the list shows up in client 118 | 119 | importRatingsForApi implemented 120 | 121 | wrote getDataFromMetacriticPage, using regex instead of using a package 122 | 123 | * bingeworthy 2 used open-graph-scraper, but the latest version doesn't run in Node on my desktop machine. 124 | 125 | * tried to figure out why, but decided it'd be easier to write my own scraper. it was. 126 | 127 | * in the next session i'll get the submitting process wired in again 128 | 129 | #### 12/1/24; 10:30:05 AM by DW 130 | 131 | next up 132 | 133 | submitting a program 134 | 135 | restore ratings from backup 136 | 137 | decisions made 138 | 139 | keep the programs table, toss the ratings 140 | 141 | make it easy to restore ratings from backup 142 | 143 | start the hotlist threshhold at 1 rating, it was 25 before 144 | 145 | restart ratings table 146 | 147 | drop table ratings; 148 | 149 | create table ratings ( id int auto_increment primary key, idProgram varchar (255) not null default '', screenname varchar (255) not null default '', rating tinyint not null default 0, whenCreated datetime not null default current_timestamp, whenModified datetime not null default current_timestamp on update current_timestamp, comment text not null, unique key (screenname, idProgram) ); 150 | 151 | test rating things and there are problems, not surprising with this level of shakeup 152 | 153 | select * from ratings where idprogram = 'https://www.metacritic.com/tv/30-rock' and screenname = 'davewiner'; 154 | 155 | 156 | 157 | https://userland.scripting.com/getuseridentity?token=xxx&clientkey=fmds8ootnzgfjqvnlnofee4dfhj6jb89xs0wjcjanl4klgdxfidtvhioumjtehna 158 | 159 | select * from ratings where idprogram = 'https://www.metacritic.com/tv/30-rock' and screenname = 'dave.winer@gmail.com'; 160 | 161 | #### 11/30/24; 12:10:40 PM by DW 162 | 163 | moved appConsts from code.js in the client, to index.html. 164 | 165 | logging on and off userland now works 166 | 167 | 168 | 169 | next up -- it's time to figure out how to start the database 170 | 171 | * remove all programs? 172 | 173 | * remove all ratings? 174 | 175 | 176 | 177 | next up -- settings 178 | 179 | * choose a name for yourself, so we don't have to show your email address to identify yourself 180 | 181 | * make the email address they used to sign on a tool tip so it's easy to see 182 | 183 | 184 | 185 | next up -- get my.bingeworthy to work off the new database 186 | 187 | 188 | 189 | next up -- watchlist is just a boolean in the ratings record 190 | 191 | 192 | 193 | next up -- a way to write comments on a rating, there's space there for it 194 | 195 | 196 | 197 | next up -- go through the menu and implement each of the commands 198 | 199 | 200 | 201 | next up -- look for broken images 202 | 203 | 204 | 205 | next up -- review and smooth out userland.scripting.com user interface 206 | 207 | 208 | 209 | #### 11/28/24; 9:52:40 AM by DW 210 | 211 | getScreenName is now implemented for real, calling the userland server when it needs to know the user's screenname (now an email address) 212 | 213 | binge3home is served from handleHttpRequest, as with all my recent apps. now we can transmit config values to the client from the server. no need to maintain values in two places. 214 | 215 | #### 11/27/24; 9:13:45 AM by DW 216 | 217 | added stubs for addToWatchlist, deleteFromWatchlist, isInWatchlist, getWatchlist. 218 | 219 | in all the higher-level code in a rating.id is the url of a metacritic page, and there is no concept of a numeric id. in the database, id is the numeric id assigned by sql. 220 | 221 | so now when we convert a rating rec to return to the user interface code, 222 | 223 | we set the value of rating.id to idProgram from the SQL record, 224 | 225 | and set the value of rating.serialnum to id from the SQL record. 226 | 227 | #### 11/24/24; 12:35:01 PM by DW 228 | 229 | Two support routines for the tab display in the client, getHotlistWithUserRating and getAllProgramsWithUserRating. 230 | 231 | #### 11/21/24; 1:05:18 PM by DW 232 | 233 | Today I converted getAllPrograms, getUserRatings, getRating and started to convert setRating, and wrote calls to each in binge3Home. 234 | 235 | Next up -- get setRating working, and continue converting. 236 | 237 | #### 11/20/24; 9:53:49 AM by DW 238 | 239 | next up, converting all the old bingeworthy2 functions to the version 3 database. 240 | 241 | initially we were writing this to this path on S3 242 | 243 | * /scripting.com/code/userland/demos/binge/ 244 | 245 | but this is really the new bingeworth server so 246 | 247 | * /scripting.com/code/binge3Server/ 248 | 249 | queries 250 | 251 | * select id, screenname, title from programs; 252 | 253 | * select id, rating, idProgram from ratings where screenname = 'davewiner'; 254 | 255 | * select r.rating, p.title from ratings r inner join programs p on r.idprogram = p.idprogram where r.screenname = 'davewiner' order by r.rating desc; 256 | 257 | #### 11/19/24; 12:41:53 PM by DW -- bingeworthy2 database 258 | 259 | The bingeworthy2 database is documented here. 260 | 261 | #### 11/18/24; 4:53:00 PM by DW 262 | 263 | Started. 264 | 265 | --------------------------------------------------------------------------------