metatypes.scm 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539
  1. ;; This file is part of scheme-GNUnet, a partial Scheme port of GNUnet
  2. ;; scheme-GNUnet contains scheme-extractor.
  3. ;; scheme-extractor is a partial Scheme port of libextractor.
  4. ;; A previous iteration of this file is part of libextractor.
  5. ;; Copyright (C) 2002-2017 Vidyut Samanta and Christian Grothoff
  6. ;; Copyright (C) 2020 GNUnet e.V.
  7. ;;
  8. ;; libextractor is free software; you can redistribute it and/or modify
  9. ;; it under the terms of the GNU General Public License as published
  10. ;; by the Free Software Foundation; either version 3, or (at your
  11. ;; option) any later version.
  12. ;;
  13. ;; libextractor is distributed in the hope that it will be useful, but
  14. ;; WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. ;; General Public License for more details.
  17. ;;
  18. ;; You should have received a copy of the GNU General Public License
  19. ;; along with libextractor; see the file COPYING. If not, write to the
  20. ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  21. ;; Boston, MA 02110-1301, USA.
  22. ;; SPDX-License-Identifier: GPL-3.0-or-later
  23. ;; Upstream source: src/include/extractor.h
  24. ;; TODO: this compiles slowly (3 s). Perhaps resolve
  25. ;; all references at compile-time?
  26. (library (gnu extractor metatypes)
  27. (export meta-type?
  28. meta-type->integer
  29. integer->meta-type
  30. RESERVED
  31. MIMETYPE
  32. FILENAME
  33. COMMENT
  34. TITLE
  35. BOOK_TITLE
  36. BOOK_EDITION
  37. BOOK_CHAPTER_NUMBER
  38. JOURNAL_NAME
  39. JOURNAL_VOLUME
  40. JOURNAL_NUMBER
  41. PAGE_COUNT
  42. PAGE_RANGE
  43. AUTHOR_NAME
  44. AUTHOR_EMAIL
  45. AUTHOR_INSTITUTION
  46. PUBLISHER
  47. PUBLISHER_ADDRESS
  48. PUBLISHER_INSTITUTION
  49. PUBLISHER_SERIES
  50. PUBLICATION_TYPE
  51. PUBLICATION_YEAR
  52. PUBLICATION_MONTH
  53. PUBLICATION_DAY
  54. PUBLICATION_DATE
  55. BIBTEX_EPRINT
  56. BIBTEX_ENTRY_TYPE
  57. LANGUAGE
  58. CREATION_TIME
  59. URL
  60. URI
  61. ISRC
  62. HASH_MD4
  63. HASH_MD5
  64. HASH_SHA0
  65. HASH_SHA1
  66. HASH_RMD160
  67. GPS_LATITUDE_REF
  68. GPS_LATITUDE
  69. GPS_LONGITUDE_REF
  70. GPS_LONGITUDE
  71. LOCATION_CITY
  72. LOCATION_SUBLOCATION
  73. LOCATION_COUNTRY
  74. LOCATION_COUNTRY_CODE
  75. UNKNOWN
  76. DESCRIPTION
  77. COPYRIGHT
  78. RIGHTS
  79. KEYWORDS
  80. ABSTRACT
  81. SUMMARY
  82. SUBJECT
  83. CREATOR
  84. FORMAT
  85. FORMAT_VERSION
  86. CREATED_BY_SOFTWARE
  87. UNKNOWN_DATE
  88. CREATION_DATE
  89. MODIFICATION_DATE
  90. LAST_PRINTED
  91. LAST_SAVED_BY
  92. TOTAL_EDITING_TIME
  93. EDITING_CYCLES
  94. MODIFIED_BY_SOFTWARE
  95. REVISION_HISTORY
  96. EMBEDDED_FILE_SIZE
  97. FINDER_FILE_TYPE
  98. FINDER_FILE_CREATOR
  99. PACKAGE_NAME
  100. PACKAGE_VERSION
  101. SECTION
  102. UPLOAD_PRIORITY
  103. PACKAGE_DEPENDENCY
  104. PACKAGE_CONFLICTS
  105. PACKAGE_REPLACES
  106. PACKAGE_PROVIDES
  107. PACKAGE_RECOMMENDS
  108. PACKAGE_SUGGESTS
  109. PACKAGE_MAINTAINER
  110. PACKAGE_INSTALLED_SIZE
  111. PACKAGE_SOURCE
  112. PACKAGE_ESSENTIAL
  113. TARGET_ARCHITECTURE
  114. PACKAGE_PRE_DEPENDENCY
  115. LICENSE
  116. PACKAGE_DISTRIBUTION
  117. BUILDHOST
  118. VENDOR
  119. TARGET_OS
  120. SOFTWARE_VERSION
  121. TARGET_PLATFORM
  122. RESOURCE_TYPE
  123. LIBRARY_SEARCH_PATH
  124. LIBRARY_DEPENDENCY
  125. CAMERA_MAKE
  126. CAMERA_MODEL
  127. EXPOSURE
  128. APERTURE
  129. EXPOSURE_BIAS
  130. FLASH
  131. FLASH_BIAS
  132. FOCAL_LENGTH
  133. FOCAL_LENGTH_35MM
  134. ISO_SPEED
  135. EXPOSURE_MODE
  136. METERING_MODE
  137. MACRO_MODE
  138. IMAGE_QUALITY
  139. WHITE_BALANCE
  140. ORIENTATION
  141. MAGNIFICATION
  142. IMAGE_DIMENSIONS
  143. PRODUCED_BY_SOFTWARE
  144. THUMBNAIL
  145. IMAGE_RESOLUTION
  146. SOURCE
  147. CHARACTER_SET
  148. LINE_COUNT
  149. PARAGRAPH_COUNT
  150. WORD_COUNT
  151. CHARACTER_COUNT
  152. PAGE_ORIENTATION
  153. PAPER_SIZE
  154. TEMPLATE
  155. COMPANY
  156. MANAGER
  157. REVISION_NUMBER
  158. DURATION
  159. ALBUM
  160. ARTIST
  161. GENRE
  162. TRACK_NUMBER
  163. DISC_NUMBER
  164. PERFORMER
  165. CONTACT_INFORMATION
  166. SONG_VERSION
  167. PICTURE
  168. COVER_PICTURE
  169. CONTRIBUTOR_PICTURE
  170. EVENT_PICTURE
  171. LOGO
  172. BROADCAST_TELEVISION_SYSTEM
  173. SOURCE_DEVICE
  174. DISCLAIMER
  175. WARNING
  176. PAGE_ORDER
  177. WRITER
  178. PRODUCT_VERSION
  179. CONTRIBUTOR_NAME
  180. MOVIE_DIRECTOR
  181. NETWORK_NAME
  182. SHOW_NAME
  183. CHAPTER_NAME
  184. SONG_COUNT
  185. STARTING_SONG
  186. PLAY_COUNTER
  187. CONDUCTOR
  188. INTERPRETATION
  189. COMPOSER
  190. BEATS_PER_MINUTE
  191. ENCODED_BY
  192. ORIGINAL_TITLE
  193. ORIGINAL_ARTIST
  194. ORIGINAL_WRITER
  195. ORIGINAL_RELEASE_YEAR
  196. ORIGINAL_PERFORMER
  197. LYRICS
  198. POPULARITY_METER
  199. LICENSEE
  200. MUSICIAN_CREDITS_LIST
  201. MOOD
  202. SUBTITLE
  203. GNUNET_DISPLAY_TYPE
  204. GNUNET_FULL_DATA
  205. RATING
  206. ORGANIZATION
  207. RIPPER
  208. PRODUCER
  209. GROUP
  210. GNUNET_ORIGINAL_FILENAME
  211. DISC_COUNT
  212. CODEC
  213. VIDEO_CODEC
  214. AUDIO_CODEC
  215. SUBTITLE_CODEC
  216. CONTAINER_FORMAT
  217. BITRATE
  218. NOMINAL_BITRATE
  219. MINIMUM_BITRATE
  220. MAXIMUM_BITRATE
  221. SERIAL
  222. ENCODER
  223. ENCODER_VERSION
  224. TRACK_GAIN
  225. TRACK_PEAK
  226. ALBUM_GAIN
  227. ALBUM_PEAK
  228. REFERENCE_LEVEL
  229. LOCATION_NAME
  230. LOCATION_ELEVATION
  231. LOCATION_HORIZONTAL_ERROR
  232. LOCATION_MOVEMENT_SPEED
  233. LOCATION_MOVEMENT_DIRECTION
  234. LOCATION_CAPTURE_DIRECTION
  235. SHOW_EPISODE_NUMBER
  236. SHOW_SEASON_NUMBER
  237. GROUPING
  238. DEVICE_MANUFACTURER
  239. DEVICE_MODEL
  240. AUDIO_LANGUAGE
  241. CHANNELS
  242. SAMPLE_RATE
  243. AUDIO_DEPTH
  244. AUDIO_BITRATE
  245. MAXIMUM_AUDIO_BITRATE
  246. VIDEO_DIMENSIONS
  247. VIDEO_DEPTH
  248. FRAME_RATE
  249. PIXEL_ASPECT_RATIO
  250. VIDEO_BITRATE
  251. MAXIMUM_VIDEO_BITRATE
  252. SUBTITLE_LANGUAGE
  253. VIDEO_LANGUAGE
  254. TOC
  255. VIDEO_DURATION
  256. AUDIO_DURATION
  257. SUBTITLE_DURATION
  258. AUDIO_PREVIEW
  259. NARINFO
  260. NAR)
  261. (import (gnu extractor enum))
  262. (define-wrapped-enum (<meta-type> meta-type? integer->meta-type
  263. meta-type->integer)
  264. (#:max 4294967295)
  265. (#:known
  266. (RESERVED 0)
  267. (MIMETYPE 1)
  268. (FILENAME 2)
  269. (COMMENT 3)
  270. ;; Standard types from bibtex
  271. (TITLE 4)
  272. (BOOK_TITLE 5)
  273. (BOOK_EDITION 6)
  274. (BOOK_CHAPTER_NUMBER 7)
  275. (JOURNAL_NAME 8)
  276. (JOURNAL_VOLUME 9)
  277. (JOURNAL_NUMBER 10)
  278. (PAGE_COUNT 11)
  279. (PAGE_RANGE 12)
  280. (AUTHOR_NAME 13)
  281. (AUTHOR_EMAIL 14)
  282. (AUTHOR_INSTITUTION 15)
  283. (PUBLISHER 16)
  284. (PUBLISHER_ADDRESS 17)
  285. (PUBLISHER_INSTITUTION 18)
  286. (PUBLISHER_SERIES 19)
  287. (PUBLICATION_TYPE 20)
  288. (PUBLICATION_YEAR 21)
  289. (PUBLICATION_MONTH 22)
  290. (PUBLICATION_DAY 23)
  291. (PUBLICATION_DATE 24)
  292. (BIBTEX_EPRINT 25)
  293. (BIBTEX_ENTRY_TYPE 26)
  294. (LANGUAGE 27)
  295. (CREATION_TIME 28)
  296. (URL 29)
  297. ;; "unique" document identifiers
  298. (URI 30)
  299. (ISRC 31)
  300. (HASH_MD4 32)
  301. (HASH_MD5 33)
  302. (HASH_SHA0 34)
  303. (HASH_SHA1 35)
  304. (HASH_RMD160 36)
  305. ;; identifiers of a location
  306. (GPS_LATITUDE_REF 37)
  307. (GPS_LATITUDE 38)
  308. (GPS_LONGITUDE_REF 39)
  309. (GPS_LONGITUDE 40)
  310. (LOCATION_CITY 41)
  311. (LOCATION_SUBLOCATION 42)
  312. (LOCATION_COUNTRY 43)
  313. (LOCATION_COUNTRY_CODE 44)
  314. ;; generic attributes
  315. (UNKNOWN 45)
  316. (DESCRIPTION 46)
  317. (COPYRIGHT 47)
  318. (RIGHTS 48)
  319. (KEYWORDS 49)
  320. (ABSTRACT 50)
  321. (SUMMARY 51)
  322. (SUBJECT 52)
  323. (CREATOR 53)
  324. (FORMAT 54)
  325. (FORMAT_VERSION 55)
  326. ;; processing history
  327. (CREATED_BY_SOFTWARE 56)
  328. (UNKNOWN_DATE 57)
  329. (CREATION_DATE 58)
  330. (MODIFICATION_DATE 59)
  331. (LAST_PRINTED 60)
  332. (LAST_SAVED_BY 61)
  333. (TOTAL_EDITING_TIME 62)
  334. (EDITING_CYCLES 63)
  335. (MODIFIED_BY_SOFTWARE 64)
  336. (REVISION_HISTORY 65)
  337. (EMBEDDED_FILE_SIZE 66)
  338. (FINDER_FILE_TYPE 67)
  339. (FINDER_FILE_CREATOR 68)
  340. ;; software package specifics (deb, rpm, tgz, elf)
  341. (PACKAGE_NAME 69)
  342. (PACKAGE_VERSION 70)
  343. (SECTION 71)
  344. (UPLOAD_PRIORITY 72)
  345. (PACKAGE_DEPENDENCY 73)
  346. (PACKAGE_CONFLICTS 74)
  347. (PACKAGE_REPLACES 75)
  348. (PACKAGE_PROVIDES 76)
  349. (PACKAGE_RECOMMENDS 77)
  350. (PACKAGE_SUGGESTS 78)
  351. (PACKAGE_MAINTAINER 79)
  352. (PACKAGE_INSTALLED_SIZE 80)
  353. (PACKAGE_SOURCE 81)
  354. (PACKAGE_ESSENTIAL 82)
  355. (TARGET_ARCHITECTURE 83)
  356. (PACKAGE_PRE_DEPENDENCY 84)
  357. (LICENSE 85)
  358. (PACKAGE_DISTRIBUTION 86)
  359. (BUILDHOST 87)
  360. (VENDOR 88)
  361. (TARGET_OS 89)
  362. (SOFTWARE_VERSION 90)
  363. (TARGET_PLATFORM 91)
  364. (RESOURCE_TYPE 92)
  365. (LIBRARY_SEARCH_PATH 93)
  366. (LIBRARY_DEPENDENCY 94)
  367. ;; photography specifics
  368. (CAMERA_MAKE 95)
  369. (CAMERA_MODEL 96)
  370. (EXPOSURE 97)
  371. (APERTURE 98)
  372. (EXPOSURE_BIAS 99)
  373. (FLASH 100)
  374. (FLASH_BIAS 101)
  375. (FOCAL_LENGTH 102)
  376. (FOCAL_LENGTH_35MM 103)
  377. (ISO_SPEED 104)
  378. (EXPOSURE_MODE 105)
  379. (METERING_MODE 106)
  380. (MACRO_MODE 107)
  381. (IMAGE_QUALITY 108)
  382. (WHITE_BALANCE 109)
  383. (ORIENTATION 110)
  384. (MAGNIFICATION 111)
  385. ;; image specifics
  386. (IMAGE_DIMENSIONS 112)
  387. (PRODUCED_BY_SOFTWARE 113)
  388. (THUMBNAIL 114)
  389. (IMAGE_RESOLUTION 115)
  390. (SOURCE 116)
  391. ;; (text) document processing specifics
  392. (CHARACTER_SET 117)
  393. (LINE_COUNT 118)
  394. (PARAGRAPH_COUNT 119)
  395. (WORD_COUNT 120)
  396. (CHARACTER_COUNT 121)
  397. (PAGE_ORIENTATION 122)
  398. (PAPER_SIZE 123)
  399. (TEMPLATE 124)
  400. (COMPANY 125)
  401. (MANAGER 126)
  402. (REVISION_NUMBER 127)
  403. ;; music / video specifics
  404. (DURATION 128)
  405. (ALBUM 129)
  406. (ARTIST 130)
  407. (GENRE 131)
  408. (TRACK_NUMBER 132)
  409. (DISC_NUMBER 133)
  410. (PERFORMER 134)
  411. (CONTACT_INFORMATION 135)
  412. (SONG_VERSION 136)
  413. (PICTURE 137)
  414. (COVER_PICTURE 138)
  415. (CONTRIBUTOR_PICTURE 139)
  416. (EVENT_PICTURE 140)
  417. (LOGO 141)
  418. (BROADCAST_TELEVISION_SYSTEM 142)
  419. (SOURCE_DEVICE 143)
  420. (DISCLAIMER 144)
  421. (WARNING 145)
  422. (PAGE_ORDER 146)
  423. (WRITER 147)
  424. (PRODUCT_VERSION 148)
  425. (CONTRIBUTOR_NAME 149)
  426. (MOVIE_DIRECTOR 150)
  427. (NETWORK_NAME 151)
  428. (SHOW_NAME 152)
  429. (CHAPTER_NAME 153)
  430. (SONG_COUNT 154)
  431. (STARTING_SONG 155)
  432. (PLAY_COUNTER 156)
  433. (CONDUCTOR 157)
  434. (INTERPRETATION 158)
  435. (COMPOSER 159)
  436. (BEATS_PER_MINUTE 160)
  437. (ENCODED_BY 161)
  438. (ORIGINAL_TITLE 162)
  439. (ORIGINAL_ARTIST 163)
  440. (ORIGINAL_WRITER 164)
  441. (ORIGINAL_RELEASE_YEAR 165)
  442. (ORIGINAL_PERFORMER 166)
  443. (LYRICS 167)
  444. (POPULARITY_METER 168)
  445. (LICENSEE 169)
  446. (MUSICIAN_CREDITS_LIST 170)
  447. (MOOD 171)
  448. (SUBTITLE 172)
  449. ;; GNUnet specific values (never extracted)
  450. (GNUNET_DISPLAY_TYPE 173)
  451. (GNUNET_FULL_DATA 174)
  452. (RATING 175)
  453. (ORGANIZATION 176)
  454. (RIPPER 177)
  455. (PRODUCER 178)
  456. (GROUP 179)
  457. (GNUNET_ORIGINAL_FILENAME 180)
  458. (DISC_COUNT 181)
  459. (CODEC 182)
  460. (VIDEO_CODEC 183)
  461. (AUDIO_CODEC 184)
  462. (SUBTITLE_CODEC 185)
  463. (CONTAINER_FORMAT 186)
  464. (BITRATE 187)
  465. (NOMINAL_BITRATE 188)
  466. (MINIMUM_BITRATE 189)
  467. (MAXIMUM_BITRATE 190)
  468. (SERIAL 191)
  469. (ENCODER 192)
  470. (ENCODER_VERSION 193)
  471. (TRACK_GAIN 194)
  472. (TRACK_PEAK 195)
  473. (ALBUM_GAIN 196)
  474. (ALBUM_PEAK 197)
  475. (REFERENCE_LEVEL 198)
  476. (LOCATION_NAME 199)
  477. (LOCATION_ELEVATION 200)
  478. (LOCATION_HORIZONTAL_ERROR 201)
  479. (LOCATION_MOVEMENT_SPEED 202)
  480. (LOCATION_MOVEMENT_DIRECTION 203)
  481. (LOCATION_CAPTURE_DIRECTION 204)
  482. (SHOW_EPISODE_NUMBER 205)
  483. (SHOW_SEASON_NUMBER 206)
  484. (GROUPING 207)
  485. (DEVICE_MANUFACTURER 208)
  486. (DEVICE_MODEL 209)
  487. (AUDIO_LANGUAGE 210)
  488. (CHANNELS 211)
  489. (SAMPLE_RATE 212)
  490. (AUDIO_DEPTH 213)
  491. (AUDIO_BITRATE 214)
  492. (MAXIMUM_AUDIO_BITRATE 215)
  493. (VIDEO_DIMENSIONS 216)
  494. (VIDEO_DEPTH 217)
  495. (FRAME_RATE 218)
  496. (PIXEL_ASPECT_RATIO 219)
  497. (VIDEO_BITRATE 220)
  498. (MAXIMUM_VIDEO_BITRATE 221)
  499. (SUBTITLE_LANGUAGE 222)
  500. (VIDEO_LANGUAGE 223)
  501. (TOC 224)
  502. (VIDEO_DURATION 225)
  503. (AUDIO_DURATION 226)
  504. (SUBTITLE_DURATION 227)
  505. (AUDIO_PREVIEW 228)
  506. (NARINFO 229)
  507. (NAR 230))))