[?] MiloDB: Finding Old Teases

All about the past, current and future webteases and the art of webteasing in general.
---
User avatar
FrozenWolf
Explorer At Heart
Explorer At Heart
Posts: 326
Joined: Tue Oct 30, 2018 7:50 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Dom/me(s): None
Sub/Slave(s): None
Location: UK

[?] MiloDB: Finding Old Teases

Post by FrozenWolf »

MiloDB
I've written a small application that can perform offline searches for teases. It can search by text content, title, date, author, etc. It supports EOS, NYX (Flash), and traditional tease types. I've used it a few times to help others find teases that have been lost to history, but also to find teases that might contain certain keywords or phrases that could be of interest.

The application primarily consists of an executable (one for Windows and one for Linux), and the database. There is also a config file that can be change to customise some features such as the colours used for the ANSI, BBCode, and HTML/CSS outputs.

Questions for the Community
I've had a few requests to get access to this app but I wasn't sure how the community would respond. I'm interested in what authors, admins, and users think of the following before release it:
  • The database contains all text of every tease and it is easy to access all text of any tease. (see 'Database' section below for more info)
  • Teases get updated periodically, and it's the older teases that tend to get lost to history, so I'm considering not including the last few months (maybe three?) of teases in the database to allow for the content and ratings to settle.
  • It's a command line application because I'm old and Linux based. I might craft a GUI for it if there's enough interest.
Database
The database contains the metadata (title, author, rating, tags, etc.) and stripped down text of all teases. All JavaScript, HTML tags, page navigation, media, and media references have been removed. Inline <eval>...</eval> expressions are replaced with <eval>. It is heavily compressed, and is currently ~20MB for ~7,500 teases.

The intent is not to inlude the most recent few months worth of teases as these are typically still easy to find from the Milovana website, and authors may still be updating those teases.

Known limitations
  • The tags are captured from scraping the website front-end, and I don't think they are the complete set that the author provided when creating the tease.
  • There is no way to know when an older tease has been updated because it's only the published date that is available from scraping the website front-end. Hence older teases that are updated will not be reflected in the database unless the author lets me know or there's another way of finding out.
  • The Windows console does not like Unicode characters, so unfortunately you might see boxes instead of real characters.
Sample of Use
Starting the app:
Spoiler: show
Milovana Database 0.4, 2022-02-19
Loaded config from 'config.json'
Load database
  Read     : 0.192s
  Unpack   : 1.061s
  Parse    : 0.343s
  Assemble : 0.105s
Load completed: 1.701s
7,527 teases loaded

Enter command (or "help"):
>
Search for the text 'cookies' in any tease that was made in 2018:
Spoiler: show
> query text contains cookies and date contains 2018

  1:  #35401  nyx  83%  2018-10-04  Will you save America ? : [lovecraft, @46155]
  2:  #38664  reg  84%  2018-10-15  Team Tiramisu : [FoxBehave, @102538]
Show the specific matches from the second match:
Spoiler: show
> show 2

Index        2
Tease   #38664   Title  'Team Tiramisu'
Author  @102538   Name   'FoxBehave'
Type       reg   Date   2018-10-15
Rating     84%   Tags   :foodplay:shaving:
Summary
Lighthearted dessert foodplay mess. Some disgust play, but no scat. Have fun!
Matching text
----------------------------------------
 boy.
