• Importing web recipes into Meal-Master

    From Ben Collver@1:124/5016 to All on Sat Mar 2 11:29:19 2024
    2024-03-02 - JSON-LD to MealMaster
    ==================================
    Someone sent me a link to a blog post about MOAR, a gopher accessible
    recipe search that i worked on. Part of this post caught my attention:

    While I was reading I discovered that a lot of modern recipe
    websites include some structured data in the document head in the
    form of JSON-LD (which is JSON with Linked Data). And consequently,
    a lot of modern recipe software can import recipes directly from
    the web if you provide it with a URL for a document that has that
    kind of data.

    Supervegan blog post
    <https://supervegan.neocities.org/posts/mealmaster/>

    Challenge accepted! I resolved to create a semi-automated process to
    import recipes from the web into Meal-Master.

    First, the toolset:

    Curl (FreeDOS) <http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/repositories/ 1.3/net/curl/7_77_0.zip>
    Gawk (DJGPP) <http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/devel/awk/gawk/ gwk500b.zip>
    jq
    <gopher://tilde.pink/9/~bencollver/files/dos/util/jq/jq171.zip>
    jsontomm.awk <gopher://tilde.pink/0/~bencollver/files/dos/app/mealmaster/json2mm/ jsontomm.awk>
    Meal-Master <gopher://tilde.pink/9/~bencollver/files/dos/app/mealmaster/mm806F.exe> Meal-Master Buster <gopher://tilde.pink/9/~bencollver/files/dos/app/mealmaster/bustr20n.zip>

    I unzipped all of the tools and made sure they were in my path.

    Select a recipe to import:

    Tofu Peanut Stir-Fry <https://www.bbc.co.uk/food/recipes/tofu_peanut_stir-fry_62729>

    Download the document:

    C:\>curl --insecure -o stirfry.htm https://www.bbc.co.uk/food/
    recipes/tofu_peanut_stir-fry_62729

    Convert to stirfry.txt:

    C:\>gawk -f jsontomm.awk stirfry.htm stirfry

    This process is SEMI-automated. Correct stirfry.txt as desired.

    Convert to stirfry.mmf

    C:\>mm_bustr
    MealMaster Buster Version 2.0n
    Press <CONTROL-BREAK> to abort this program!
    Volume in drive C is FREEDOS2022
    Volume Serial Number is 6969-6969
    File not found.


    Enter filename to convert: stirfry.txt


    Enter any line you want to appear in each recipe below.
    (such as where the recipes were found, etc.)

    (Hit <RETURN> to leave blank and include no posting info)
    Recipe FROM: https://www.bbc.co.uk/food/recipes/
    tofu_peanut_stir-fry_62729
    Converted Recipe: Tofu Peanut Vegan Stir-Fry

    Unformatted Recipes Converted

    Total of 1 MealMaster Recipes in file STIRFRY.MMF

    Press <RETURN> to continue (or <CONTROL-X> to end program)

    At this point, press Ctrl-X or else Meal-Master Buster will delete
    stirfry.mmf, yanking the tablecloth out from under you.

    MealMaster Recipe Buster [Version 2.0n] (c) 1996-99, Glen G. Hosey
    Report any problems/suggestions to hosey@erols.com

    Load the resulting MMF file into Meal-Master:

    mm

    Meal-Master Splash Screen
    <gopher://tilde.pink/I/~bencollver/log/ 2024-03-02-json-ld-to-mealmaster/mm1.png>

    Press any key to dismiss the splash screen and enter the Main Menu.

    Meal-Master Main Menu
    <gopher://tilde.pink/I/~bencollver/log/ 2024-03-02-json-ld-to-mealmaster/mm2.png>

    Press U to enter Utilities Menu.

    Meal-Master Utilities Menu
    <gopher://tilde.pink/I/~bencollver/log/ 2024-03-02-json-ld-to-mealmaster/mm3.png>

    Press I to open Import Recipe Screen.

    Enter filename and press return, or filepath and F1 for list

    Last File Imported: RECIPE6.MMF

    Import From File:

    Type STIRFRY.MMF and press Enter to open Recipe Import Menu.

    Meal-Master Recipe Import Menu
    <gopher://tilde.pink/I/~bencollver/log/ 2024-03-02-json-ld-to-mealmaster/mm4.png>

    Press S to begin importing recipe.

    Meal-Master Import Recipe Screen
    <gopher://tilde.pink/I/~bencollver/log/ 2024-03-02-json-ld-to-mealmaster/mm5.png>

    The Import Recipe Screen reports that 1 recipe was found and imported.

    Press any key to dismiss Import Recipe Screen and return to the
    Utilities Menu.

    Press X to return to the Main Menu
    Press S to open the Search Menu
    Press T to search by Title
    Type: Tofu Peanut Vegan
    Press Enter

    Meal-Master Search Menu
    <gopher://tilde.pink/I/~bencollver/log/ 2024-03-02-json-ld-to-mealmaster/mm6.png>

    Press S to search with the specified critera.

    Meal-Master Search Results Screen
    <gopher://tilde.pink/I/~bencollver/log/ 2024-03-02-json-ld-to-mealmaster/mm7.png>

    Because there is only one result, it is selected by default.
    Otherwise, one can use the arrow keys to select the desired
    recipe.

    Press E to export the selected recipe
    Press Enter 3 times to accept the defaults

    Meal-Master Recipe Export Screen
    <gopher://tilde.pink/I/~bencollver/log/ 2024-03-02-json-ld-to-mealmaster/mm8.png>

    Press Enter for the 4th time to export TRANSFER.TXT
    Press X to return to the Search Menu
    Press X to return to the Main Menu
    Press Q to quit Meal-Master
    Press Y to confirm that you wish to quit Meal-Master

    TRANSFER.TXT
    <gopher://tilde.pink/0/~bencollver/log/ 2024-03-02-json-ld-to-mealmaster/transfer.txt>

    The file TRANSFER.TXT will be in Meal-Master v8.06 format.
    This can be shared anywhere that accepts plain text messages,
    and imported into any Meal-Master compatible recipe manager.
    --- SBBSecho 3.20-Linux
    * Origin: End Of The Line BBS - endofthelinebbs.com (1:124/5016)
  • From Shawn Highfield@1:18/200 to Ben Collver on Tue Mar 5 06:26:36 2024
    Ben Collver wrote to All <=-

    Challenge accepted! I resolved to create a semi-automated process to import recipes from the web into Meal-Master.

    Similar to what I used to do. Now I copy it into the windows clipboard
    load accuchef, paste into the wizzard. Highlight a few things it asks
    me too and hit import.

    Can export it to MM format and import that way if I wanted but I stopped keeping my MM database up to date a few years ago.

    Only thing I hate about accuchef is the stupid default comic-con font and trying to remember how the hell to change it every fresh install. LOL

    Shawn

    ... Kettle, plug, fridge, milk, coffee. Yawn.
    --- MultiMail/Win v0.52
    * Origin: Outpost BBS * Johnson City, TN (1:18/200)
  • From Ben Collver@1:105/500 to Shawn Highfield on Tue Mar 5 07:59:13 2024
    Re: Re: Importing web recipes into Meal-Master
    By: Shawn Highfield to Ben Collver on Tue Mar 05 2024 06:26 am

    Similar to what I used to do.

    Did you write some code for what you used to do? If so, i am interested
    in seeing it.

    It sounds like you have an easy process using copy/paste into the accuchef wizard.

    I plan to eventually write code to go the other direction too: taking a Meal-Master recipe as input, and writing JSON-LD data as output.

    None of this is practical.. it's just for fun. :-)
    --- SBBSecho 3.14-Win32
    * Origin: The Fool's Quarter, fqbbs.synchro.net (1:105/500)
  • From Shawn Highfield@1:154/700 to Ben Collver on Wed Mar 6 06:16:00 2024
    Ben Collver wrote to Shawn Highfield <=-

    Did you write some code for what you used to do? If so, i am
    interested in seeing it.

    No it was just a whole mess of a batch file using sed grep and
    something else I can't even remember now.

    It sounds like you have an easy process using copy/paste into the
    accuchef wizard.

    So much easier! However I'm using a windows computer not a dos based one
    so my solution doesn't work for everyone.

    None of this is practical.. it's just for fun. :-)

    Exactly!

    Shawn

    ... The English never forgive a man for being clever.
    --- MultiMail/Win v0.52
    * Origin: _thePharcyde telnet://bbs.pharcyde.org (Wisconsin) (1:154/700)
  • From Carol Shenkenberger@1:275/100 to Ben Collver on Thu Mar 7 12:17:32 2024
    Re: Re: Importing web recipes into Meal-Master
    By: Ben Collver to Shawn Highfield on Tue Mar 05 2024 07:59 am

    Re: Re: Importing web recipes into Meal-Master
    By: Shawn Highfield to Ben Collver on Tue Mar 05 2024 06:26 am

    Similar to what I used to do.

    Did you write some code for what you used to do? If so, i am interested
    in seeing it.

    It sounds like you have an easy process using copy/paste into the accuchef wizard.

    I plan to eventually write code to go the other direction too: taking a Meal-Master recipe as input, and writing JSON-LD data as output.

    None of this is practical.. it's just for fun. :-)

    I love the tear line! You don't want to imagine the kludge work to
    operate from sea for 7 years as Z6C for 5 of it (LOL!). What's insane was it worked!

    xxcarol
    --- SBBSecho 2.11-Win32
    * Origin: Shenks Express (1:275/100)
  • From Ben Collver@1:105/500 to Carol Shenkenberger on Fri Mar 8 08:51:04 2024
    Re: Re: Importing web recipes into Meal-Master
    By: Carol Shenkenberger to Ben Collver on Thu Mar 07 2024 12:17 pm

    I remember using the phrase "tear line" to describe perforated paper for a tractor feed printer. What were you referring to when you wrote it?

    I don't want to imagine being responsible to create and maintain 5 years
    of kludge work at sea. I'd love to see it in retrospect, but lacking the institutional knowledge, i would probably need a lot of help before i
    would comprehend it.

    What does Z5C mean?

    An older engineer friend of mine gave me some code to do the fast fourier transform in QBASIC.EXE. I know people who are too proud for QBASIC.EXE.
    I'm inclined to write that it is just a tool and it can get the job done.
    --- SBBSecho 3.14-Win32
    * Origin: The Fool's Quarter, fqbbs.synchro.net (1:105/500)
  • From Carol Shenkenberger@1:275/100 to Ben Collver on Fri Mar 8 13:52:18 2024
    Re: Re: Importing web recipes into Meal-Master
    By: Ben Collver to Carol Shenkenberger on Fri Mar 08 2024 08:51 am

    Re: Re: Importing web recipes into Meal-Master
    By: Carol Shenkenberger to Ben Collver on Thu Mar 07 2024 12:17 pm

    I remember using the phrase "tear line" to describe perforated paper for a tractor feed printer. What were you referring to when you wrote it?

    I don't want to imagine being responsible to create and maintain 5 years
    of kludge work at sea. I'd love to see it in retrospect, but lacking the institutional knowledge, i would probably need a lot of help before i
    would comprehend it.

    What does Z5C mean?

    An older engineer friend of mine gave me some code to do the fast fourier transform in QBASIC.EXE. I know people who are too proud for QBASIC.EXE. I'm inclined to write that it is just a tool and it can get the job done.

    Hi Ben. Tear line is a really *old* BBS term for tag line. Sorry, started my first BBS in 1986 or 87.

    On the BBS at sea, it was wicked batch files that forked to multiple other batchfiles. Grin, write a zone segment for the nodelist in note pad then test on laptop makenl copy the if good, email to Janis who processed it for me.

    Z6C. (Z5 is Africa and was run by Russel Teidt). Z6 is Asia and I ended up running the zone. 'Zone 6 coordinator'. Each geograpic region is in a 'zone'.
    You are in zone 1 (USA/Canada). Mexico came in with South America and because of common language opted to be grouped with them (zone 4).

    Chuckle, don't worry. It's sysop stuff.

    xxcarol
    --- SBBSecho 2.11-Win32
    * Origin: Shenks Express (1:275/100)
  • From Ben Collver@1:105/500 to Carol Shenkenberger on Sat Mar 9 08:33:10 2024
    Re: Re: Importing web recipes into Meal-Master
    By: Carol Shenkenberger to Ben Collver on Fri Mar 08 2024 01:52 pm

    Chuckle, don't worry. It's sysop stuff.

    I feel like i got my hair scruffled by Grace Hopper.

    Thanks! Helps me feel younger.
    --- SBBSecho 3.14-Win32
    * Origin: The Fool's Quarter, fqbbs.synchro.net (1:105/500)
  • From Carol Shenkenberger@1:275/100 to Ben Collver on Sat Mar 9 15:43:40 2024
    Re: Re: Importing web recipes into Meal-Master
    By: Ben Collver to Carol Shenkenberger on Sat Mar 09 2024 08:33 am

    Re: Re: Importing web recipes into Meal-Master
    By: Carol Shenkenberger to Ben Collver on Fri Mar 08 2024 01:52 pm

    Chuckle, don't worry. It's sysop stuff.

    I feel like i got my hair scruffled by Grace Hopper.

    Thanks! Helps me feel younger.

    Grin! I love Gracie!

    xxcarol
    --- SBBSecho 2.11-Win32
    * Origin: Shenks Express (1:275/100)
  • From Mike Powell@1:2320/105 to BEN COLLVER on Sun Mar 10 09:26:00 2024
    Chuckle, don't worry. It's sysop stuff.

    I feel like i got my hair scruffled by Grace Hopper.

    As a COBOL developer, I can say there are far worse things you could feel.
    ;)

    Mike

    * SLMR 2.1a * So far, so good, so what?
    --- SBBSecho 3.20-Linux
    * Origin: capitolcityonline.net * Telnet/SSH:2022/HTTP (1:2320/105)
  • From Carol Shenkenberger@1:275/100 to Mike Powell on Sun Mar 10 14:13:59 2024
    Re: Re: Importing web recipes
    By: Mike Powell to BEN COLLVER on Sun Mar 10 2024 09:26 am

    Chuckle, don't worry. It's sysop stuff.

    I feel like i got my hair scruffled by Grace Hopper.

    As a COBOL developer, I can say there are far worse things you could feel.
    ;)

    Mike

    * SLMR 2.1a * So far, so good, so what?

    What projects do you work with? I was an Oracle SQL programmer for 10 years working reports for cutomers in the Navy manpower and manning needs.

    xxcarol
    --- SBBSecho 2.11-Win32
    * Origin: Shenks Express (1:275/100)
    Pkt message 6 ออ COOKING 20/1042 5058/104 90/1
  • From Mike Powell@1:2320/105 to CAROL SHENKENBERGER on Mon Mar 11 08:20:00 2024
    I feel like i got my hair scruffled by Grace Hopper.

    As a COBOL developer, I can say there are far worse things you could feel.

    What projects do you work with? I was an Oracle SQL programmer for 10 years working reports for cutomers in the Navy manpower and manning needs.

    I worked on different gubbyment projects over the years, usually batch and usually IMS or VSAM. I did a little with DB2 SQL but not much. Most of it involved transaction processing and reporting on a mainframe.

    Mike

    * SLMR 2.1a * Something Amiss? Hi, I'm Something Amister.
    --- SBBSecho 3.20-Linux
    * Origin: capitolcityonline.net * Telnet/SSH:2022/HTTP (1:2320/105)
  • From Carol Shenkenberger@1:275/100 to Mike Powell on Mon Mar 11 15:32:29 2024
    Re: Re: Importing web recipes
    By: Mike Powell to CAROL SHENKENBERGER on Mon Mar 11 2024 08:20 am

    I feel like i got my hair scruffled by Grace Hopper.

    As a COBOL developer, I can say there are far worse things you could fe

    What projects do you work with? I was an Oracle SQL programmer for 10 yea working reports for cutomers in the Navy manpower and manning needs.

    I worked on different gubbyment projects over the years, usually batch and usually IMS or VSAM. I did a little with DB2 SQL but not much. Most of it involved transaction processing and reporting on a mainframe.

    Mike

    * SLMR 2.1a * Something Amiss? Hi, I'm Something Amister.

    Cool stuff! I started in 1983 with mainframes.

    xxcarol
    --- SBBSecho 2.11-Win32
    * Origin: Shenks Express (1:275/100)