Author Topic: attract-console --filter help  (Read 1616 times)

mondaiji

  • Full Member
  • ***
  • Posts: 46
    • View Profile
attract-console --filter help
« on: June 07, 2021, 01:17:02 AM »
Hi,
Can someone please let me know the syntax used to create rules on the CLI using attract-console --filter?

I've tried a few variations without any luck.
Can you use multiple --filter commands?

Code: [Select]
  -F, --filter <rule>
     Apply the specified filter rule when creating romlist

Example..
Code: [Select]
attract-console --build-romlist mame --full --filter Category equals Fighter / Versus --output Figters.txt

akafox

  • Hero Member
  • *****
  • Posts: 982
    • View Profile
Re: attract-console --filter help
« Reply #1 on: June 07, 2021, 05:30:37 AM »
Can i ask out of curiosity why you want to use the terminal CLI instead of the AM displays menu?

and yes you can set up multiple filters for each system/console

1. Start Attract Mode
2. Press the TAB key (brings you to the AM setup menu
3. Choose Displays
4. Pick your system
5. Choose add filter

Note: If you want to know EXACTLY what you can filter and how you can open a old or new generated list in a plain text editor (or  spreadsheet program for a cleaner look). Just look at the columns and the information in them and then close it without fear. Do not make any changes to the list unless you know what you are doing!
« Last Edit: June 07, 2021, 05:39:54 AM by akafox »
People want life easy..then complain about it

mondaiji

  • Full Member
  • ***
  • Posts: 46
    • View Profile
Re: attract-console --filter help
« Reply #2 on: June 07, 2021, 05:26:50 PM »
Hi,
Thanks for the input. I understand the process of using filters within the AM UI. The question is specifically around using the --filters command line argument. I will be using additional CLI arguments such as exceptions and scraping as well once I get this working.

Why, it is for automating a few tasks. Understand something similar can be created with filters. I typically just edit attract.cfg rather than using the UI. It is a lot faster for me that way.

akafox

  • Hero Member
  • *****
  • Posts: 982
    • View Profile
Re: attract-console --filter help
« Reply #3 on: June 07, 2021, 09:39:36 PM »
Example..
Code: [Select]
attract-console --build-romlist mame --full --filter Category equals Fighter / Versus --output Figters.txt

Your format is incorrect. You have spaces..the CLI is not going to accept that. It should be:
Code: [Select]
attract-console --build-romlist mame --full --filter "Category equals Fighter / Versus" --output Figters.txt
and you can omit the .txt on the output file..as AM will add the .txt extention automatically (or should anyway). Omitting it kept me from getting list.txt.txt when I omitted the .txt (thus --output Figters not --output Figters.txt) your use may very.

From there I generated a list using AM itself. Then in the attract.cfg I edited it to use the name of my new list....or renamed my list to 'mame.txt' and AM used the new list as it should.
People want life easy..then complain about it

mondaiji

  • Full Member
  • ***
  • Posts: 46
    • View Profile
Re: attract-console --filter help
« Reply #4 on: June 08, 2021, 02:54:58 AM »
Thanks for that.  ;)

I've gone down a rabbit hole. In short I created a attractmode ROM list then used excel to get rid of the junk by using filters. I then saved the list of roms and only copied certain roms based on category/displaycount/status to my HDD. I verified/fixed the roms to work with my version of MAME and here I am.

I've saved 45GB worth of space. Now looking back I'm thinking if I should have just chewed up the HDD space and created global filters for MAME.  :-X

My madness is documented below.

https://github.com/jteddy/AttractMode/blob/master/README.md

mondaiji

  • Full Member
  • ***
  • Posts: 46
    • View Profile
Re: attract-console --filter help
« Reply #5 on: June 08, 2021, 04:35:52 AM »
I think the inverse method is better.
Come up with a list of ROMs that you want to delete. There were to many files from using a merged set that were needed for roms that weren't carried over using this method.

akafox

  • Hero Member
  • *****
  • Posts: 982
    • View Profile
Re: attract-console --filter help
« Reply #6 on: June 08, 2021, 02:42:37 PM »
Thanks for that.  ;)

I've gone down a rabbit hole. In short I created a attractmode ROM list then used excel to get rid of the junk by using filters. I then saved the list of roms and only copied certain roms based on category/displaycount/status to my HDD. I verified/fixed the roms to work with my version of MAME and here I am.

Excel- A spreadsheet! I thought i was the only crazy person the did that  :P  I have nothing else to teach you my studunt my you game in peace and your chicken easy to stea- err i mean find  :P

I've saved 45GB worth of space. Now looking back I'm thinking if I should have just chewed up the HDD space and created global filters for MAME.  :-X

I know I do the same thing..it's work but worth it....smaller hard drives are easy to find...so whay not...nto to mention the less stuff on it the faster it is..to a point. I am just glad i am not cray all by myself xD

I put most of a mame set on a 40GB yes 40 GB hard drive. Fun fact: the first full gigabyte hard drive was made in 1985. It weighed 530 pounds and cost $40,000! xD
People want life easy..then complain about it