This is what you need to have:
○ Cookies (ideally ladyfingers or any kind that 
----------------------------------------
 bring?
Don't worry, I'll repeat it:
○ Cookies (ideally ladyfingers or any kind that 
----------------------------------------
ir-cream aside for a bit and bring the cookies.
Crush them until they fit well into t
----------------------------------------
our coffpee is ready, pour it over the cookies and let it soak in.
----------------------------------------
Open the second tease in the default web browser.
Spoiler: show
> open 2

Opening 'https://milovana.com/webteases/showtease.php?id=38664': Team Tiramisu
Commands
There are lots of commands that do various things:
Spoiler: show
> help

Run queries on the database to retrieve matches and provide results in a
variety of formats.
For example, perform a query against teases that contain the text "cookies" in
any of the pages, and show the matching text results for each tease:
  > query text contains cookies
  > show

List of commands:
    browse  Opens a webpage for the results with the matching paragraphs of text
 browseall  Opens a webpage for the results with all paragraphs of text
  ellipsis  Sets whether matching text paragraphs are abbreviated with an ellipsis
      exit  Exits the application
    format  Sets the formatting used in the output of commands
      help  Prints the list of commands or detailed help for a specific command
 highlight  Sets whether text matches are highlighted in the output
      list  Lists the current results, one per line
      open  Opens a specified tease or author profile in the default browser
openauthor  Opens a specified author profile in the default browser
     query  Performs a regex search against metadata and text content
      show  Prints the summary and text matches for the current results
      sort  Sorts the output by specific fields
   summary  Prints the summaries for the current results
       url  Copies the URL of a specified tease or author profile to the clipboard
 urlauthor  Copies the URL of an author's profile to the clipboard

Use 'help <command name>' for detailed information on a specific command.
Press <TAB> once to complete command names and arguments where possible.
Press <TAB> twice to get a list of suggestions for command names and arguments.
Press <UP>/<DOWN> to see previously entered commands.
User avatar
Trusfrated
Explorer At Heart
Explorer At Heart
Posts: 450
Joined: Mon Nov 08, 2010 8:41 am
Gender: Male

Re: [?] MiloDB: Finding Old Teases

Post by Trusfrated »

Wow! I am really interested in this. Amazing work!

It's really a shame that the site itself doesn't allow full text searching of all teases, so this sounds like an extremely useful tool. I would be reasonably comfortable using it from the command line, but I can imagine this would be a turn-off to many. A gui or (even better) a hosted online version would be really nice.

I think the main thing is to preserve and search through the majority of teases that are older than the last few months. So even a single release would be great, but are you thinking of doing periodic updates? If it's not hosted online, then this would mean the db would eventually get outdated and people would have to download a new version. And that could be a con as well.

I don't even want to think of the work this took, but thank you! I hope it is shared in one form or another, eventually.
ImageImage
User avatar
FrozenWolf
Explorer At Heart
Explorer At Heart
Posts: 326
Joined: Tue Oct 30, 2018 7:50 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Dom/me(s): None
Sub/Slave(s): None
Location: UK

Re: [?] MiloDB: Finding Old Teases

Post by FrozenWolf »

Trusfrated wrote: Wed Feb 23, 2022 12:55 am It's really a shame that the site itself doesn't allow full text searching of all teases
Absolutely! I couldn't find some old teases where I could only remember a few phrases in the text, so I started building the app from there, and it just kept growing. Maybe one day the website will have similar functionality, in which case maybe this tool can be used as a stopgap until that happens.
Trusfrated wrote: Wed Feb 23, 2022 12:55 am I would be reasonably comfortable using it from the command line, but I can imagine this would be a turn-off to many. A gui or (even better) a hosted online version would be really nice.
I'd love to make a GUI version in the future, and I do have some ideas for what it would it would like. I thought I'd get it released now as a command-line tool so that at least users can start having a go with it, then produce a GUI a bit later on.

I agree that a hosted online version would be fantastic, but I don't think that's something I'd be able to produce.
Trusfrated wrote: Wed Feb 23, 2022 12:55 am I think the main thing is to preserve and search through the majority of teases that are older than the last few months. So even a single release would be great, but are you thinking of doing periodic updates?
Yes, that's a good point that I forgot to mention. I would likely be providing an updated release every one or two months depending on my availability, so the database would be kept reasonably up to date.
sinraven
Explorer
Explorer
Posts: 16
Joined: Tue Sep 08, 2020 7:57 am

Re: [?] MiloDB: Finding Old Teases

Post by sinraven »

I really like the idea of this too and would happily use it if it was ever released, either through command prompt or a ui.

The search on this site can be slightly lacking when you are after a tease with a specific thing / action and tagging can often not show all the actual content of the tease. This could be perfect for trying to track those down.
User avatar
FrozenWolf
Explorer At Heart
Explorer At Heart
Posts: 326
Joined: Tue Oct 30, 2018 7:50 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Dom/me(s): None
Sub/Slave(s): None
Location: UK

Re: [?] MiloDB: Finding Old Teases

Post by FrozenWolf »

Thanks for the initial feedback.

I have a beta build that's available for trying out with a database that isn't fully aligned with the current state of the teases from the website, but it's good enough for evaluation purposes.

I'll send a PM with the details to Trusfrated, sinraven, and PlayfulGuy (who's been extremely helpful so far in finding issues with the alpha builds and has made some great suggestions). If you have a few minutes to spare, I'd welcome any feedback.

If all goes well and there aren't any significant problems, I hope to get the first real release out before the end of March.
User avatar
Trusfrated
Explorer At Heart
Explorer At Heart
Posts: 450
Joined: Mon Nov 08, 2010 8:41 am
Gender: Male

Re: [?] MiloDB: Finding Old Teases

Post by Trusfrated »

My reaction to the beta is very similar to my initial reaction to this thread: this is great! :smile:

Everything I tried seemed to work really well. There's almost too many options, but that's not a criticism at all. I think every "extra" thing you added (beyond the basics) would have been something I might've asked about or suggested but didn't really "need" if you know what I mean.

It's really easy to use and figure out; the Help and tab features are great. Extra easy for someone who has spend time using dos or the command prompt before.

I particularly like the Browse feature which makes the results a little more "pretty" to look at. My main feedback would be that it would sure be nice to pull in the original thumbnails that go with the teases, either into the database or just pull them "live" into the temporary browse page. It helps a TON for me to remember a tease if I can see the thumbnail that I associated with it. But I can totally understand if you don't want to include that kind of non-text data in this.

A GUI would be nice but as you have done things so well it is not absolutely necessary. Periodic updates to the database are a bit of a concern, but considering we've got over 15 years of teases cataloged this way, additions will be relatively minor I suppose.

Thank you again! :wave:
ImageImage
User avatar
FrozenWolf
Explorer At Heart
Explorer At Heart
Posts: 326
Joined: Tue Oct 30, 2018 7:50 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Dom/me(s): None
Sub/Slave(s): None
Location: UK

Re: [?] MiloDB: Finding Old Teases

Post by FrozenWolf »

Trusfrated wrote: Tue Mar 08, 2022 5:21 am My reaction to the beta is very similar to my initial reaction to this thread: this is great! :smile:

Everything I tried seemed to work really well. There's almost too many options, but that's not a criticism at all. I think every "extra" thing you added (beyond the basics) would have been something I might've asked about or suggested but didn't really "need" if you know what I mean.

It's really easy to use and figure out; the Help and tab features are great. Extra easy for someone who has spend time using dos or the command prompt before.
Thank you very much for trying it out, I'm happy that you've managed to find it easy enough to work with :-D . I'm always open to suggestions including adding new commands.
Trusfrated wrote: Tue Mar 08, 2022 5:21 am I particularly like the Browse feature which makes the results a little more "pretty" to look at. My main feedback would be that it would sure be nice to pull in the original thumbnails that go with the teases, either into the database or just pull them "live" into the temporary browse page. It helps a TON for me to remember a tease if I can see the thumbnail that I associated with it. But I can totally understand if you don't want to include that kind of non-text data in this.
That's a great idea. I do capture the thumbnail URL in the database, so I extended the code and CSS.
Is this the sort of thing you had in mind?
Screenshot from 2022-03-08 14-32-19.png
Screenshot from 2022-03-08 14-32-19.png (159.57 KiB) Viewed 2231 times
I'm terrible at user interfaces, but hopefully it'll do for now, and someone cleverer than me with an artistic eye can provide a much nicer CSS. Those are great teases by the way, thank you!
Trusfrated wrote: Tue Mar 08, 2022 5:21 am A GUI would be nice but as you have done things so well it is not absolutely necessary.
I'll definitely have a go at doing a GUI at some point in the future. I've made lots of GUIs in the past for various projects, although they've always been described as 'a bit engineery' and 'great if you're a developer'. It'll definitely be 'unique' and 'interesting'.
Trusfrated wrote: Tue Mar 08, 2022 5:21 am Periodic updates to the database are a bit of a concern, but considering we've got over 15 years of teases cataloged this way, additions will be relatively minor I suppose.
Updating the database at the moment is a mix of automated tools, manual intervention, and running a few scripts. I'll get it properly automated at some point so at least that aspect is easier for me. Let's hope that 15 years of content will keep users busy for a while.
sinraven
Explorer
Explorer
Posts: 16
Joined: Tue Sep 08, 2020 7:57 am

Re: [?] MiloDB: Finding Old Teases

Post by sinraven »

Firstly, thank you so much for giving me access to this.

Secondly, its amazing. I have only played around with it a little so far but the search capabilities are fantastic especially compared to what you can do on the website. Text search where you can specify a string such as 'Put a condom on' rather than hoping to get lucky with single words is game changing for finding a tease that has what you want, especially when the results show the context of your search.

The generating results in a page is really nice as well, and I agree thumbnails will make it much easier to identify the teases you may have already done or are familiar with but it looks like you are already on top of that.

Will do some more testing with it but just wanted to post some quick feedback to help you keep the enthusiasm going!
User avatar
Trusfrated
Explorer At Heart
Explorer At Heart
Posts: 450
Joined: Mon Nov 08, 2010 8:41 am
Gender: Male

Re: [?] MiloDB: Finding Old Teases

Post by Trusfrated »

FrozenWolf wrote: Tue Mar 08, 2022 3:19 pm
Trusfrated wrote: Tue Mar 08, 2022 5:21 am I particularly like the Browse feature which makes the results a little more "pretty" to look at. My main feedback would be that it would sure be nice to pull in the original thumbnails that go with the teases, either into the database or just pull them "live" into the temporary browse page. It helps a TON for me to remember a tease if I can see the thumbnail that I associated with it. But I can totally understand if you don't want to include that kind of non-text data in this.
That's a great idea. I do capture the thumbnail URL in the database, so I extended the code and CSS.
Is this the sort of thing you had in mind?

Screenshot from 2022-03-08 14-32-19.png

I'm terrible at user interfaces, but hopefully it'll do for now, and someone cleverer than me with an artistic eye can provide a much nicer CSS. Those are great teases by the way, thank you!
Yes! Exactly. I would also perhaps suggest the thumbnail be clickable to the tease URL as it is on the site. Also, my personal preference would be that links from the Browse page would open in a new tab so you could easily refer back to the results list. Could be a configurable setting if this wouldn't be wanted behavior for some.

Re-sorting on the field headings would be nice, but not sure if that is possible in this environment.

Another "nice thing to have" might be an "award" field for TOTM nominees and winners so you could search and sort on those (nominee, winner, either, neither).

Also, can you provide a few examples of querying based on tease ratings? For some reason, I'm having difficulty figuring out how to use the comparison operators.

Code: Select all

query rating is [4.4]
gives no results

Code: Select all

query rating is >=[4.4]
gives no results

Code: Select all

query ratingPercent is [89]
gives results (as in the example in Help).

Code: Select all

query ratingPercent is >= [89]
doesn't work.

Curiously,

Code: Select all

query rating is [90]
gives the result of a deleted tease with a zero rating. :-P

I'm sure it's simple but a little nudge here would be helpful. :\'-(
FrozenWolf wrote: Tue Mar 08, 2022 3:19 pm Those are great teases by the way, thank you!
Aw, thank you so much! :blush:
ImageImage
User avatar
FrozenWolf
Explorer At Heart
Explorer At Heart
Posts: 326
Joined: Tue Oct 30, 2018 7:50 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Dom/me(s): None
Sub/Slave(s): None
Location: UK

Re: [?] MiloDB: Finding Old Teases

Post by FrozenWolf »

sinraven wrote: Tue Mar 08, 2022 4:07 pm Firstly, thank you so much for giving me access to this.

Secondly, its amazing. I have only played around with it a little so far but the search capabilities are fantastic especially compared to what you can do on the website. Text search where you can specify a string such as 'Put a condom on' rather than hoping to get lucky with single words is game changing for finding a tease that has what you want, especially when the results show the context of your search.
Thank you for testing it out! I'm happy that it seems to be working well. :-D Likewise, I starting making the app because I also wanted to be able to search for a particular phrase in the text, and the whole application just kept getting bigger and bigger.
sinraven wrote: Tue Mar 08, 2022 4:07 pm The generating results in a page is really nice as well, and I agree thumbnails will make it much easier to identify the teases you may have already done or are familiar with but it looks like you are already on top of that.
I should be able to get the thumbnail enhancement in the next beta version in a few days along with a few other tweaks.
User avatar
FrozenWolf
Explorer At Heart
Explorer At Heart
Posts: 326
Joined: Tue Oct 30, 2018 7:50 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Dom/me(s): None
Sub/Slave(s): None
Location: UK

Re: [?] MiloDB: Finding Old Teases

Post by FrozenWolf »

Trusfrated wrote: Tue Mar 08, 2022 7:58 pm I would also perhaps suggest the thumbnail be clickable to the tease URL as it is on the site.
That's a good idea, I didn't even think about that!
Trusfrated wrote: Tue Mar 08, 2022 7:58 pm Also, my personal preference would be that links from the Browse page would open in a new tab so you could easily refer back to the results list. Could be a configurable setting if this wouldn't be wanted behavior for some.
I know what you mean. I use a popup blocker in Firefox that would prevent any popups, and because it's a generated file, it couldn't be added to the 'trusted' list, so the popups would always be blocked. I think I've always just used the middle-mouse button to open any link in a new tab.
Interesting idea though; I will have a think about it!
Trusfrated wrote: Tue Mar 08, 2022 7:58 pm Re-sorting on the field headings would be nice, but not sure if that is possible in this environment.
That's also a good idea. I think it might involve some magical CSS or Javascript in the page which might be beyond my skill set. The workaround for now is to use the 'sort' command before using the 'browse' command.
Trusfrated wrote: Tue Mar 08, 2022 7:58 pm Another "nice thing to have" might be an "award" field for TOTM nominees and winners so you could search and sort on those (nominee, winner, either, neither).
Ooh, I don't think I captured any of that information during the webscraping. I'd have to re-scan the whole lot to get that information. It's a good idea and that can be another field to search/sort on.
Trusfrated wrote: Tue Mar 08, 2022 7:58 pm Also, can you provide a few examples of querying based on tease ratings? For some reason, I'm having difficulty figuring out how to use the comparison operators.

Code: Select all

query rating is [4.4]
gives no results

Code: Select all

query rating is >=[4.4]
gives no results

Code: Select all

query ratingPercent is [89]
gives results (as in the example in Help).

Code: Select all

query ratingPercent is >= [89]
doesn't work.
Ah, yes, this is something I need to improve on. All fields (including rating) are matched as text items using regular expressions. The verb 'is' will only match against the whole text. The verb 'contains' will match anywhere within the text.

Let's consider the first search that you tried:

Code: Select all

query rating is [4.4]
The brackets in "[4.4]" is a regular expression that matches a single character against either "4", "."(which means any character) or "4". The verb 'is' will therefore only match against a rating that is a single character, but as all ratings are three characters such as "4.2", that'll never match. The help example is "query ratingPercent is [89]." and the "." at the end is important as it means 'any character', so that will match against "80", "81", "82", "83", ... "90", "91", "92", "93" ... "99". I do want to add operators such as "=", "<", ">=" etc. for numeric fields so it's a bit considerably easier to use.

If you wanted to search for a rating of 4.4:

Code: Select all

query rating is 4\.4
The "\." means don't treat the "." as 'any character', but treat it as an actual dot.

If you wanted to search for a rating >= 4.4:

Code: Select all

query rating is 4\.[4-9]|5\.0
The "4\.[4-9]" means match against "4.4", "4.5", "4.6", "4.7", "4.8", "4.9".
The "|" means or.
The "5\.0" means match against "5.0"
I appreciate, that's not very intuitive! :blush:

If you wanted to search for a rating >= 2.5 and <= 4.2:

Code: Select all

query rating is 2\.[5-9]|3.+|4\.[0-2]
Obvious really! :look:
Trusfrated wrote: Tue Mar 08, 2022 7:58 pm Curiously,

Code: Select all

query rating is [90]
gives the result of a deleted tease with a zero rating. :-P
That's very interesting. It's matching against a rating of either "9" or "0" and I didn't realise there was a rating with a "0", which there shouldn't be. It actually means that there's an entry in the database where the rating is missing which can happen for the most recent teases that haven't had any reviews yet.
User avatar
Trusfrated
Explorer At Heart
Explorer At Heart
Posts: 450
Joined: Mon Nov 08, 2010 8:41 am
Gender: Male

Re: [?] MiloDB: Finding Old Teases

Post by Trusfrated »

FrozenWolf wrote: Tue Mar 08, 2022 9:02 pm
Trusfrated wrote: Tue Mar 08, 2022 7:58 pm Another "nice thing to have" might be an "award" field for TOTM nominees and winners so you could search and sort on those (nominee, winner, either, neither).
Ooh, I don't think I captured any of that information during the webscraping. I'd have to re-scan the whole lot to get that information. It's a good idea and that can be another field to search/sort on.
I just remembered that those awards are based on the tags "totm" and "totm-nominee". If you query the db on those you get lots of hits, but it is not complete. I think this unfortunately exposes the issue of not being able to scrape all tags. If there are more than five you may not get them all. For instance, my teases do not have the totm tag in the db, but hundreds of others do. I also have an "sph" tag on all of my teases but I don't think you would normally see that under them when browsing. You'd have to specifically search for that tag with a modified url since it is not one of the "preset" tags in the advanced search.

I don't know if it would be practical/possible to determine nominee/winner status by the presence of the graphical badge, but if so that would be a sure-fire way of scraping that info.
Trusfrated wrote: Tue Mar 08, 2022 7:58 pm Also, can you provide a few examples of querying based on tease ratings? For some reason, I'm having difficulty figuring out how to use the comparison operators.

Code: Select all

query rating is [4.4]
gives no results

Code: Select all

query rating is >=[4.4]
gives no results

Code: Select all

query ratingPercent is [89]
gives results (as in the example in Help).

Code: Select all

query ratingPercent is >= [89]
doesn't work.
Spoiler: show
Ah, yes, this is something I need to improve on. All fields (including rating) are matched as text items using regular expressions. The verb 'is' will only match against the whole text. The verb 'contains' will match anywhere within the text.

Let's consider the first search that you tried:

Code: Select all

query rating is [4.4]
The brackets in "[4.4]" is a regular expression that matches a single character against either "4", "."(which means any character) or "4". The verb 'is' will therefore only match against a rating that is a single character, but as all ratings are three characters such as "4.2", that'll never match. The help example is "query ratingPercent is [89]." and the "." at the end is important as it means 'any character', so that will match against "80", "81", "82", "83", ... "90", "91", "92", "93" ... "99". I do want to add operators such as "=", "<", ">=" etc. for numeric fields so it's a bit considerably easier to use.

If you wanted to search for a rating of 4.4:

Code: Select all

query rating is 4\.4
The "\." means don't treat the "." as 'any character', but treat it as an actual dot.

If you wanted to search for a rating >= 4.4:

Code: Select all

query rating is 4\.[4-9]|5\.0
The "4\.[4-9]" means match against "4.4", "4.5", "4.6", "4.7", "4.8", "4.9".
The "|" means or.
The "5\.0" means match against "5.0"
I appreciate, that's not very intuitive! :blush:

If you wanted to search for a rating >= 2.5 and <= 4.2:

Code: Select all

query rating is 2\.[5-9]|3.+|4\.[0-2]
Obvious really! :look:
Thanks for the quick lesson! It really is more involved than I thought. :\'-( I'm not sure why the field can't be (or shouldn't be) converted to numerical but I'm sure you have your reasons. This is a case where a GUI might help A LOT by dynamically showing you what you can and can't use to make your queries/comparisons, or to do some of this expression-writing in the background.
ImageImage
User avatar
FrozenWolf
Explorer At Heart
Explorer At Heart
Posts: 326
Joined: Tue Oct 30, 2018 7:50 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Dom/me(s): None
Sub/Slave(s): None
Location: UK

