+
     h  c                   s    ^ RI t ^ RIt^RIHtHtHt ^RIHtHtH	t	H
t
 ^RIHtHtHtHtHt ^RIHt ] ! R R]4      4       t] ! R R	]4      4       tR# )
i    N)
PartialTagProfile	Thumbnail)ArticleCategory
DifficultyThumbnailTypeTutorialCategory)LOGGERconcat_docsget_date	get_viewsjoin)BaseMetaClassc                   sH   a a ] tR t^t oRtV3R lV 3R lltR tRtVtV ;t	# )Articlea,	  This object represents an news article, a tutorial or a feature.

Parameters
-----------
html : bs4.BeautifulSoup
    The html to parse. Allows for finer control.

Filtering
----------
category : :class:`.ArticleCategory`
    Type of the article (news, feature)
timeframe : :class:`.TimeFrame`
    The time period this was released in (last 24hr, last week, last month)
game : Union[:class:`.Game`, :class:`.Object`]
    An game object or an object with an id attribute which represents the
    game the article belongs to.

Sorting
--------
    * **ranktoday** - order by daily ranking, asc is highest ranked, desc is lowest rank
    * **visitstotal** - order by most views, asc is highest views, desc is lowest views
    * **dateup** - order by article date, asc is most recent first, desc is oldest first
    * **name** - order alphabetically, asc is a-z, desc is z-a
    * **member** - order by member???
    * **date** - order by upload date, asc is most recent first, desc is oldest first

    Exclusive to tutorials
    * **meta** - sort by difficulty, asc is most difficult, desc is least difficult
    * **subtype** - sort by the area the tutorial covers

Attributes
-----------
category : ArticleCategory
    Whether this article is a news article, a tutorial or a feature
name : str
    The name of the article
profile : Profile
    The profile object of the moddb model the article is for (engine, game, mod...). Can be none if it is not
    rattached to anything, such as for site news.
tags : List[PartialTag]
     A list of partial tags. You can use `get_tags` and then use the name id to get the right one.
views : int
    Total amount of times this article was viewed
today : int
    amount of time the article has been viewed today
intro : int
    The intro/teaser paragraph of the article
author : Thumbnail
    A member type thumbnail of the member who published the article
date : datetime.datetime
    The date the article was published
html : str
    The html of the article
plaintext : str
    The article text without any html
summary : str
    plaintext intro to the article
tutorial_category : TutorialCategory
    If the article category is tutorial, this represents the area the tutorial covers, else it is None
difficulty : Difficulty
    If the article category is tutorial, this represents how hard the tutorial is.
