Difference between revisions of "TruxtonFileIO addnote"

From truxwiki.com
Jump to navigation Jump to search
(Created page with "This creates an investigator note associated with this file in Truxton. This will add a record to the <code>[InvestigatorNote]</code> table in the database. =Syntax= <syntaxh...")
 
 
Line 23: Line 23:
  
 
if __name__ == "__main__":
 
if __name__ == "__main__":
   main()
+
   sys.exit(main())
 
</syntaxhighlight>
 
</syntaxhighlight>

Latest revision as of 09:02, 3 February 2024

This creates an investigator note associated with this file in Truxton. This will add a record to the [InvestigatorNote] table in the database.

Syntax

addnote(text: str) -> boolean

Return value

True if the note was associated with the file, False on failure.

Sample

import truxton

def main():
  t = truxton.create()
  file = t.getfileid("5ec2a123-74d6-5da7-0653-4e6800000000")

  file.addnote("We had the interns manually type these in.")

  return None

if __name__ == "__main__":
  sys.exit(main())