Re: [?] MiloDB: Finding Old Teases

Post by FrozenWolf »

Trusfrated wrote: Tue Mar 08, 2022 10:12 pm I just remembered that those awards are based on the tags "totm" and "totm-nominee". If you query the db on those you get lots of hits, but it is not complete. I think this unfortunately exposes the issue of not being able to scrape all tags. If there are more than five you may not get them all. For instance, my teases do not have the totm tag in the db, but hundreds of others do. I also have an "sph" tag on all of my teases but I don't think you would normally see that under them when browsing. You'd have to specifically search for that tag with a modified url since it is not one of the "preset" tags in the advanced search.
The tags are definitely a problem, which is why I didn't bother with them too much. You've probably noticed that they're shown in a format like ":chastity:towel:metronome:cbt:story:" which was a temporary implementation, and when I realised that it was an incomplete set, I didn't bother doing any more with them. I'll probably make them display more prettily at some point, but I don't think they're a great deal of use sadly.
Trusfrated wrote: Tue Mar 08, 2022 10:12 pm I don't know if it would be practical/possible to determine nominee/winner status by the presence of the graphical badge, but if so that would be a sure-fire way of scraping that info.
Yeah, that would be my intention. I can find the image reference easily enough during the scrape.
TOTM Winner has this:

Code: Select all

