xdgkit/
categories.rs

1/*!
2# Categories
3
4The rust enum-ification of the XDG Desktop Entry Categories specifications.
5
6This comes complete with `Categories::default()` as well as implementing `Display`
7`from_string()` is also implemented
8
9*/
10
11// categories.rs
12// Rusified in 2021 Copyright Israel Dahl. All rights reserved.
13// 
14//        /VVVV\
15//      /V      V\
16//    /V          V\
17//   /      0 0     \
18//   \|\|\</\/\>/|/|/
19//        \_/\_/
20// 
21// This program is free software; you can redistribute it and/or modify
22// it under the terms of the GNU General Public License version 2 as
23// published by the Free Software Foundation.
24//
25// This program is distributed in the hope that it will be useful,
26// but WITHOUT ANY WARRANTY; without even the implied warranty of
27// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28// GNU General Public License for more details.
29// 
30// You should have received a copy of the GNU General Public License
31// along with this program; if not, write to the Free Software
32// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
33
34use std::fmt;
35use serde::{Deserialize, Serialize};
36#[allow(dead_code, clippy::upper_case_acronyms)]
37#[derive(Debug, Clone, Copy, Deserialize, Serialize, PartialEq, Eq)]
38pub enum Categories {
39    /// Application for presenting, creating, or processing multimedia (audio/video)
40    AudioVideo,
41    /// An audio application **Desktop entry must include AudioVideo as well**
42    Audio,
43    /// A video application **Desktop entry must include AudioVideo as well
44    Video,
45    /// An application for development
46    Development,
47    /// Educational software
48    Education,
49    /// A game
50    Game,
51    /// Application for viewing, creating, or processing graphics
52    Graphics,
53    /// Network application such as a web browser
54    Network,
55    /// An office type application
56    Office,
57    /// Scientific software
58    Science,
59    /// Settings applications **Entries may appear in a separate menu or as part of a "Control Center"**
60    Settings,
61    /// System application, "System Tools" such as say a log viewer or network monitor
62    System,
63    /// Small utility application, "Accessories"
64    Utility,
65
66// ADDITIONAL CATEGORIES ---------------------------------------------------------------------------------------------------------------------
67    /// A tool to build applications `Development`
68    Building,
69    /// A tool to debug applications `Development`
70    Debugger,
71    /// IDE application Development
72    IDE,
73    /// A GUI designer application `Development`
74    GUIDesigner,
75    /// A profiling tool `Development`
76    Profiling,
77    /// Applications like cvs or subversion `Development` 
78    RevisionControl,
79    /// A translation tool `Development`
80    Translation,
81    /// Calendar application `Office`
82    Calendar,
83    /// E.g. an address book `Office`
84    ContactManagement,
85    /// Application to manage a database `Office` or `Development` or `AudioVideo`
86    Database,
87    /// A dictionary `Office` or `TextTools`
88    Dictionary,
89    /// Chart application `Office`
90    Chart,
91    /// Email application `Office` or `Network`
92    Email,
93    /// Application to manage your finance `Office`
94    Finance,
95    /// A flowchart application `Office`
96    FlowChart,
97    /// Tool to manage your PDA `Office`
98    PDA,
99    /// Project management application `Office` or `Development`
100    ProjectManagement,
101    /// Presentation software `Office`
102    Presentation,
103    /// A spreadsheet `Office`
104    Spreadsheet,
105    /// A word processor `Office`
106    WordProcessor,
107    /// 2D based graphical application `Graphics`
108    Graphics2D,
109    /// Application for viewing, creating, or processing vector graphics `Graphics;2DGraphics`
110    VectorGraphics,
111    /// Application for viewing, creating, or processing raster (bitmap) graphics `Graphics;2DGraphics`
112    RasterGraphics,
113    /// Application for viewing, creating, or processing 3-D graphics `Graphics`
114    Graphics3D,
115    /// Tool to scan a file/text `Graphics`
116    Scanning,
117    /// Optical character recognition application `Graphics;Scanning`
118    OCR,
119    /// Camera tools, etc. `Graphics` or `Office`
120    Photography,
121    /// Desktop Publishing applications and Color Management tools `Graphics` or `Office`
122    Publishing,
123    /// Tool to view e.g. a graphic or pdf file `Graphics` or `Office`
124    Viewer,
125    /// A text tool utility `Utility`
126    TextTools,
127    /// Configuration tool for the GUI `Settings`
128    DesktopSettings,
129    /// A tool to manage hardware components, like sound cards, video cards or printers `Settings`
130    HardwareSettings,
131    /// A tool to manage printers `HardwareSettings;Settings`
132    Printing,
133    /// A package manager application `Settings`
134    PackageManager,
135    /// A dial-up program `Network`
136    Dialup,
137    /// An instant messaging client `Network`
138    InstantMessaging,
139    /// A chat client `Network`
140    Chat,
141    /// An IRC client `Network`
142    IRCClient,
143    /// RSS, podcast and other subscription based contents `Network`
144    Feed,
145    /// Tools like FTP or P2P programs `Network`
146    FileTransfer,
147    /// HAM radio software `Network` or `Audio`
148    HamRadio,
149    /// A news reader or a news ticker `Network`
150    News,
151    /// A P2P program `Network`
152    P2P,
153    /// A tool to remotely manage your PC `Network`
154    RemoteAccess,
155    /// Telephony via PC `Network`
156    Telephony,
157    /// Telephony tools, to dial a number, manage PBX, ... `Utility`
158    TelephonyTools,
159    /// Video Conference software `Network`
160    VideoConference,
161    /// A web browser `Network`
162    WebBrowser,
163    /// A tool for web developers `Network` or `Development`
164    WebDevelopment,
165    /// An app related to MIDI `AudioVideo;Audio` 
166    Midi,
167    /// Just a mixer `AudioVideo;Audio`
168    Mixer,
169    /// A sequencer `AudioVideo;Audio`
170    Sequencer,
171    /// A tuner `AudioVideo;Audio`
172    Tuner,
173    /// A TV application `AudioVideo;Video`
174    TV,
175    /// Application to edit audio/video files `Audio` or `Video` or`Audio`
176    AudioVideoEditing,
177    /// Application to play audio/video files `Audio` or `Video` or`AudioVideo`
178    VideoPlayer,
179    /// Application to record audio/video files `Audio` or `Video` or `AudioVideo`
180    Recorder,
181    /// Application to burn a disc `AudioVideo`
182    DiscBurning,
183    /// An action game `Game`
184    ActionGame,
185    /// Adventure style game `Game`
186    AdventureGame,
187    /// Arcade style game `Game`
188    ArcadeGame,
189    /// A board game `Game`
190    BoardGame,
191    /// Falling blocks game `Game`
192    BlocksGame,
193    /// A card game `Game`
194    CardGame,
195    /// A game for kids `Game`
196    KidsGame,
197    /// Logic games like puzzles, etc `Game` 
198    LogicGame,
199    /// A role playing game `Game`
200    RolePlaying,
201    /// A shooter game `Game`
202    Shooter,
203    /// A simulation game `Game`
204    Simulation,
205    /// A sports game `Game`
206    SportsGame,
207    /// A strategy game `Game`
208    StrategyGame,
209    /// Software to teach arts `Education` or `Science`` 
210    Art,
211    ///``Education` or `Science``
212    Construction,
213    /// Musical software `AudioVideo` or `Education`
214    Music,
215    /// Software to learn foreign languages `Education` or `Science`
216    Languages,
217    /// Artificial Intelligence software `Education` or `Science`
218    ArtificialIntelligence,
219    /// Astronomy software `Education` or `Science`
220    Astronomy,
221    /// Biology software `Education` or `Science`
222    Biology,
223    /// Chemistry software `Education` or `Science`
224    Chemistry,
225    /// ComputerSience software `Education` or `Science`
226    ComputerScience,
227    /// Data visualization software `Education` or `Science`
228    DataVisualization,
229    /// Economy software `Education` or `Science`
230    Economy,
231    /// Electricity software `Education` or `Science`
232    Electricity,
233    /// Geography software `Education` or `Science`
234    Geography,
235    /// Geology software `Education` or `Science`
236    Geology,
237    /// Geoscience software, GIS `Education` or `Science`
238    Geoscience,
239    /// History software `Education` or `Science`
240    History,
241    /// Software for philosophy, psychology and other humanities `Education` or `Science`
242    Humanities,
243    /// Image Processing software `Education` or `Science`
244    ImageProcessing,
245    /// Literature software `Education` or `Science`
246    Literature,
247    /// Sofware for viewing maps, navigation, mapping, GPS `Education` or `Science` or `Utility` 
248    Maps,
249    /// Math software `Education` or `Science` 
250    Math,
251    /// Numerical analysis software `Education;Math` or `Science;Math` 
252    NumericalAnalysis,
253    /// Medical software `Education` or `Science` 
254    MedicalSoftware,
255    /// Physics software `Education` or `Science`
256    Physics,
257    /// Robotics software `Education` or `Science`
258    Robotics,
259    /// Religious and spiritual software, theology `Education` or `Science` or `Utility`
260    Spirituality,
261    /// Sports software `Education` or `Science`
262    Sports,
263    /// Parallel computing software `Education;ComputerScience` or `Science;ComputerScience`
264    ParallelComputing,
265    /// A simple amusement
266    Amusement,
267    /// A tool to archive/backup data `Utility`
268    Archiving,
269    /// A tool to manage compressed data/archives `Utility;Archiving`
270    Compression,
271    /// Electronics software, e.g. a circuit designer
272    Electronics,
273    /// Emulator of another platform, such as a DOS emulator `System` or `Game`
274    Emulator,
275    /// Engineering software, e.g. CAD programs
276    Engineering,
277    /// A file tool utility `Utility` or `System`
278    FileTools,
279    /// A file manager `System;FileTools`
280    FileManager,
281    /// A terminal emulator application `System`
282    TerminalEmulator,
283    /// A file system tool `System`
284    Filesystem,
285    /// Monitor application/applet that monitors some resource or activity `System` or `Network`
286    Monitor,
287    /// A security tool `Settings` or `System`
288    Security,
289    /// Accessibility `Settings` or `Utility`
290    Accessibility,
291    /// A calculator `Utility`
292    Calculator,
293    /// A clock application/applet `Utility`
294    Clock,
295    /// A text editor `Utility`
296    TextEditor,
297    /// Help or documentation
298    Documentation,
299    /// Application handles adult or explicit material
300    Adult,
301    /// Important application, core to the desktop such as a file manager or a help browser
302    Core,
303    /// Application based on KDE libraries `QT`
304    KDE,
305    /// Application based on GNOME libraries `GTK`
306    GNOME,
307    /// Application based on XFCE libraries `GTK`
308    XFCE,
309    /// Application based on GTK+ libraries
310    GTK,
311    /// Application based on Qt libraries
312    Qt,
313    /// Application based on Motif libraries
314    Motif,
315    /// Application based on Java GUI libraries, such as AWT or Swing
316    Java,
317    /// Application that only works inside a terminal (text-based or command line application)
318    ConsoleOnly,
319    /// This is for random people making whatever they want
320    None,
321}
322impl fmt::Display for Categories {
323    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
324        let v:String = match *self {
325            Categories::AudioVideo => "AudioVideo".to_string(),
326            Categories::Audio => "Audio".to_string(),
327            Categories::Video => "Video".to_string(),
328            Categories::Development => "Development".to_string(),
329            Categories::Education => "Education".to_string(),
330            Categories::Game => "Game".to_string(),
331            Categories::Graphics => "Graphics".to_string(),
332            Categories::Network => "Network".to_string(),
333            Categories::Office => "Office".to_string(),
334            Categories::Science => "Science".to_string(),
335            Categories::Settings => "Settings".to_string(),
336            Categories::System => "System".to_string(),
337            Categories::Utility => "Utility".to_string(),
338// ADDITIONAL CATEGORIES ---------------------------------------------------------------------------------------------------------------------
339            Categories::Building => "Building".to_string(),
340            Categories::Debugger => "Debugger".to_string(),
341            Categories::IDE => "IDE".to_string(),
342            Categories::GUIDesigner => "GUIDesigner".to_string(),
343            Categories::Profiling => "Profiling".to_string(),
344            Categories::RevisionControl => "RevisionControl".to_string(),
345            Categories::Translation => "Translation".to_string(),
346            Categories::Calendar => "Calendar".to_string(),
347            Categories::ContactManagement => "ContactManagement".to_string(),
348            Categories::Database => "Database".to_string(),
349            Categories::Dictionary => "Dictionary".to_string(),
350            Categories::Chart => "Chart".to_string(),
351            Categories::Email => "Email".to_string(),
352            Categories::Finance => "Finance".to_string(),
353            Categories::FlowChart => "FlowChart".to_string(),
354            Categories::PDA => "PDA".to_string(),
355            Categories::ProjectManagement => "ProjectManagement".to_string(),
356            Categories::Presentation => "Presentation".to_string(),
357            Categories::Spreadsheet => "Spreadsheet".to_string(),
358            Categories::WordProcessor => "WordProcessor".to_string(),
359            Categories::Graphics2D => "2DGraphics".to_string(),
360            Categories::VectorGraphics => "VectorGraphics".to_string(),
361            Categories::RasterGraphics => "RasterGraphics".to_string(),
362            Categories::Graphics3D => "3DGraphics".to_string(),
363            Categories::Scanning => "Scanning".to_string(),
364            Categories::OCR => "OCR".to_string(),
365            Categories::Photography => "Photography".to_string(),
366            Categories::Publishing => "Publishing".to_string(),
367            Categories::Viewer => "Viewer".to_string(),
368            Categories::TextTools => "TextTools".to_string(),
369            Categories::DesktopSettings => "DesktopSettings".to_string(),
370            Categories::HardwareSettings => "HardwareSettings".to_string(),
371            Categories::Printing => "Printing".to_string(),
372            Categories::PackageManager => "PackageManager".to_string(),
373            Categories::Dialup => "Dialup".to_string(),
374            Categories::InstantMessaging => "InstantMessaging".to_string(),
375            Categories::Chat => "Chat".to_string(),
376            Categories::IRCClient => "IRCClient".to_string(),
377            Categories::Feed => "Feed".to_string(),
378            Categories::FileTransfer => "FileTransfer".to_string(),
379            Categories::HamRadio => "HamRadio".to_string(),
380            Categories::News => "News".to_string(),
381            Categories::P2P => "P2P".to_string(),
382            Categories::RemoteAccess => "RemoteAccess".to_string(),
383            Categories::Telephony => "Telephony".to_string(),
384            Categories::TelephonyTools => "TelephonyTools".to_string(),
385            Categories::VideoConference => "VideoConference".to_string(),
386            Categories::WebBrowser => "WebBrowser".to_string(),
387            Categories::WebDevelopment => "WebDevelopment".to_string(),
388            Categories::Midi => "Midi".to_string(),
389            Categories::Mixer => "Mixer".to_string(),
390            Categories::Sequencer => "Sequencer".to_string(),
391            Categories::Tuner => "Tuner".to_string(),
392            Categories::TV => "TV".to_string(),
393            Categories::AudioVideoEditing => "AudioVideoEditing".to_string(),
394            Categories::VideoPlayer => "VideoPlayer".to_string(),
395            Categories::Recorder => "Recorder".to_string(),
396            Categories::DiscBurning => "DiscBurning".to_string(),
397            Categories::ActionGame => "ActionGame".to_string(),
398            Categories::AdventureGame => "AdventureGame".to_string(),
399            Categories::ArcadeGame => "ArcadeGame".to_string(),
400            Categories::BoardGame => "BoardGame".to_string(),
401            Categories::BlocksGame => "BlocksGame".to_string(),
402            Categories::CardGame => "CardGame".to_string(),
403            Categories::KidsGame => "KidsGame".to_string(),
404            Categories::LogicGame => "LogicGame".to_string(),
405            Categories::RolePlaying => "RolePlaying".to_string(),
406            Categories::Shooter => "Shooter".to_string(),
407            Categories::Simulation => "Simulation".to_string(),
408            Categories::SportsGame => "SportsGame".to_string(),
409            Categories::StrategyGame => "StrategyGame".to_string(),
410            Categories::Art => "Art".to_string(),
411            Categories::Construction => "Construction".to_string(),
412            Categories::Music => "Music".to_string(),
413            Categories::Languages => "Languages".to_string(),
414            Categories::ArtificialIntelligence => "ArtificialIntelligence".to_string(),
415            Categories::Astronomy => "Astronomy".to_string(),
416            Categories::Biology => "Biology".to_string(),
417            Categories::Chemistry => "Chemistry".to_string(),
418            Categories::ComputerScience => "ComputerScience".to_string(),
419            Categories::DataVisualization => "DataVisualization".to_string(),
420            Categories::Economy => "Economy".to_string(),
421            Categories::Electricity => "Electricity".to_string(),
422            Categories::Geography => "Geography".to_string(),
423            Categories::Geology => "Geology".to_string(),
424            Categories::Geoscience => "Geoscience".to_string(),
425            Categories::History => "History".to_string(),
426            Categories::Humanities => "Humanities".to_string(),
427            Categories::ImageProcessing => "ImageProcessing".to_string(),
428            Categories::Literature => "Literature".to_string(),
429            Categories::Maps => "Maps".to_string(),
430            Categories::Math => "Math".to_string(),
431            Categories::NumericalAnalysis => "NumericalAnalysis".to_string(),
432            Categories::MedicalSoftware => "MedicalSoftware".to_string(),
433            Categories::Physics => "Physics".to_string(),
434            Categories::Robotics => "Robotics".to_string(),
435            Categories::Spirituality => "Spirituality".to_string(),
436            Categories::Sports => "Sports".to_string(),
437            Categories::ParallelComputing => "ParallelComputing".to_string(),
438            Categories::Amusement => "Amusement".to_string(),
439            Categories::Archiving => "Archiving".to_string(),
440            Categories::Compression => "Compression".to_string(),
441            Categories::Electronics => "Electronics".to_string(),
442            Categories::Emulator => "Emulator".to_string(),
443            Categories::Engineering => "Engineering".to_string(),
444            Categories::FileTools => "FileTools".to_string(),
445            Categories::FileManager => "FileManager".to_string(),
446            Categories::TerminalEmulator => "TerminalEmulator".to_string(),
447            Categories::Filesystem => "Filesystem".to_string(),
448            Categories::Monitor => "Monitor".to_string(),
449            Categories::Security => "Security".to_string(),
450            Categories::Accessibility => "Accessibility".to_string(),
451            Categories::Calculator => "Calculator".to_string(),
452            Categories::Clock => "Clock".to_string(),
453            Categories::TextEditor => "TextEditor".to_string(),
454            Categories::Documentation => "Documentation".to_string(),
455            Categories::Adult => "Adult".to_string(),
456            Categories::Core => "Core".to_string(),
457            Categories::KDE => "KDE".to_string(),
458            Categories::GNOME => "GNOME".to_string(),
459            Categories::XFCE => "XFCE".to_string(),
460            Categories::GTK => "GTK".to_string(),
461            Categories::Qt => "Qt".to_string(),
462            Categories::Motif => "Motif".to_string(),
463            Categories::Java => "Java".to_string(),
464            Categories::ConsoleOnly => "ConsoleOnly".to_string(),
465            Categories::None => "None".to_string(),
466        };
467        write!(f, "{:?}", v)
468    }
469}
470#[allow(dead_code, clippy::if_same_then_else)]
471
472impl Categories {
473    /// This function returns a `Categories` based on a matching string
474    pub fn from_string(item:String) ->  Categories {
475        if item == "AudioVideo" {
476            Categories::AudioVideo
477        } else if item == "Audio" {
478            Categories::Audio
479        } else if item == "Video" {
480            Categories::Video
481        } else if item == "Development" {
482            Categories::Development
483        } else if item == "Education" {
484            Categories::Education
485        } else if item == "Game" {
486            Categories::Game
487        } else if item == "Graphics" {
488            Categories::Graphics
489        } else if item == "Network" {
490            Categories::Network
491        } else if item == "Office" {
492            Categories::Office
493        } else if item == "Science" {
494            Categories::Science
495        } else if item == "Settings" {
496            Categories::Settings
497        } else if item == "System" {
498            Categories::System
499        } else if item == "Utility" {
500            Categories::Utility
501// ADDITIONAL CATEGORIES ---------------------------------------------------------------------------------------------------------------------
502
503        } else if item == "Building" {
504            Categories::Building
505        } else if item == "Debugger" {
506            Categories::Debugger
507        } else if item == "IDE" {
508            Categories::IDE
509        } else if item == "GUIDesigner" {
510            Categories::GUIDesigner
511        } else if item == "Profiling" {
512            Categories::Profiling
513        } else if item == "RevisionControl" {
514            Categories::RevisionControl
515        } else if item == "Translation" {
516            Categories::Translation
517        } else if item == "Calendar" {
518            Categories::Calendar
519        } else if item == "ContactManagement" {
520            Categories::ContactManagement
521        } else if item == "Database" {
522            Categories::Database
523        } else if item == "Dictionary" {
524            Categories::Dictionary
525        } else if item == "Chart" {
526            Categories::Chart
527        } else if item == "Email" {
528            Categories::Email
529        } else if item == "Finance" {
530            Categories::Finance
531        } else if item == "FlowChart" {
532            Categories::FlowChart
533        } else if item == "PDA" {
534            Categories::PDA
535        } else if item == "ProjectManagement" {
536            Categories::ProjectManagement
537        } else if item == "Presentation" {
538            Categories::Presentation
539        } else if item == "Spreadsheet" {
540            Categories::Spreadsheet
541        } else if item == "WordProcessor" {
542            Categories::WordProcessor
543        } else if item == "Graphics2D" {
544            Categories::Graphics2D
545        } else if item == "2DGraphics" {
546            Categories::Graphics2D
547        } else if item == "VectorGraphics" {
548            Categories::VectorGraphics
549        } else if item == "RasterGraphics" {
550            Categories::RasterGraphics
551        } else if item == "Graphics3D" {
552            Categories::Graphics3D
553        } else if item == "3DGraphics" {
554            Categories::Graphics3D
555        } else if item == "Scanning" {
556            Categories::Scanning
557        } else if item == "OCR" {
558            Categories::OCR
559        } else if item == "Photography" {
560            Categories::Photography
561        } else if item == "Publishing" {
562            Categories::Publishing
563        } else if item == "Viewer" {
564            Categories::Viewer
565        } else if item == "TextTools" {
566            Categories::TextTools
567        } else if item == "DesktopSettings" {
568            Categories::DesktopSettings
569        } else if item == "HardwareSettings" {
570            Categories::HardwareSettings
571        } else if item == "Printing" {
572            Categories::Printing
573        } else if item == "PackageManager" {
574            Categories::PackageManager
575        } else if item == "Dialup" {
576            Categories::Dialup
577        } else if item == "InstantMessaging" {
578            Categories::InstantMessaging
579        } else if item == "Chat" {
580            Categories::Chat
581        } else if item == "IRCClient" {
582            Categories::IRCClient
583        } else if item == "Feed" {
584            Categories::Feed
585        } else if item == "FileTransfer" {
586            Categories::FileTransfer
587        } else if item == "HamRadio" {
588            Categories::HamRadio
589        } else if item == "News" {
590            Categories::News
591        } else if item == "P2P" {
592            Categories::P2P
593        } else if item == "RemoteAccess" {
594            Categories::RemoteAccess
595        } else if item == "Telephony" {
596            Categories::Telephony
597        } else if item == "TelephonyTools" {
598            Categories::TelephonyTools
599        } else if item == "VideoConference" {
600            Categories::VideoConference
601        } else if item == "WebBrowser" {
602            Categories::WebBrowser
603        } else if item == "WebDevelopment" {
604            Categories::WebDevelopment
605        } else if item == "Midi" {
606            Categories::Midi
607        } else if item == "Mixer" {
608            Categories::Mixer
609        } else if item == "Sequencer" {
610            Categories::Sequencer
611        } else if item == "Tuner" {
612            Categories::Tuner
613        } else if item == "TV" {
614            Categories::TV
615        } else if item == "AudioVideoEditing" {
616            Categories::AudioVideoEditing
617        } else if item == "VideoPlayer" {
618            Categories::VideoPlayer
619        } else if item == "Recorder" {
620            Categories::Recorder
621        } else if item == "DiscBurning" {
622            Categories::DiscBurning
623        } else if item == "ActionGame" {
624            Categories::ActionGame
625        } else if item == "AdventureGame" {
626            Categories::AdventureGame
627        } else if item == "ArcadeGame" {
628            Categories::ArcadeGame
629        } else if item == "BoardGame" {
630            Categories::BoardGame
631        } else if item == "BlocksGame" {
632            Categories::BlocksGame
633        } else if item == "CardGame" {
634            Categories::CardGame
635        } else if item == "KidsGame" {
636            Categories::KidsGame
637        } else if item == "LogicGame" {
638            Categories::LogicGame
639        } else if item == "RolePlaying" {
640            Categories::RolePlaying
641        } else if item == "Shooter" {
642            Categories::Shooter
643        } else if item == "Simulation" {
644            Categories::Simulation
645        } else if item == "SportsGame" {
646            Categories::SportsGame
647        } else if item == "StrategyGame" {
648            Categories::StrategyGame
649        } else if item == "Art" {
650            Categories::Art
651        } else if item == "Construction" {
652            Categories::Construction
653        } else if item == "Music" {
654            Categories::Music
655        } else if item == "Languages" {
656            Categories::Languages
657        } else if item == "ArtificialIntelligence" {
658            Categories::ArtificialIntelligence
659        } else if item == "Astronomy" {
660            Categories::Astronomy
661        } else if item == "Biology" {
662            Categories::Biology
663        } else if item == "Chemistry" {
664            Categories::Chemistry
665        } else if item == "ComputerScience" {
666            Categories::ComputerScience
667        } else if item == "DataVisualization" {
668            Categories::DataVisualization
669        } else if item == "Economy" {
670            Categories::Economy
671        } else if item == "Electricity" {
672            Categories::Electricity
673        } else if item == "Geography" {
674            Categories::Geography
675        } else if item == "Geology" {
676            Categories::Geology
677        } else if item == "Geoscience" {
678            Categories::Geoscience
679        } else if item == "History" {
680            Categories::History
681        } else if item == "Humanities" {
682            Categories::Humanities
683        } else if item == "ImageProcessing" {
684            Categories::ImageProcessing
685        } else if item == "Literature" {
686            Categories::Literature
687        } else if item == "Maps" {
688            Categories::Maps
689        } else if item == "Math" {
690            Categories::Math
691        } else if item == "NumericalAnalysis" {
692            Categories::NumericalAnalysis
693        } else if item == "MedicalSoftware" {
694            Categories::MedicalSoftware
695        } else if item == "Physics" {
696            Categories::Physics
697        } else if item == "Robotics" {
698            Categories::Robotics
699        } else if item == "Spirituality" {
700            Categories::Spirituality
701        } else if item == "Sports" {
702            Categories::Sports
703        } else if item == "ParallelComputing" {
704            Categories::ParallelComputing
705        } else if item == "Amusement" {
706            Categories::Amusement
707        } else if item == "Archiving" {
708            Categories::Archiving
709        } else if item == "Compression" {
710            Categories::Compression
711        } else if item == "Electronics" {
712            Categories::Electronics
713        } else if item == "Emulator" {
714            Categories::Emulator
715        } else if item == "Engineering" {
716            Categories::Engineering
717        } else if item == "FileTools" {
718            Categories::FileTools
719        } else if item == "FileManager" {
720            Categories::FileManager
721        } else if item == "TerminalEmulator" {
722            Categories::TerminalEmulator
723        } else if item == "Filesystem" {
724            Categories::Filesystem
725        } else if item == "Monitor" {
726            Categories::Monitor
727        } else if item == "Security" {
728            Categories::Security
729        } else if item == "Accessibility" {
730            Categories::Accessibility
731        } else if item == "Calculator" {
732            Categories::Calculator
733        } else if item == "Clock" {
734            Categories::Clock
735        } else if item == "TextEditor" {
736            Categories::TextEditor
737        } else if item == "Documentation" {
738            Categories::Documentation
739        } else if item == "Adult" {
740            Categories::Adult
741        } else if item == "Core" {
742            Categories::Core
743        } else if item == "KDE" {
744            Categories::KDE
745        } else if item == "GNOME" {
746            Categories::GNOME
747        } else if item == "XFCE" {
748            Categories::XFCE
749        } else if item == "GTK" {
750            Categories::GTK
751        } else if item == "Qt" {
752            Categories::Qt
753        } else if item == "Motif" {
754            Categories::Motif
755        } else if item == "Java" {
756            Categories::Java
757        } else if item == "ConsoleOnly" {
758            Categories::ConsoleOnly
759        } else  {
760            Categories::None
761        }
762    }
763}
764impl Default for Categories {
765    fn default() -> Self {
766        Self::None
767    }
768}