c                s4   < V ^8  d   QhRS[ P                  /# )i   html)bs4ZBeautifulSoup)Zformat__classdict__s   "8/usr/lib/python3.14/site-packages/moddb/pages/article.pyZ__annotate__ZArticle.__annotate__L   s     > >S.. >    c           
     s	  <  VP                  R RR7      P                  V n        \        S	V `  V4       VP                  RRR7      P                  P                  P                  P                  p\        VP                  4       ,          V n         VP                  R V^ R" R7      P                  P                  P                  P                  RRR	7      p \        V4      V n         VP                  RRR/R7      P'                  R4      pV Uu. uFW  pVP                  f   K  \)        VP                  \+        VR,          4      VR,          P-                  R4      R",          4      NKY  	  upV n        VP                  RRR7      P                  P                  P                  P                  p\5        V4      w  V n        V n        VP                  RRR7      P                  V n        VP                  R RR7      P                  P                  p\=        VP                  VR,          \>        P@                  R7      V n!        \E        VP                  RRR7      R,          4      V n#        \I        VP                  RRR7      4      V n%        VP                  RRR7      PL                  V n'        VP                  RRR	7      P                  V n(        V P                  \        PR                  8X  d   VP                  R RR7      PT                  PW                  4       p\X        VP[                  RR 4      P[                  R!R 4      P                  4       ,          V n.        \^        VP                  R RR7      P                  P                  4       ,          V n0        R# R#   \         d'    TP                  R RR7      P                  T n         ELi ; i  \         dG    TP                  R TR7      P                  P                  P                  P                  RRR	7      p ELGi ; i  \         dN    \        P                  ! R
T P                  \        P                   \"        P$                  8  R7       RT n         ELi ; iu upi   \         dc    . T n        \        P                  ! RT P0                  P2                  T P                  \        P                   \"        P$                  8  R7        ELxi ; i)#spanZheadline)ZitempropheadingZh5ZBrowse)stringdivztable tablemenuZclass_z'%s' has no profile)Zexc_infoNZformnameZtagsform)Zattrsahref/z'%s' '%s' has no tagsZViewsZpZdescriptionauthor)r   urltypetimeZdatePublisheddatetimeZarticleBodyZintroductiontextZproficiencyLevelZ_Z i)1findr   r   ZAttributeErrorZsuper__init__Zparentr   r   r   Zlowercategoryr   profiler   ZinfoZlevelloggingZDEBUGZfind_allr    r   splittags	__class____name__r
   viewstodayintror   r   memberr   r	   datestrr   text	plaintextsummaryZ	tutorialsZnextSiblingZstripr   Zreplacetutorial_categoryr   
difficulty)
selfr   Zraw_typeZrawZraw_tagsZxZ	views_rawr   Zcatr(   s
   &&       r   r"   ZArticle.__init__L   s   	E		&:	>EEDI 	99T(93::??AAHH'(89	))F8Ab>):AAHHOOTT/ U C	 "4=DL
	yy
/CyDMMcRH "!A88 P
188T!F)_aiooc6J26NO!DI HHT'H299>>@@GG	!*9!5
DJYYs]Y;BB
6H5::<<V]]v]MaMabTYYvYHTU			%-	@A	5=AFFyy-?y@GG==O555))F-?)@LLRRTC%5C%--c37==?&D" )		&+=	>EEKKMDO 6i  	E		&9	=DDDI	E  	))F8)4;;BBIINN/ O C	  	 KK-tyy6<<SZS`S`C`aDL	 
  	DIKK'''		6	 	sd   "N AO P  '(R  Q;$AQ;,R  -O	O	APP AQ87Q8;R   A)S-,S-c                sP    R V P                    RV P                  P                    R2# )z<Article title=z type=>)r   r#   r5      &r   __repr__ZArticle.__repr__   s&     6$--2D2D1EQGGr   )r   r#   r.   r4   r   r,   r   r1   r$   r2   r'   r+   r3   r*   )
r)   
__module____qualname____firstlineno____doc__r"   r9   __static_attributes____classdictcell__Z__classcell__)r(   r   s   @@r   r   r      s"     =~> >@H Hr   r   c                   s0   a  ] tR t^t o RtR tR tRtV tR# )Bloga-  Object used to represent a member blog.

Filtering
----------
timeframe : :class:`.TimeFrame`
    The time period this was released in (last 24hr, last week, last month)

Sorting
--------
    * **ranktoday** - order by daily ranking, asc is highest ranked, desc is lowest rank
    * **visitstotal** - order by most views, asc is highest views, desc is lowest views
    * **dateup** - order by blog date, asc is most recent first, desc is oldest first
    * **name** - order alphabetically, asc is a-z, desc is z-a
    * **member** - order by member???
    * **date** - order by upload date, asc is most recent first, desc is oldest first

Attributes
-----------
name_id : str
    The name_id of the member, cannot be changed, it's a mix of the original username lowercased with
    spaces removed and shortened.

c               s<   VP                  R RR7      P                  p\        VR,          VP                  \        P
                  R7      V n        \        VP                  R RR7      P                  R,          4      V n	        VP                  P                  P                  pVP                  V n        \        VR,          4      V n        V P                  P                  R4      ^ ,          V n        \#        VP$                  4      V n        VP(                  V n        R# )	r   Z
subheadingr   r   )r   r   r   r.   r    r   N)r!   r   r   r   r   r-   r   r	   r   r.   r   Zh4r   r   r   r&   name_idr/   Zcontentr   r0   r1   )r5   r   r0   r   Ztitles   &$$  r   r"   ZBlog.__init__   s    f\:<<F6N]MaMabW\\&\@EEjQR	  LL	f&xx~~c*1-%	r   c                s"    R V P                    R2# )z<Blog title=r6   )r   r7   r8   r   r9   ZBlog.__repr__   s    dii[**r   )r   r.   r   r   rA   r1   r   N)	r)   r:   r;   r<   r=   r"   r9   r>   r?   )r   s   @r   r@   r@      s     0#+ +r   r@   )r%   r   Zboxesr    r   r   Zenumsr   r   r   r   Zutilsr   r   r	   r
   r   Zbaser   r   r@   ) r   r   <module>rB      s]     
 2 2 P P B B  AHm AH AHH (+= (+ (+r   