<img class="ticon totmticon" src="https://milovana.com/gx/ticon_totm_winner.gif?32" alt="TOTM - Winner!">
TOTM Nominee has this:

Code: Select all

<img class="ticon totmticon" src="https://milovana.com/gx/ticon_totm_nominee.gif?32" alt="TOTM - Nominee!">
Trusfrated wrote: Tue Mar 08, 2022 7:58 pm Thanks for the quick lesson! It really is more involved than I thought. :\'-( I'm not sure why the field can't be (or shouldn't be) converted to numerical but I'm sure you have your reasons. This is a case where a GUI might help A LOT by dynamically showing you what you can and can't use to make your queries/comparisons, or to do some of this expression-writing in the background.
Actually the teaseId, authorId, rating, and ratingPercent are all stored as numbers, but the "is" and "contains" operators expect a regular expression as a parameter, so the fields are converted to text to perform the match. It was only a hobby project for me to find a few teases, so it didn't bother me too much as a developer. The phrases 'a bit engineery' spring to mind once again :lol:

Adding the additional operators for number comparisons is perfectly achievable, it just means that the lexer needs to be extended to support multiple character symbols such as ">=", the infix-to-postfix conversion needs to be aware of which operators pertain to which fields, the argument stream needs to interpret numbers, the TAB hints need to be aware of which operators pertain to which fields, and finally the new operators actually added. In other words, "blah, blah, blah, I'll get around to it eventually" :-D

