File: tags.py

package info (click to toggle)
thawab 4.1-2
  • links: PTS, VCS
  • area: non-free
  • in suites: bullseye, sid
  • size: 1,912 kB
  • sloc: python: 4,041; makefile: 134; sh: 33
file content (17 lines) | stat: -rw-r--r-- 1,375 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# the following flags are Or-ed in a node-wide (not tag-wide)
TAG_FLAGS_EXTERNAL_SOURCE = 1 # some external source pointed by param
TAG_FLAGS_BYBOT = 2           # the content and descendant nodes are generated by a bot, CHANGES WILL BE LOST
TAG_FLAGS_HEADER = 4          # index content in a separated document then consume content
TAG_FLAGS_IX_TAG = 8          # add this tag name into index tags list, if it has a param append it to the tag name
TAG_FLAGS_IX_FIELD = 16       # index content (again) in a separated document without consuming content
TAG_FLAGS_IX_SKIP = 32        # don't index content
TAG_FLAGS_PAD_CONTENT = 64    # append a space/LF after content
TAG_FLAGS_FLOW_BLOCK = 128    # in a separated block eg. <div></div>
TAG_FLAGS_FLOW_FLOAT = 256    # marked text does not flow normally, but float in a box
TAG_FLAGS_FLOW_FOOTER = 512   # marked text does not flow normally, but accumelated in the tail
TAG_FLAGS_FLOW_HIDDEN = 1024  # marked text does not appear in usual cases


# NOTE: validaty of data: a node of type TAG_FLAGS_HEADER can't be a child of TAG_FLAGS_IX_FIELD
# NOTE: validaty of data: both TAG_FLAGS_IX_SKIP and TAG_FLAGS_IX_FIELD should not be applied to the same node
# NOTE: validaty of data: both TAG_FLAGS_HEADER and TAG_FLAGS_IX_FIELD will case redudancy if applied to same node (as things will be indexed twice without any befinit)