Indeed, the GUI would certainly be a lot simpler, and when it's ready there's going to be whole load of code that can go in the shredder.

What I'm also going to do is change the "is" and "contains" operators to just compare against plain text and add a new "matches" operator that performs the regular expression search. That way, "is" and "contains" might be a bit less daunting for new users.
User avatar
FrozenWolf
Explorer At Heart
Explorer At Heart
Posts: 326
Joined: Tue Oct 30, 2018 7:50 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch
Dom/me(s): None
Sub/Slave(s): None
Location: UK

Re: [?] MiloDB: Finding Old Teases

Post by FrozenWolf »

Thanks for the valuable feedback so far, I'll have a look into some of the other things that were requested to see what I can do.

Now you can perform queries like the following:
> query rating >= 4.3 and title contains chastity and text matches "chastity.?(cage|belt)"
0.6, 2022-03-13, beta
  • Added: Query verb 'matches' is for regular expression matches
  • Added: 'browse' and 'browseall' commands include thumbnails for each tease
  • Changed: Query fields 'rating', 'authorId', 'teaseId' supports verbs '>', '<', '>=', '<=', '='
  • Changed: Query verbs 'is' and 'contains' are now plain text matches
  • Changed: Query verbs are now appropriate to each field
Future
I had some thoughts on how to compare against the 'date' field. At the moment, that's still treated as text with the 'is', 'contains', and 'matches' verbs, but perhaps it would be more useful to be treated a bit like 'rating' but a bit more advanced than that, for example:
> query date = 2020-01-01    
Date of 2020-01-01

> query date >= 2020-01-01   
All dates on or after 2020-01-01
> query date >= 2020-01      
Equivalent to
date >= 2020-01-01

> query date >= 2020         
Equivalent to
date >= 2020-01-01

> query date > 2020-01-01    
All dates after 2020-01-01

> query date < 2020-01-01    
All dates before 2020-01-01
> query date < 2020-01       
Equivalent to
date < 2020-01-01

> query date < 2020          
Equivalent to
date < 2020-01-01

> query date <= 2020-01-01   
All dates on and before 2020-01-01
I have some difficulty in trying to work out what these might do:
> query date > 2020          
?? Not really sure what this would mean
> query date > 2020-01       
?? Not really sure what this would mean
> query date <= 2020         
?? Not really sure what this would mean
> query date <= 2020-01      
?? Not really sure what this would mean
I could specify that '>' and '<=' always require a full date rather than the shorthand version, or just not support a shorthand date at all for any date comparison. Maybe I'm just over thinking this.

What do you think?
User avatar
Trusfrated
Explorer At Heart
Explorer At Heart
Posts: 450
Joined: Mon Nov 08, 2010 8:41 am
Gender: Male

Re: [?] MiloDB: Finding Old Teases

Post by Trusfrated »

FrozenWolf wrote: Sun Mar 13, 2022 6:51 pm Thanks for the valuable feedback so far, I'll have a look into some of the other things that were requested to see what I can do.

Now you can perform queries like the following:
> query rating >= 4.3 and title contains chastity and text matches "chastity.?(cage|belt)"
0.6, 2022-03-13, beta
  • Added: Query verb 'matches' is for regular expression matches
  • Added: 'browse' and 'browseall' commands include thumbnails for each tease
  • Changed: Query fields 'rating', 'authorId', 'teaseId' supports verbs '>', '<', '>=', '<=', '='
  • Changed: Query verbs 'is' and 'contains' are now plain text matches
  • Changed: Query verbs are now appropriate to each field
The changes are great and seem to be working well for me in my testing thus far. :-D Thank you!

It took me a bit to figure out how to use the NOT operator, but I think I did. :-) Hint: it goes early in the statement. Here's a complicated one I made:

Code: Select all

query title matches mistress|princess and tags contains denial and not text contains cock and rating > 3.0 and rating <= 4.0

I don't know if it would be difficult to add, but for me it might be nice to be able to interchangeably/legally use "tag" or "tags".
Spoiler: show
Saying "tags contains" doesn't sound grammatically correct to me, although it could be if you consider "tags" to be a singular group. An argument could also be made for contain/contains and match/matches, but I think just adding the ability to use "tag" would take care of the other things. (But that's a minor thing, I admit. :-P )
Ready to add improved date comparisons!
FrozenWolf wrote: Sun Mar 13, 2022 6:51 pm Future
I had some thoughts on how to compare against the 'date' field. At the moment, that's still treated as text with the 'is', 'contains', and 'matches' verbs, but perhaps it would be more useful to be treated a bit like 'rating' but a bit more advanced than that, for example:
> query date = 2020-01-01    
Date of 2020-01-01

> query date >= 2020-01-01   
All dates on or after 2020-01-01
> query date >= 2020-01      
Equivalent to
date >= 2020-01-01

> query date >= 2020         
Equivalent to
date >= 2020-01-01

> query date > 2020-01-01    
All dates after 2020-01-01

> query date < 2020-01-01    
All dates before 2020-01-01
> query date < 2020-01       
Equivalent to
date < 2020-01-01

> query date < 2020          
Equivalent to
date < 2020-01-01

> query date <= 2020-01-01   
All dates on and before 2020-01-01
This is great!

FrozenWolf wrote: Sun Mar 13, 2022 6:51 pm I have some difficulty in trying to work out what these might do:
> query date > 2020          
?? Not really sure what this would mean
>12/31/2020
> query date > 2020-01       
?? Not really sure what this would mean
>1/31/2020
> query date <= 2020         
?? Not really sure what this would mean
<=12/31/2020
> query date <= 2020-01      
?? Not really sure what this would mean
<=1/31/2020
I could specify that '>' and '<=' always require a full date rather than the shorthand version, or just not support a shorthand date at all for any date comparison. Maybe I'm just over thinking this.
Above are my suggestions, but I don't think that level of comparison is terribly necessary. I don't see any reason why using a full date would be that much more difficult. Adding the shorthand would just be a "nice to have" type thing. ;-)
ImageImage
Post Reply

Who is online

Users browsing this forum: dsft and 6 guests